All Projects → Gpzim98 → Django Heroku

Gpzim98 / Django Heroku

Minimal configuration to host a Django project at Heroku

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Django Heroku

Heroku Buildpack Python
The official Heroku buildpack for Python apps.
Stars: ✭ 849 (+146.8%)
Mutual labels:  heroku, django
Guides
Guides for learning + doing better web and app development. Created by Coding for Entrepreneurs.
Stars: ✭ 1,042 (+202.91%)
Mutual labels:  heroku, django
Lunch With Channels
Stars: ✭ 32 (-90.7%)
Mutual labels:  heroku, django
Heroku Django Template
A Django 2.0 base template featuring all recommended best practices for deployment on Heroku and local development.
Stars: ✭ 887 (+157.85%)
Mutual labels:  heroku, django
Bovespastockratings
Crawler for Fundamental analysis platform for BOVESPA stocks, generating a score for each share according to the selected criteria on the indicators.
Stars: ✭ 154 (-55.23%)
Mutual labels:  heroku, django
Django Photoblog
Photographer portfolio website powered by Django Framework. Features photo gallery with infinite scrolling, tagging, thumbnail generation and CMS for creating pages. Configured for Heroku and S3.
Stars: ✭ 19 (-94.48%)
Mutual labels:  heroku, django
Metaci
Lightweight, Salesforce specific CI app run on Heroku to build Github repositories configured for CumulusCI
Stars: ✭ 45 (-86.92%)
Mutual labels:  heroku, django
Ponee
A lightweight Django template ready for Heroku
Stars: ✭ 41 (-88.08%)
Mutual labels:  heroku, django
Covid19 Dashboard
🦠 Django + Plotly Coronavirus dashboard. Powerful data driven Python web-app, with an awesome UI. Contributions welcomed! Featured on 🕶Awesome-list
Stars: ✭ 100 (-70.93%)
Mutual labels:  heroku, django
Generator Django Rest
Yeoman generator for a Django REST/GraphQL API, an optional React SPA & lots more!
Stars: ✭ 77 (-77.62%)
Mutual labels:  heroku, django
Django Project Template
Project template layout for Django 3.0+
Stars: ✭ 530 (+54.07%)
Mutual labels:  heroku, django
Crud App Vuejs Django
This is simple crud app and searchFilter made using vuejs and django. Used to explain the tutorial present on https://medium.com/@shubhambansal_89125/crud-app-using-vue-js-and-django-516edf4e4217 https://medium.com/@shubhambansal_89125/searchfilter-using-django-and-vue-js-215af82e12cd
Stars: ✭ 174 (-49.42%)
Mutual labels:  heroku, django
Django Heroku
A Django library for Heroku apps.
Stars: ✭ 428 (+24.42%)
Mutual labels:  heroku, django
Project Dashboard With Django
Agile Project Management dashboard with Django REST and Vue.js
Stars: ✭ 25 (-92.73%)
Mutual labels:  heroku, django
Posthog
🦔 PostHog provides open-source product analytics that you can self-host.
Stars: ✭ 5,488 (+1495.35%)
Mutual labels:  heroku, django
Django Rest React Pycon
🐍 Demo repo for Pycon X talk "Decoupling Django with Django REST (and a sprinkle of React)"
Stars: ✭ 72 (-79.07%)
Mutual labels:  heroku, django
Portfolio Generator
HoxNox - Portfolios Made Easy, Generate portfolios in 3 easy steps
Stars: ✭ 166 (-51.74%)
Mutual labels:  heroku, django
Shareabouts
Shareabouts is a mapping application for crowdsourced info gathering.
Stars: ✭ 269 (-21.8%)
Mutual labels:  heroku, django
Dsmr Reader
DSMR-protocol reader, telegram data storage and energy consumption visualizer. Can be used for reading the smart meter DSMR (Dutch Smart Meter Requirements) P1 port yourself at your home. You will need a cable and hardware that can run Linux software. Free for non-commercial use. A Docker implementation can be found here: https://github.com/xirixiz/dsmr-reader-docker
Stars: ✭ 327 (-4.94%)
Mutual labels:  django
Django Dash
Customisable, modular dashboard application framework for Django.
Stars: ✭ 337 (-2.03%)
Mutual labels:  django

django-heroku

Minimal configuration to host a Django project at Heroku

Create the project directory

  • mkdir directory_name
  • cd directory_name

Create and activate your virtuanenv

  • virtualenv -p python3 .vEnv
  • . .vEnv/bin/activate

Installing django

  • pip install django

Create the django project

  • django-admin startproject myproject

Creating the Git repository

  • git init
  • Create a file called .gitignore with the following content:
# See the name for you IDE
.idea
# If you are using sqlite3
*.sqlite3
# Name of your virtuan env
.vEnv
*pyc
  • git add .
  • git commit -m 'First commit'

Hidding instance configuration

  • pip install python-decouple
  • create an .env file at the root path and insert the following variables
  • SECRET_KEY=Your$eCretKeyHere (Get this secrety key from the settings.py)
  • DEBUG=True

Settings.py

  • from decouple import config
  • SECRET_KEY = config('SECRET_KEY')
  • DEBUG = config('DEBUG', default=False, cast=bool)

Configuring the Data Base (You don't need that if you already had an database).

  • pip install dj-database-url

Settings.py

  • from dj_database_url import parse as dburl

default_dburl = 'sqlite:///' + os.path.join(BASE_DIR, 'db.sqlite3')

DATABASES = { 'default': config('DATABASE_URL', default=default_dburl, cast=dburl), }

Static files

pip install dj-static

wsgi

  • from dj_static import Cling
  • application = Cling(get_wsgi_application())
  • Also don't forget to check "DJANGO_SETTINGS_MODULE". It is prone to frequent mistakes.

Settings.py

  • STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')

Create a requirements-dev.txt

pip freeze > requirements-dev.txt

Create a file requirements.txt file and include reference to previows file and add two more requirements

  • -r requirements-dev.txt
  • gunicorn
  • psycopg2

Create a file Procfile and add the following code

Create a file runtime.txt and add the following core

  • python-3.6.0 (You can currently use "python-3.7.3")

Creating the app at Heroku

You should install heroku CLI tools in your computer previously ( See http://bit.ly/2jCgJYW )

  • heroku apps:create app-name (you can create by heroku it's self if you wanted.) You can also login in heroku by: heroku login Remember to grab the address of the app in this point

Setting the allowed hosts

  • include your address at the ALLOWED_HOSTS directives in settings.py - Just the domain, make sure that you will take the protocol and slashes from the string

Heroku install config plugin

  • heroku plugins:install heroku-config

Sending configs from .env to Heroku ( You have to be inside tha folther where .env files is)

  • heroku plugins:install heroku-config
  • heroku config:push -a

To show heroku configs do

  • heroku config (check this, if you fail changing by code, try changing by heroku dashboard)

Publishing the app

  • git add .
  • git commit -m 'Configuring the app'
  • git push heroku master --force (you don't need "--force")

Creating the data base (if you are using your own data base you don't need it, if was migrated there)

  • heroku run python3 manage.py migrate

Creating the Django admin user

  • heroku run python3 manage.py createsuperuser (the same as above)

EXTRAS

You may need to disable the collectstatic

  • heroku config:set DISABLE_COLLECTSTATIC=1

Also recommend set this configuration to your heroku settings

  • WEB_CONCURRENCY = 3

Changing a specific configuration

  • heroku config:set DEBUG=True
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].