You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The most relevant section: Generally speaking, you should reference the User model with the AUTH_USER_MODEL setting in code that is executed at import time. get_user_model() only works once Django has imported all models.
The problem is models.py::formlog::created_by field. This field is not inside any method. So if you import this from your own models it will crash. a fix would be to put this inside a method or change it to use the AUTH_USER_MODEL setting.
Its fine to import, but if you import a model from this app from within your own models.py file, it will cause a circular error due to the get_user_model() running from within the code. see
http://stackoverflow.com/questions/17469682/django-1-5-accessing-custom-user-model-fields-in-models-py
for a very relevant case and how they solved.
The text was updated successfully, but these errors were encountered: