Preventing apps installing duplicate models

36 views
Skip to first unread message

Murat Sert

unread,
Feb 6, 2018, 11:23:08 AM2/6/18
to Django users
Hi,

I'm working on a project upgrade from Django 1.8 to 1.11. They've used a custom registration app which is inheriting from Django Registration Redux package.
Both packages are listed on installed_apps list. All works fine however when I try to run tests, where it creates test tables back to back, it errors at the following lines:
```
    ....
    Creating table profile_preferences
    Creating table registration_registrationprofile
    Creating table registration_registrationprofile
    django.db.utils.ProgrammingError: relation "registration_registrationprofile" already exists
```

This is because both Apps are listed within the installed_apps list. Is there a way around this?

Removing the django-registration-redux from installed_apps causes ```RuntimeError: Model class registration.models.RegistrationProfile doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS.``` error.


Regards

Murat

Matemática A3K

unread,
Feb 6, 2018, 2:00:42 PM2/6/18
to django...@googlegroups.com
If you provide an app_label in the Model's Meta (whatever installed app), does it run?
 


Regards

Murat

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/f9774a9a-cc7e-444d-b7d3-432192d3b5df%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages