use python3 and django1.10 with @refreshable feature has error
Closed this issue · 3 comments
Environment:
Request Method: GET
Request URL: http://127.0.0.1:8000/admin/
Django Version: 1.10.5
Python Version: 3.5.2
Installed Applications:
['suit',
'import_export',
'common',
'cmdb',
'saltjob',
'nested_inline',
'mptt',
'tools_manager',
'rest_framework',
'deploy_manager',
'django_crontab',
'dashboard',
'django.contrib.admindocs',
'django.contrib.admin.apps.SimpleAdminConfig',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'djcelery',
'kombu.transport.django',
'suit_dashboard']
Installed Middleware:
['django.contrib.admindocs.middleware.XViewMiddleware',
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware']
Template error:
In template /Users/kira/oschina/saltops/dashboard/templates/dashboard/main.html, error at line 0
Reverse for 'machine_usage_chart' with arguments '()' and keyword arguments '{}' not found. 0 pattern(s) tried: [] 1 : {% extends "suit_dashboard/base.html" %}
2 : {% load i18n admin_static %}
3 :
4 : {% block title %}
5 : SaltOps
6 : {% endblock %}
Traceback:
File "/Users/kira/envs/ops/lib/python3.5/site-packages/django/core/handlers/exception.py" in inner
39. response = get_response(request)
File "/Users/kira/envs/ops/lib/python3.5/site-packages/django/core/handlers/base.py" in _get_response
217. response = self.process_exception_by_middleware(e, request)
File "/Users/kira/envs/ops/lib/python3.5/site-packages/django/core/handlers/base.py" in _get_response
215. response = response.render()
File "/Users/kira/envs/ops/lib/python3.5/site-packages/django/template/response.py" in render
109. self.content = self.rendered_content
File "/Users/kira/envs/ops/lib/python3.5/site-packages/django/template/response.py" in rendered_content
86. content = template.render(context, self._request)
File "/Users/kira/envs/ops/lib/python3.5/site-packages/django/template/backends/django.py" in render
66. return self.template.render(context)
File "/Users/kira/envs/ops/lib/python3.5/site-packages/django/template/base.py" in render
208. return self._render(context)
File "/Users/kira/envs/ops/lib/python3.5/site-packages/django/template/base.py" in _render
199. return self.nodelist.render(context)
File "/Users/kira/envs/ops/lib/python3.5/site-packages/django/template/base.py" in render
994. bit = node.render_annotated(context)
File "/Users/kira/envs/ops/lib/python3.5/site-packages/django/template/base.py" in render_annotated
961. return self.render(context)
File "/Users/kira/envs/ops/lib/python3.5/site-packages/django/template/loader_tags.py" in render
174. return compiled_parent._render(context)
File "/Users/kira/envs/ops/lib/python3.5/site-packages/django/template/base.py" in _render
199. return self.nodelist.render(context)
File "/Users/kira/envs/ops/lib/python3.5/site-packages/django/template/base.py" in render
994. bit = node.render_annotated(context)
File "/Users/kira/envs/ops/lib/python3.5/site-packages/django/template/base.py" in render_annotated
961. return self.render(context)
File "/Users/kira/envs/ops/lib/python3.5/site-packages/django/template/loader_tags.py" in render
174. return compiled_parent._render(context)
File "/Users/kira/envs/ops/lib/python3.5/site-packages/django/template/base.py" in _render
199. return self.nodelist.render(context)
File "/Users/kira/envs/ops/lib/python3.5/site-packages/django/template/base.py" in render
994. bit = node.render_annotated(context)
File "/Users/kira/envs/ops/lib/python3.5/site-packages/django/template/base.py" in render_annotated
961. return self.render(context)
File "/Users/kira/envs/ops/lib/python3.5/site-packages/django/template/loader_tags.py" in render
174. return compiled_parent._render(context)
File "/Users/kira/envs/ops/lib/python3.5/site-packages/django/template/base.py" in _render
199. return self.nodelist.render(context)
File "/Users/kira/envs/ops/lib/python3.5/site-packages/django/template/base.py" in render
994. bit = node.render_annotated(context)
File "/Users/kira/envs/ops/lib/python3.5/site-packages/django/template/base.py" in render_annotated
961. return self.render(context)
File "/Users/kira/envs/ops/lib/python3.5/site-packages/django/template/loader_tags.py" in render
70. result = block.nodelist.render(context)
File "/Users/kira/envs/ops/lib/python3.5/site-packages/django/template/base.py" in render
994. bit = node.render_annotated(context)
File "/Users/kira/envs/ops/lib/python3.5/site-packages/django/template/base.py" in render_annotated
961. return self.render(context)
File "/Users/kira/envs/ops/lib/python3.5/site-packages/django/template/loader_tags.py" in render
70. result = block.nodelist.render(context)
File "/Users/kira/envs/ops/lib/python3.5/site-packages/django/template/base.py" in render
994. bit = node.render_annotated(context)
File "/Users/kira/envs/ops/lib/python3.5/site-packages/django/template/base.py" in render_annotated
961. return self.render(context)
File "/Users/kira/envs/ops/lib/python3.5/site-packages/django/template/loader_tags.py" in render
70. result = block.nodelist.render(context)
File "/Users/kira/envs/ops/lib/python3.5/site-packages/django/template/base.py" in render
994. bit = node.render_annotated(context)
File "/Users/kira/envs/ops/lib/python3.5/site-packages/django/template/base.py" in render_annotated
961. return self.render(context)
File "/Users/kira/envs/ops/lib/python3.5/site-packages/django/template/defaulttags.py" in render
209. nodelist.append(node.render_annotated(context))
File "/Users/kira/envs/ops/lib/python3.5/site-packages/django/template/base.py" in render_annotated
961. return self.render(context)
File "/Users/kira/envs/ops/lib/python3.5/site-packages/django/template/loader_tags.py" in render
210. return template.render(context)
File "/Users/kira/envs/ops/lib/python3.5/site-packages/django/template/base.py" in render
210. return self._render(context)
File "/Users/kira/envs/ops/lib/python3.5/site-packages/django/template/base.py" in _render
199. return self.nodelist.render(context)
File "/Users/kira/envs/ops/lib/python3.5/site-packages/django/template/base.py" in render
994. bit = node.render_annotated(context)
File "/Users/kira/envs/ops/lib/python3.5/site-packages/django/template/base.py" in render_annotated
961. return self.render(context)
File "/Users/kira/envs/ops/lib/python3.5/site-packages/django/template/defaulttags.py" in render
209. nodelist.append(node.render_annotated(context))
File "/Users/kira/envs/ops/lib/python3.5/site-packages/django/template/base.py" in render_annotated
961. return self.render(context)
File "/Users/kira/envs/ops/lib/python3.5/site-packages/django/template/defaulttags.py" in render
209. nodelist.append(node.render_annotated(context))
File "/Users/kira/envs/ops/lib/python3.5/site-packages/django/template/base.py" in render_annotated
961. return self.render(context)
File "/Users/kira/envs/ops/lib/python3.5/site-packages/django/template/loader_tags.py" in render
210. return template.render(context)
File "/Users/kira/envs/ops/lib/python3.5/site-packages/django/template/base.py" in render
210. return self._render(context)
File "/Users/kira/envs/ops/lib/python3.5/site-packages/django/template/base.py" in _render
199. return self.nodelist.render(context)
File "/Users/kira/envs/ops/lib/python3.5/site-packages/django/template/base.py" in render
994. bit = node.render_annotated(context)
File "/Users/kira/envs/ops/lib/python3.5/site-packages/django/template/base.py" in render_annotated
961. return self.render(context)
File "/Users/kira/envs/ops/lib/python3.5/site-packages/django/template/defaulttags.py" in render
315. return nodelist.render(context)
File "/Users/kira/envs/ops/lib/python3.5/site-packages/django/template/base.py" in render
994. bit = node.render_annotated(context)
File "/Users/kira/envs/ops/lib/python3.5/site-packages/django/template/base.py" in render_annotated
961. return self.render(context)
File "/Users/kira/envs/ops/lib/python3.5/site-packages/django/template/loader_tags.py" in render
210. return template.render(context)
File "/Users/kira/envs/ops/lib/python3.5/site-packages/django/template/base.py" in render
210. return self._render(context)
File "/Users/kira/envs/ops/lib/python3.5/site-packages/django/template/base.py" in _render
199. return self.nodelist.render(context)
File "/Users/kira/envs/ops/lib/python3.5/site-packages/django/template/base.py" in render
994. bit = node.render_annotated(context)
File "/Users/kira/envs/ops/lib/python3.5/site-packages/django/template/base.py" in render_annotated
961. return self.render(context)
File "/Users/kira/envs/ops/lib/python3.5/site-packages/django/template/defaulttags.py" in render
315. return nodelist.render(context)
File "/Users/kira/envs/ops/lib/python3.5/site-packages/django/template/base.py" in render
994. bit = node.render_annotated(context)
File "/Users/kira/envs/ops/lib/python3.5/site-packages/django/template/base.py" in render_annotated
961. return self.render(context)
File "/Users/kira/envs/ops/lib/python3.5/site-packages/django/template/defaulttags.py" in render
209. nodelist.append(node.render_annotated(context))
File "/Users/kira/envs/ops/lib/python3.5/site-packages/django/template/base.py" in render_annotated
961. return self.render(context)
File "/Users/kira/envs/ops/lib/python3.5/site-packages/django/template/defaulttags.py" in render
315. return nodelist.render(context)
File "/Users/kira/envs/ops/lib/python3.5/site-packages/django/template/base.py" in render
994. bit = node.render_annotated(context)
File "/Users/kira/envs/ops/lib/python3.5/site-packages/django/template/base.py" in render_annotated
961. return self.render(context)
File "/Users/kira/envs/ops/lib/python3.5/site-packages/django/template/defaulttags.py" in render
315. return nodelist.render(context)
File "/Users/kira/envs/ops/lib/python3.5/site-packages/django/template/base.py" in render
994. bit = node.render_annotated(context)
File "/Users/kira/envs/ops/lib/python3.5/site-packages/django/template/base.py" in render_annotated
961. return self.render(context)
File "/Users/kira/envs/ops/lib/python3.5/site-packages/django/template/defaulttags.py" in render
315. return nodelist.render(context)
File "/Users/kira/envs/ops/lib/python3.5/site-packages/django/template/base.py" in render
994. bit = node.render_annotated(context)
File "/Users/kira/envs/ops/lib/python3.5/site-packages/django/template/base.py" in render_annotated
961. return self.render(context)
File "/Users/kira/envs/ops/lib/python3.5/site-packages/django/template/defaulttags.py" in render
510. return self.nodelist.render(context)
File "/Users/kira/envs/ops/lib/python3.5/site-packages/django/template/base.py" in render
994. bit = node.render_annotated(context)
File "/Users/kira/envs/ops/lib/python3.5/site-packages/django/template/base.py" in render_annotated
961. return self.render(context)
File "/Users/kira/envs/ops/lib/python3.5/site-packages/django/template/defaulttags.py" in render
439. url = reverse(view_name, args=args, kwargs=kwargs, current_app=current_app)
File "/Users/kira/envs/ops/lib/python3.5/site-packages/django/urls/base.py" in reverse
91. return force_text(iri_to_uri(resolver._reverse_with_prefix(view, prefix, *args, **kwargs)))
File "/Users/kira/envs/ops/lib/python3.5/site-packages/django/urls/resolvers.py" in _reverse_with_prefix
392. (lookup_view_s, args, kwargs, len(patterns), patterns)
Exception Type: NoReverseMatch at /admin/
Exception Value: Reverse for 'machine_usage_chart' with arguments '()' and keyword arguments '{}' not found. 0 pattern(s) tried: []
Hi, thanks for the report !
I am currently working on refactoring this app. I don't like how it works right now. The next major version will hopefully be better documented, more easy and flexible to use 👍
A hint for your issue : maybe the URL for your refreshable item is not loaded at startup and therefore cannot be found by Django. Make sure that the refreshable method is called at compiling time.
Hi, I just released a new version (2.0.0), you can read the documentation here: http://django-suit-dashboard.readthedocs.io/en/latest/. See more details for real-time widgets (previously called refreshable) in the Widgets section.
Closing since new version has been released.