Opened 10 years ago
Last modified 10 years ago
#24812 closed Bug
RuntimeWarning in schema tests about reloading models — at Version 1
Reported by: | Tim Graham | Owned by: | nobody |
---|---|---|---|
Component: | Migrations | Version: | 1.8 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description (last modified by )
Warning should be fixed or silenced.
$ python -Wall runtests.py schema /home/tim/code/django/django/db/models/base.py:279: RuntimeWarning: Model 'localbookwithm2m_tags.schema' was already registered. Reloading models is not advised as it can lead to inconsistencies, most notably with related models. new_class._meta.apps.register_model(new_class._meta.app_label, new_class) ./home/tim/code/django/django/db/models/base.py:279: RuntimeWarning: Model 'localbookwithm2m_tags.schema' was already registered. Reloading models is not advised as it can lead to inconsistencies, most notably with related models. new_class._meta.apps.register_model(new_class._meta.app_label, new_class) ..../home/tim/code/django/django/db/models/base.py:279: RuntimeWarning: Model 'localauthorwithm2m_tags.schema' was already registered. Reloading models is not advised as it can lead to inconsistencies, most notably with related models. new_class._meta.apps.register_model(new_class._meta.app_label, new_class) .sss/home/tim/code/django/django/db/models/base.py:279: RuntimeWarning: Model 'localauthorwithm2m_tags.schema' was already registered. Reloading models is not advised as it can lead to inconsistencies, most notably with related models. new_class._meta.apps.register_model(new_class._meta.app_label, new_class) ./home/tim/code/django/django/db/models/base.py:279: RuntimeWarning: Model 'localbookwithm2m_tags.schema' was already registered. Reloading models is not advised as it can lead to inconsistencies, most notably with related models. new_class._meta.apps.register_model(new_class._meta.app_label, new_class) ./home/tim/code/django/django/db/models/base.py:279: RuntimeWarning: Model 'localbookwithm2m_tags.schema' was already registered. Reloading models is not advised as it can lead to inconsistencies, most notably with related models. new_class._meta.apps.register_model(new_class._meta.app_label, new_class) /home/tim/code/django/django/db/models/base.py:279: RuntimeWarning: Model 'localbookwithm2m_uniques.schema' was already registered. Reloading models is not advised as it can lead to inconsistencies, most notably with related models. new_class._meta.apps.register_model(new_class._meta.app_label, new_class) ./home/tim/code/django/django/db/models/base.py:279: RuntimeWarning: Model 'localbookwithm2m_tags.schema' was already registered. Reloading models is not advised as it can lead to inconsistencies, most notably with related models. new_class._meta.apps.register_model(new_class._meta.app_label, new_class) /home/tim/code/django/django/db/models/base.py:279: RuntimeWarning: Model 'localbookwithm2m_uniques.schema' was already registered. Reloading models is not advised as it can lead to inconsistencies, most notably with related models. new_class._meta.apps.register_model(new_class._meta.app_label, new_class)
There is also one warning on the stable/1.7.x branch.
Also:
$ python -Wall runtests.py migrations.test_state /home/tim/code/django/tests/migrations/test_state.py:450: RuntimeWarning: Model 'a.something' was already registered. Reloading models is not advised as it can lead to inconsistencies, most notably with related models. class A(models.Model): /home/tim/code/django/tests/migrations/test_state.py:454: RuntimeWarning: Model 'b.something' was already registered. Reloading models is not advised as it can lead to inconsistencies, most notably with related models. class B(models.Model): ....../home/tim/code/django/tests/migrations/test_state.py:497: RuntimeWarning: Model 'a.something' was already registered. Reloading models is not advised as it can lead to inconsistencies, most notably with related models. class A(models.Model):
Note:
See TracTickets
for help on using tickets.