Version
- Python: 2.7.3
- Django: 1.7
What to do on localhost?
Start from
- https://docs.djangoproject.com/en/1.7/intro/tutorial01/
- https://devcenter.heroku.com/articles/getting-started-with-django
- https://devcenter.heroku.com/articles/django-assets
Important thing is to run
python manage.py collectstatic
If you use public CDN at frontend and also use Django admin feauture,be sure to run it to show the admin style correctly after finishing your application.
Run Heroku commands
heroku run python manage.py sqlmigrate [your_app] 0001
The 0001 is the number of your migration.
heroku run python manage.py migrate
Until now,model tables have been created in your database.
Create superuser
heroku run python manage.py createsuperuser
That’s all.
Settings
https://github.com/zhangjingqiang/qiang-commands/blob/master/qiang_commands/settings.py