#22922: Add a better error messsage or an FAQ entry for InvalidBasesError
-------------------------------------+-------------------------------------
Reporter: bufke | Owner:
Type: | andrewgodwin
Cleanup/optimization | Status: closed
Component: Migrations | Version: 1.7-rc-1
Severity: Release blocker | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by magopian):
I'd like to reopen this, as I believe the error message in its current
state isn't very useful.
However, I'm not sure it's a good idea to reopen it, as this ticket is a
release blocker, and an "even better" error message maybe isn't that
important ;)
Here's an example output:
{{{
Cannot resolve bases for [<django.db.migrations.state.ModelState object at
0x7fd8e82f45d0>, <django.db.migrations.state.ModelState object at
0x109b8e69f476>]
This can happen if you are inheriting models from an app with migrations
(e.g. contrib.auth)
in an app with no migrations; see
https://docs.djangoproject.com/en/1.7/topics/migrations/#dependencies for
more
}}}
I think it would be much more useful to have the model names for which the
bases could not be resolved, eg:
{{{['foo.Bar', 'baz.Cruux']}}}
A proposed modification would be to pass in
{{{['{}.{}'.format(ms.app_label, ms.name) for ms in
new_unrendered_models]}}} instead of simply {{{new_unrendered_models}}}.
As a side note, I'm not sure the space in front of " in an app" should be
there, as it's just after a line-jump, it could (should?) be removed (just
nitpicking ;).
--
Ticket URL: <https://code.djangoproject.com/ticket/22922#comment:8>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/063.7817bf7a7a5a5b434111d9e74edc828e%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.