#14639: admin.site.register() does not check if the model is abstract (gives
weird
error)
-------------------------------------------+--------------------------------
Reporter: vdboor | Owner: nobody
Status: new | Milestone:
Component: django.contrib.admin | Version: 1.2
Resolution: | Keywords: error-messages
Stage: Unreviewed | Has_patch: 0
Needs_docs: 0 | Needs_tests: 0
Needs_better_patch: 0 |
-------------------------------------------+--------------------------------
Changes (by vdboor):
* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0
Comment:
Addition: it produces even more weird errors in the admin_tools dashboard,
when viewing a specific app:
{{{
Caught AttributeError while rendering: 'NoneType' object has no attribute
'_meta'
}}}
which happens somewhere in the `contenttypes` framework:
{{{
File "/usr/lib/python2.6/site-
packages/admin_tools/dashboard/templatetags/admin_tools_dashboard_tags.py"
in admin_tools_render_dashboard_css
90. dashboard = get_dashboard(context, location)
File "/usr/lib/python2.6/site-packages/admin_tools/dashboard/utils.py" in
get_dashboard
21. return get_app_index_dashboard(context)
File "/usr/lib/python2.6/site-packages/admin_tools/dashboard/utils.py" in
get_app_index_dashboard
71. return getattr(mod, inst)(app_title, model_list)
File "/usr/lib/python2.6/site-
packages/admin_tools/dashboard/dashboards.py" in __init__
304. include_list=self.get_app_content_types(),
File "/usr/lib/python2.6/site-
packages/admin_tools/dashboard/dashboards.py" in get_app_content_types
184. in self.get_app_model_classes()]
File "/usr/lib/python2.6/site-
packages/django/contrib/contenttypes/models.py" in get_for_model
40. self._add_to_cache(self.db, ct)
File "/usr/lib/python2.6/site-
packages/django/contrib/contenttypes/models.py" in _add_to_cache
70. key = (model._meta.app_label,
model._meta.object_name.lower())
}}}
--
Ticket URL: <http://code.djangoproject.com/ticket/14639#comment:1>
Django <http://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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.