darklow / django-suit

Modern theme for Django admin interface
http://djangosuit.com/
Other
2.33k stars 705 forks source link

'suit_tags' is not a valid tag library #639

Open emper0r opened 7 years ago

emper0r commented 7 years ago

Hi ,

this bug is just showing the login page,

at Ubuntu 17.04 works fine, at Debian 8 stable don't.

Environment:

Request Method: GET Request URL: http://127.0.0.1:8000/login/?next=/

Django Version: 1.8.7 Python Version: 2.7.13 Installed Applications: ('suit', 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'License', 'Proxy', 'Network', 'Routing', 'Configurazione', 'DashBoard') Installed Middleware: ('django.contrib.sessions.middleware.SessionMiddleware', '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')

Traceback: File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py" in get_response

  1. response = response.render() File "/usr/local/lib/python2.7/dist-packages/django/template/response.py" in render
  2. self.content = self.rendered_content File "/usr/local/lib/python2.7/dist-packages/django/template/response.py" in rendered_content
  3. content = template.render(context, self._request) File "/usr/local/lib/python2.7/dist-packages/django/template/backends/django.py" in render
  4. return self.template.render(context) File "/usr/local/lib/python2.7/dist-packages/django/template/base.py" in render
  5. return self._render(context) File "/usr/local/lib/python2.7/dist-packages/django/template/base.py" in _render
  6. return self.nodelist.render(context) File "/usr/local/lib/python2.7/dist-packages/django/template/base.py" in render
  7. bit = self.render_node(node, context) File "/usr/local/lib/python2.7/dist-packages/django/template/base.py" in render_node
  8. return node.render(context) File "/usr/local/lib/python2.7/dist-packages/django/template/loader_tags.py" in render
  9. return compiled_parent._render(context) File "/usr/local/lib/python2.7/dist-packages/django/template/base.py" in _render
  10. return self.nodelist.render(context) File "/usr/local/lib/python2.7/dist-packages/django/template/base.py" in render
  11. bit = self.render_node(node, context) File "/usr/local/lib/python2.7/dist-packages/django/template/base.py" in render_node
  12. return node.render(context) File "/usr/local/lib/python2.7/dist-packages/django/template/loader_tags.py" in render
  13. compiled_parent = self.get_parent(context) File "/usr/local/lib/python2.7/dist-packages/django/template/loader_tags.py" in get_parent
  14. return context.template.engine.get_template(parent) File "/usr/local/lib/python2.7/dist-packages/django/template/engine.py" in get_template
  15. template, origin = self.find_template(template_name, dirs) File "/usr/local/lib/python2.7/dist-packages/django/template/engine.py" in find_template
  16. source, display_name = loader(name, dirs) File "/usr/local/lib/python2.7/dist-packages/django/template/loaders/base.py" in call
  17. return self.load_template(template_name, template_dirs) File "/usr/local/lib/python2.7/dist-packages/django/template/loaders/base.py" in load_template
  18. template = Template(source, origin, template_name, self.engine) File "/usr/local/lib/python2.7/dist-packages/django/template/base.py" in init
  19. self.nodelist = engine.compile_string(template_string, origin) File "/usr/local/lib/python2.7/dist-packages/django/template/engine.py" in compile_string
  20. return parser.parse() File "/usr/local/lib/python2.7/dist-packages/django/template/base.py" in parse
  21. compiled_result = compile_func(self, token) File "/usr/local/lib/python2.7/dist-packages/django/template/defaulttags.py" in load
  22. (taglib, e))

Exception Type: TemplateSyntaxError at /login/ Exception Value: 'suit_tags' is not a valid tag library: Template library suit_tags not found, tried django.templatetags.suit_tags,django.contrib.admin.templatetags.suit_tags,django.contrib.staticfiles.templatetags.suit_tags

Thanks for the help

benjaoming commented 7 years ago

Either this list is incomplete or you don't have suit properly installed -- or you have created another application called suit.

 tried django.templatetags.suit_tags,django.contrib.admin.templatetags.suit_tags,django.contrib.staticfiles.templatetags.suit_tags

Try

$ python
>>> import suit
>>> print(suit.__file__)
lixianjian commented 7 years ago

I have the same problem,because I install the package with pip. Then I install with the source code,the problem is resolved. I use Python3.5 and Django-1.11.6.