-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LookupError: App 'dynamic_preferences' doesn't have a 'userpreferencemodel' model. #141
Comments
In development, removing all migrations for dynamic_preferences and recreating them works:
But this is not an acceptable workaround because I can not run this in production, where I can not remove the migrations of third-party applications. |
I'm having a similar issue with a blank database but in my case it seems something related to I can't do anything in my django environment. Any command I enter I receive this error (including
|
Hi @gonvaled and @marcofvera. I'm sorry for remaining silent for such a long time. I have little times these days. I think the issue you're facing is caused by #140. I'll take a few hours today to start a new project, reproduce the issue and find a possible workaround. |
@marcofvera I cannot reproduce your issue, so I'd like to know more about your project. Is there any minimum code that reproduces the issue you could share ? Or at least a full stack trace ? |
@EliotBerriot I'm sorry for the delay.. I just saw your comment now. I've tried to use the version 1.6 but still not working on my environment. Here is the full stack trace:
Here is part of the code where I'm using the class PreferencesView(FormMixin, TemplateView):
form_class = global_preference_form_builder(section='general')
success_url = reverse_lazy('preferences')
template_name = 'preferences.html' |
@marcofvera this happens because you are creating the form at module level, which requires database access. Return the form class from the |
Starting with a blank database, I am having problems running migrations:
Doing
showmigrations
I see:What could be the problem?
The text was updated successfully, but these errors were encountered: