validate command in 1.1 hides errors in models that used to be shown
|Reported by:||martin maney||Owned by:||Luc Saffre|
|Component:||Database layer (models, ORM)||Version:||1.1|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||yes||Patch needs improvement:||no|
Description (last modified by )
Given a trivial error in a model, running "django manage.py validate" with Django 1.0.2 diagnoses the error, a spelling error/typo, very clearly (traceback trimmed, obviously):
File "/home/rocketry/rocketry/../rocketry/event/models.py", line 5, in <module>[[br]] from django.contrib.contentypes.models import ContentType[[br]] ImportError: No module named contentypes.models
With Django 1.1, it does its damndest to make you think there's something wrong in a completely different direction, making diagnosis damned near impossible:
$ python manage.py validate
Error: One or more models did not validate:
club.shiftworked: 'event' has a relation with model event.Event, which has either not been installed or is abstract.
club.attendance: 'event' has a relation with model event.Event, which has either not been installed or is abstract.
This is a clear regression in usability, at least for those of us whose code is not always flawless. BTW, at least in this case 1.1 produces the same unhelpful message for the shell command, so I don't know how you're supposed to fix bugs in models.py unless you have an older version of Django to hand.
Change History (15)
comment:7 Changed 7 years ago by
|Component:||Uncategorized → Database layer (models, ORM)|
|Owner:||changed from nobody to Luc Saffre|
|Status:||new → assigned|