Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'MenuAdmin' object has no attribute '__name__' #38

Open
busla opened this issue Jun 26, 2015 · 1 comment
Open

'MenuAdmin' object has no attribute '__name__' #38

busla opened this issue Jun 26, 2015 · 1 comment

Comments

@busla
Copy link

busla commented Jun 26, 2015

I get the following error on Django 1.7.6 (python 3) after installing with pip.

Environment:


Request Method: GET
Request URL: http://localhost:8000/admin/treemenus/menu/add/

Django Version: 1.7.6
Python Version: 3.4.1
Installed Applications:
('suit',
 'adminsortable',
 'modeltranslation',
 'django.contrib.admin',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'django.contrib.sitemaps',
 'promo',
 'taggit',
 'rosetta',
 'embed_video',
 'treemenus',
 'relatedwidget',
 'inplaceeditform')
Installed Middleware:
('django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.locale.LocaleMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware')


Template error:
In template /Users/nonni/Code/beta-test/venv/lib/python3.4/site-packages/suit/templates/admin/change_form.html, error at line 128
   'MenuAdmin' object has no attribute '__name__'
   118 :             </ul>


   119 :           {% endif %}{% endif %}


   120 :         {% endblock %}


   121 : 


   122 :       {% block sidebar %}{% endblock %}


   123 : 


   124 :       </div>


   125 :       <div class="inner-center-column">


   126 :         {% csrf_token %}{% block form_top %}{% endblock %}


   127 :         {% block suit_form_tabs %}


   128 :            {% if adminform.model_admin.suit_form_tabs %} 


   129 :             <ul id="suit_form_tabs" class="nav nav-tabs nav-tabs-suit" data-tab-prefix="suit-tab">


   130 :               {% for tab in adminform.model_admin.suit_form_tabs %}


   131 :                 <li><a href="#{{ tab.0 }}">{{ tab.1 }}</a></li>{% endfor %}


   132 :             </ul>


   133 :           {% endif %}


   134 :         {% endblock %}


   135 :         <div class="tab-content tab-content-main">


   136 :           {% if is_popup %}


   137 :             <input type="hidden" name="_popup" value="1"/>{% endif %}


   138 :           {% if errors %}


Traceback:
File "/Users/nonni/Code/beta-test/venv/lib/python3.4/site-packages/django/core/handlers/base.py" in get_response
  137.                 response = response.render()
File "/Users/nonni/Code/beta-test/venv/lib/python3.4/site-packages/django/template/response.py" in render
  103.             self.content = self.rendered_content
File "/Users/nonni/Code/beta-test/venv/lib/python3.4/site-packages/django/template/response.py" in rendered_content
  80.         content = template.render(context)
File "/Users/nonni/Code/beta-test/venv/lib/python3.4/site-packages/django/template/base.py" in render
  148.             return self._render(context)
File "/Users/nonni/Code/beta-test/venv/lib/python3.4/site-packages/django/template/base.py" in _render
  142.         return self.nodelist.render(context)
File "/Users/nonni/Code/beta-test/venv/lib/python3.4/site-packages/django/template/base.py" in render
  844.                 bit = self.render_node(node, context)
File "/Users/nonni/Code/beta-test/venv/lib/python3.4/site-packages/django/template/debug.py" in render_node
  80.             return node.render(context)
File "/Users/nonni/Code/beta-test/venv/lib/python3.4/site-packages/django/template/loader_tags.py" in render
  126.         return compiled_parent._render(context)
File "/Users/nonni/Code/beta-test/venv/lib/python3.4/site-packages/django/template/base.py" in _render
  142.         return self.nodelist.render(context)
File "/Users/nonni/Code/beta-test/venv/lib/python3.4/site-packages/django/template/base.py" in render
  844.                 bit = self.render_node(node, context)
File "/Users/nonni/Code/beta-test/venv/lib/python3.4/site-packages/django/template/debug.py" in render_node
  80.             return node.render(context)
File "/Users/nonni/Code/beta-test/venv/lib/python3.4/site-packages/django/template/loader_tags.py" in render
  126.         return compiled_parent._render(context)
File "/Users/nonni/Code/beta-test/venv/lib/python3.4/site-packages/django/template/base.py" in _render
  142.         return self.nodelist.render(context)
File "/Users/nonni/Code/beta-test/venv/lib/python3.4/site-packages/django/template/base.py" in render
  844.                 bit = self.render_node(node, context)
File "/Users/nonni/Code/beta-test/venv/lib/python3.4/site-packages/django/template/debug.py" in render_node
  80.             return node.render(context)
File "/Users/nonni/Code/beta-test/venv/lib/python3.4/site-packages/django/template/loader_tags.py" in render
  126.         return compiled_parent._render(context)
File "/Users/nonni/Code/beta-test/venv/lib/python3.4/site-packages/django/template/base.py" in _render
  142.         return self.nodelist.render(context)
File "/Users/nonni/Code/beta-test/venv/lib/python3.4/site-packages/django/template/base.py" in render
  844.                 bit = self.render_node(node, context)
File "/Users/nonni/Code/beta-test/venv/lib/python3.4/site-packages/django/template/debug.py" in render_node
  80.             return node.render(context)
File "/Users/nonni/Code/beta-test/venv/lib/python3.4/site-packages/django/template/loader_tags.py" in render
  65.                 result = block.nodelist.render(context)
File "/Users/nonni/Code/beta-test/venv/lib/python3.4/site-packages/django/template/base.py" in render
  844.                 bit = self.render_node(node, context)
File "/Users/nonni/Code/beta-test/venv/lib/python3.4/site-packages/django/template/debug.py" in render_node
  80.             return node.render(context)
File "/Users/nonni/Code/beta-test/venv/lib/python3.4/site-packages/django/template/loader_tags.py" in render
  65.                 result = block.nodelist.render(context)
File "/Users/nonni/Code/beta-test/venv/lib/python3.4/site-packages/django/template/base.py" in render
  844.                 bit = self.render_node(node, context)
File "/Users/nonni/Code/beta-test/venv/lib/python3.4/site-packages/django/template/debug.py" in render_node
  80.             return node.render(context)
File "/Users/nonni/Code/beta-test/venv/lib/python3.4/site-packages/django/template/loader_tags.py" in render
  65.                 result = block.nodelist.render(context)
File "/Users/nonni/Code/beta-test/venv/lib/python3.4/site-packages/django/template/base.py" in render
  844.                 bit = self.render_node(node, context)
File "/Users/nonni/Code/beta-test/venv/lib/python3.4/site-packages/django/template/debug.py" in render_node
  80.             return node.render(context)
File "/Users/nonni/Code/beta-test/venv/lib/python3.4/site-packages/django/template/loader_tags.py" in render
  65.                 result = block.nodelist.render(context)
File "/Users/nonni/Code/beta-test/venv/lib/python3.4/site-packages/django/template/base.py" in render
  844.                 bit = self.render_node(node, context)
File "/Users/nonni/Code/beta-test/venv/lib/python3.4/site-packages/django/template/debug.py" in render_node
  80.             return node.render(context)
File "/Users/nonni/Code/beta-test/venv/lib/python3.4/site-packages/django/template/defaulttags.py" in render
  305.                     match = condition.eval(context)
File "/Users/nonni/Code/beta-test/venv/lib/python3.4/site-packages/django/template/defaulttags.py" in eval
  898.         return self.value.resolve(context, ignore_failures=True)
File "/Users/nonni/Code/beta-test/venv/lib/python3.4/site-packages/django/template/base.py" in resolve
  596.                 obj = self.var.resolve(context)
File "/Users/nonni/Code/beta-test/venv/lib/python3.4/site-packages/django/template/base.py" in resolve
  734.             value = self._resolve_lookup(context)
File "/Users/nonni/Code/beta-test/venv/lib/python3.4/site-packages/django/template/base.py" in _resolve_lookup
  791.                                 getcallargs(current)
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/inspect.py" in getcallargs
  1167.     f_name = func.__name__

Exception Type: AttributeError at /admin/treemenus/menu/add/
Exception Value: 'MenuAdmin' object has no attribute '__name__'
@Dharmik8478
Copy link

I have same error in django 1.9rc1. Have you find any solution about that?
below is my error

AttributeError: 'MenuAdmin' object has no attribute 'name'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants