This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
This example shows how to run Django management command from some of your Django apps. | |
Stdout and stderr are redirected to Django's StreamingHttpResponse, so | |
you will see command execution result in realtime. | |
Example can be easily adopted to run all Django's management commands or | |
any bash command. | |
""" | |
import importlib |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. create new app in dashboard.heroku.com | |
2. create Procfile | |
echo "web: gunicorn <app-name>.wsgi --log-file -1" > Procfile | |
3. add settings file for heroku | |
from .<base-settings-file> import * | |
import dj_database_url | |
ALLOWED_HOSTS = ['<name-app>.herokuapp.com', ] |
NewerOlder