The sample project for django framework.
git clone https://github.com/dori-dev/django-sample.git
cd django-sample
python -m venv env
source env/bin/activate
pip install -r requirements.txt
set your environment variables in .env.local
to .env.production
.
if you doesn't set STATE
environ variable, project run with debug=False
export STATE=LOCAL
python manage.py makemigrations notes
python manage.py migrate
python manage.py createsuperuser
python manage.py test
python manage.py runserver
Home Page: 127.0.0.1:8000
Admin Page: 127.0.0.1:8000/admin
Push to Heroku:
heroku login
heroku create
git push heroku master
Run bash on Heroku with heroku run bash
and write this commands:
python manage.py makemigrations notes
python manage.py migrate
python manage.py collectstatic
python manage.py createsuperuser
Open your website:
heroku open
See Logs:
heroku logs --tail
Demo of Project: dori-django-sample.herokuapp.com
Download Source Code: Click Here
My Github Account: Click Here