Answer the question
In order to leave comments, you need to log in
I can't deploy a Django site, what's the problem?
Hello, I wrote a project in Django, thoroughly tested everything, checked it and decided to try to run it on a virtual machine in Ubuntu 16.04 (Windows 10 host), while the project itself was written in Archlinux.
I installed Vagrant on Windows 10, created a virtual machine with Ubuntu 16.04 there and installed all the necessary software:
- Virtualenv;
- PostgreSQL and psycopg2 + created a database and set up access to the database in settings.py;
- P.I.P.
etc. Then I created a virtual environment, installed all the dependencies and transferred the Django project itself there. Further, as I understand it, it is necessary to do python manage.py migrate to create the table structure, but at this stage I have a problem with the fact that the migration does not occur, here is the error:
python manage.py migrate
Traceback (most recent call last):
File "/home/vagrant/data/gderetreat/lib/python3.5/site-packages/django/db/backends/utils.py", line 85, in _execute
return self.cursor.execute(sql, params)
psycopg2.ProgrammingError: relation "events_type" does not exist
LINE 1: ...CT "events_type"."id", "events_type"."title" FROM "events_ty...
^
The above exception was the direct cause of the following exception:
Answer the question
In order to leave comments, you need to log in
You have inconsistent migrations or code execution of irrelevant models (this is when you import them into migrations from a model, and not apps.get_model)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question