App index page fails for django-constance

Issue #130 new
Илья Барышев
created an issue

This page is linked /admin/constance/ if default urls are used. Problem is Constance is not a regular django model.

https://github.com/comoga/django-constance 0.6 django-admin-tools 0.5.1

AttributeError: 'Meta' object has no attribute 'concrete_model'

Template error:
In template /home/prophet/envs/myproject/lib/python2.7/site-packages/admin_tools/dashboard/templates/admin/app_index.html, error at line 6
   'Meta' object has no attribute 'concrete_model'
   1 : {% extends "admin/index.html" %} 
   2 : {% load i18n admin_tools_dashboard_tags %} 
   3 : 
   4 : {% if not is_popup %}
   5 : 
   6 : {% block dashboard_css %} {% admin_tools_render_dashboard_css 'app_index' %} {% endblock %}
   7 : {% block breadcrumbs %}
   8 : <div class="breadcrumbs"><a href="../">
   9 : {% trans "Home" %}</a> &rsaquo; 
   10 : {% for app in app_list %}
   11 : {% blocktrans with app.name as name %}{{ name }}{% endblocktrans %}
   12 : {% endfor %}</div>{% endblock %}
   13 : 
   14 : {% endif %} 
   15 : 
   16 : {% block content %}


Traceback:
File "/home/prophet/envs/myproject/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response
  136.                     response = response.render()
File "/home/prophet/envs/myproject/lib/python2.7/site-packages/django/template/response.py" in render
  104.             self._set_content(self.rendered_content)
File "/home/prophet/envs/myproject/lib/python2.7/site-packages/django/template/response.py" in rendered_content
  81.         content = template.render(context)
File "/home/prophet/envs/myproject/lib/python2.7/site-packages/django/template/base.py" in render
  140.             return self._render(context)
File "/home/prophet/envs/myproject/lib/python2.7/site-packages/django/template/base.py" in _render
  134.         return self.nodelist.render(context)
File "/home/prophet/envs/myproject/lib/python2.7/site-packages/django/template/base.py" in render
  823.                 bit = self.render_node(node, context)
File "/home/prophet/envs/myproject/lib/python2.7/site-packages/django/template/debug.py" in render_node
  74.             return node.render(context)
File "/home/prophet/envs/myproject/lib/python2.7/site-packages/django/template/loader_tags.py" in render
  123.         return compiled_parent._render(context)
File "/home/prophet/envs/myproject/lib/python2.7/site-packages/django/template/base.py" in _render
  134.         return self.nodelist.render(context)
File "/home/prophet/envs/myproject/lib/python2.7/site-packages/django/template/base.py" in render
  823.                 bit = self.render_node(node, context)
File "/home/prophet/envs/myproject/lib/python2.7/site-packages/django/template/debug.py" in render_node
  74.             return node.render(context)
File "/home/prophet/envs/myproject/lib/python2.7/site-packages/django/template/loader_tags.py" in render
  123.         return compiled_parent._render(context)
File "/home/prophet/envs/myproject/lib/python2.7/site-packages/django/template/base.py" in _render
  134.         return self.nodelist.render(context)
File "/home/prophet/envs/myproject/lib/python2.7/site-packages/django/template/base.py" in render
  823.                 bit = self.render_node(node, context)
File "/home/prophet/envs/myproject/lib/python2.7/site-packages/django/template/debug.py" in render_node
  74.             return node.render(context)
File "/home/prophet/envs/myproject/lib/python2.7/site-packages/django/template/loader_tags.py" in render
  123.         return compiled_parent._render(context)
File "/home/prophet/envs/myproject/lib/python2.7/site-packages/django/template/base.py" in _render
  134.         return self.nodelist.render(context)
File "/home/prophet/envs/myproject/lib/python2.7/site-packages/django/template/base.py" in render
  823.                 bit = self.render_node(node, context)
File "/home/prophet/envs/myproject/lib/python2.7/site-packages/django/template/debug.py" in render_node
  74.             return node.render(context)
File "/home/prophet/envs/myproject/lib/python2.7/site-packages/django/template/loader_tags.py" in render
  123.         return compiled_parent._render(context)
File "/home/prophet/envs/myproject/lib/python2.7/site-packages/django/template/base.py" in _render
  134.         return self.nodelist.render(context)
File "/home/prophet/envs/myproject/lib/python2.7/site-packages/django/template/base.py" in render
  823.                 bit = self.render_node(node, context)
File "/home/prophet/envs/myproject/lib/python2.7/site-packages/django/template/debug.py" in render_node
  74.             return node.render(context)
File "/home/prophet/envs/myproject/lib/python2.7/site-packages/django/template/loader_tags.py" in render
  62.             result = block.nodelist.render(context)
File "/home/prophet/envs/myproject/lib/python2.7/site-packages/django/template/base.py" in render
  823.                 bit = self.render_node(node, context)
File "/home/prophet/envs/myproject/lib/python2.7/site-packages/django/template/debug.py" in render_node
  74.             return node.render(context)
File "/home/prophet/envs/myproject/lib/python2.7/site-packages/django/template/debug.py" in render
  84.             output = self.filter_expression.resolve(context)
File "/home/prophet/envs/myproject/lib/python2.7/site-packages/django/template/base.py" in resolve
  571.                 obj = self.var.resolve(context)
File "/home/prophet/envs/myproject/lib/python2.7/site-packages/django/template/base.py" in resolve
  721.             value = self._resolve_lookup(context)
File "/home/prophet/envs/myproject/lib/python2.7/site-packages/django/template/base.py" in _resolve_lookup
  772.                             current = current()
File "/home/prophet/envs/myproject/lib/python2.7/site-packages/django/template/loader_tags.py" in super
  72.             return mark_safe(self.render(self.context))
File "/home/prophet/envs/myproject/lib/python2.7/site-packages/django/template/loader_tags.py" in render
  62.             result = block.nodelist.render(context)
File "/home/prophet/envs/myproject/lib/python2.7/site-packages/django/template/base.py" in render
  823.                 bit = self.render_node(node, context)
File "/home/prophet/envs/myproject/lib/python2.7/site-packages/django/template/debug.py" in render_node
  74.             return node.render(context)
File "/home/prophet/envs/myproject/lib/python2.7/site-packages/django/template/loader_tags.py" in render
  62.             result = block.nodelist.render(context)
File "/home/prophet/envs/myproject/lib/python2.7/site-packages/django/template/base.py" in render
  823.                 bit = self.render_node(node, context)
File "/home/prophet/envs/myproject/lib/python2.7/site-packages/django/template/debug.py" in render_node
  74.             return node.render(context)
File "/home/prophet/envs/myproject/lib/python2.7/site-packages/django/template/loader_tags.py" in render
  62.             result = block.nodelist.render(context)
File "/home/prophet/envs/myproject/lib/python2.7/site-packages/django/template/base.py" in render
  823.                 bit = self.render_node(node, context)
File "/home/prophet/envs/myproject/lib/python2.7/site-packages/django/template/debug.py" in render_node
  74.             return node.render(context)
File "/home/prophet/envs/myproject/lib/python2.7/site-packages/django/template/loader_tags.py" in render
  62.             result = block.nodelist.render(context)
File "/home/prophet/envs/myproject/lib/python2.7/site-packages/django/template/base.py" in render
  823.                 bit = self.render_node(node, context)
File "/home/prophet/envs/myproject/lib/python2.7/site-packages/django/template/debug.py" in render_node
  74.             return node.render(context)
File "/home/prophet/envs/myproject/lib/python2.7/site-packages/django/template/base.py" in render
  1178.                     _dict = func(*resolved_args, **resolved_kwargs)
File "/home/prophet/envs/myproject/lib/python2.7/site-packages/admin_tools/dashboard/templatetags/admin_tools_dashboard_tags.py" in admin_tools_render_dashboard_css
  106.         dashboard = get_dashboard(context, location)
File "/home/prophet/envs/myproject/lib/python2.7/site-packages/admin_tools/dashboard/utils.py" in get_dashboard
  22.         return get_app_index_dashboard(context)
File "/home/prophet/envs/myproject/lib/python2.7/site-packages/admin_tools/dashboard/utils.py" in get_app_index_dashboard
  84.     ), context)(app_title, model_list)
File "/home/prophet/envs/myproject/lib/python2.7/site-packages/admin_tools/dashboard/dashboards.py" in __init__
  305.                 include_list=self.get_app_content_types(),
File "/home/prophet/envs/myproject/lib/python2.7/site-packages/admin_tools/dashboard/dashboards.py" in get_app_content_types
  200.                 in self.get_app_model_classes()]
File "/home/prophet/envs/myproject/lib/python2.7/site-packages/django/contrib/contenttypes/models.py" in get_for_model
  32.         opts = self._get_opts(model)
File "/home/prophet/envs/myproject/lib/python2.7/site-packages/django/contrib/contenttypes/models.py" in _get_opts
  20.         return model._meta.concrete_model._meta

Comments (0)

  1. Log in to comment