Heroku django app createsuperuser
do not detach the heroku shell: heroku run python manage.py createsuperuser worked for me
do not detach the heroku shell: heroku run python manage.py createsuperuser worked for me
nginx and gunicorn are probably the most popular configuration for production deployments. Before detailing why gunicorn is recommended over runserver, let’s quickly clarify the difference between nginx and gunicorn, because both state that they are web servers. NGINX should be your entrance point to the public, it’s the server listening to port 80 (http) and … Read more
This worked for me. I thank my coworker for sharing this knowledge after I searched online for many hours. Start your db shell python manage.py dbshell Use the database you want. If you don’t know, run .databases (SQLite) or SHOW databases mysql>use <database_name>; Retrieve all the migrations under your app mysql> select * from django_migrations … Read more
I had the error as well; although psycopg2 was installed on my system using apt-get, my virtualenv couldn’t find it: >>> import psycopg2 Traceback (most recent call last): File “<stdin>”, line 1, in <module> ImportError: No module named psycopg2 It was fixed by doing a pip install psycopg2-binary inside the virtualenv (or pip install psycopg2 … Read more
To see the processes is ps ax|grep gunicorn and to stop gunicorn_django is pkill gunicorn.
create a bash script with the following: #!/bin/bash exec ./manage.py runserver 0.0.0.0:<your_port> save it as runserver in the same dir as manage.py chmod +x runserver and run it as ./runserver