Django: Difference between using server through manage.py and other servers like gunicorn etc. Which is better?

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

Django manage.py: Migration applied before its dependency

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

django.core.exceptions.ImproperlyConfigured: Error loading psycopg module: No module named psycopg

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

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)