A
A
Alexander Bondarenko2020-07-24 15:04:27
Django
Alexander Bondarenko, 2020-07-24 15:04:27

Why are migrations not happening to Django VPS?

I uploaded new database models for the Django site to the VPS, made migrations, everything went well, but new fields were not added to the admin panel, what could be the problem? Restarted both guinicorn and nginx

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dr. Bacon, 2020-07-24
@bond_1013

I started it and everything works fine

S
Shporsoft, 2020-07-25
@Shporsoft

You don't seem to have registered models in admin.py

#admin.py
from .models import MyModel
admin.site.register(MyModel)

You also wrote that you added new models (not fields to the model) to the site database.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question