首页 > 其他 > 详细

django-配置静态页面

时间:2019-10-03 00:27:44      阅读:171      评论:0      收藏:0      [点我收藏+]

报错

[2019-10-02 21:22:37,447: INFO/MainProcess] Received task: celery_tasks.tasks.generate_static_index_html[cf352555-b383-4f35-b99a-819de89df202]  
[2019-10-02 21:22:37,715: ERROR/ForkPoolWorker-1] Task celery_tasks.tasks.generate_static_index_html[cf352555-b383-4f35-b99a-819de89df202] raised unexpected: NoReverseMatch("Reverse for ‘detail‘ with arguments ‘(5,)‘ and keyword arguments ‘{}‘ not found. 0 pattern(s) tried: []",)
Traceback (most recent call last):
  File "/home/python/.virtualenvs/bj18_py3/lib/python3.5/site-packages/django/core/urlresolvers.py", line 565, in reverse
    extra, resolver = resolver.namespace_dict[ns]
KeyError: dailyfresh.goods

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/python/.virtualenvs/bj18_py3/lib/python3.5/site-packages/django/template/defaulttags.py", line 501, in render
    current_app=current_app)
  File "/home/python/.virtualenvs/bj18_py3/lib/python3.5/site-packages/django/core/urlresolvers.py", line 575, in reverse
    key)
django.core.urlresolvers.NoReverseMatch: dailyfresh.goods is not a registered namespace

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/python/.virtualenvs/bj18_py3/lib/python3.5/site-packages/celery/app/trace.py", line 382, in trace_task
    R = retval = fun(*args, **kwargs)
  File "/home/python/.virtualenvs/bj18_py3/lib/python3.5/site-packages/celery/app/trace.py", line 641, in __protected_call__
    return self.run(*args, **kwargs)
  File "/home/python/bj18/ttsx/dailyfresh/celery_tasks/tasks.py", line 73, in generate_static_index_html
    static_index_html = temp.render(context)
  File "/home/python/.virtualenvs/bj18_py3/lib/python3.5/site-packages/django/template/backends/django.py", line 74, in render
    return self.template.render(context)
  File "/home/python/.virtualenvs/bj18_py3/lib/python3.5/site-packages/django/template/base.py", line 209, in render
    return self._render(context)
  File "/home/python/.virtualenvs/bj18_py3/lib/python3.5/site-packages/django/template/base.py", line 201, in _render
    return self.nodelist.render(context)
  File "/home/python/.virtualenvs/bj18_py3/lib/python3.5/site-packages/django/template/base.py", line 903, in render
    bit = self.render_node(node, context)
  File "/home/python/.virtualenvs/bj18_py3/lib/python3.5/site-packages/django/template/debug.py", line 79, in render_node
    return node.render(context)
  File "/home/python/.virtualenvs/bj18_py3/lib/python3.5/site-packages/django/template/loader_tags.py", line 135, in render
    return compiled_parent._render(context)
  File "/home/python/.virtualenvs/bj18_py3/lib/python3.5/site-packages/django/template/base.py", line 201, in _render
    return self.nodelist.render(context)
  File "/home/python/.virtualenvs/bj18_py3/lib/python3.5/site-packages/django/template/base.py", line 903, in render
    bit = self.render_node(node, context)
  File "/home/python/.virtualenvs/bj18_py3/lib/python3.5/site-packages/django/template/debug.py", line 79, in render_node
    return node.render(context)
  File "/home/python/.virtualenvs/bj18_py3/lib/python3.5/site-packages/django/template/loader_tags.py", line 65, in render
    result = block.nodelist.render(context)
  File "/home/python/.virtualenvs/bj18_py3/lib/python3.5/site-packages/django/template/base.py", line 903, in render
    bit = self.render_node(node, context)
  File "/home/python/.virtualenvs/bj18_py3/lib/python3.5/site-packages/django/template/debug.py", line 79, in render_node
    return node.render(context)
  File "/home/python/.virtualenvs/bj18_py3/lib/python3.5/site-packages/django/template/defaulttags.py", line 217, in render
    nodelist.append(node.render(context))
  File "/home/python/.virtualenvs/bj18_py3/lib/python3.5/site-packages/django/template/defaulttags.py", line 507, in render
    six.reraise(*exc_info)
  File "/home/python/.virtualenvs/bj18_py3/lib/python3.5/site-packages/django/utils/six.py", line 659, in reraise
    raise value
  File "/home/python/.virtualenvs/bj18_py3/lib/python3.5/site-packages/django/template/defaulttags.py", line 493, in render
    url = reverse(view_name, args=args, kwargs=kwargs, current_app=current_app)
  File "/home/python/.virtualenvs/bj18_py3/lib/python3.5/site-packages/django/core/urlresolvers.py", line 579, in reverse
    return force_text(iri_to_uri(resolver._reverse_with_prefix(view, prefix, *args, **kwargs)))
  File "/home/python/.virtualenvs/bj18_py3/lib/python3.5/site-packages/django/core/urlresolvers.py", line 496, in _reverse_with_prefix
    (lookup_view_s, args, kwargs, len(patterns), patterns))
django.core.urlresolvers.NoReverseMatch: Reverse for detail with arguments (5,) and keyword arguments {} not found. 0 pattern(s) tried: []

 

django-配置静态页面

原文:https://www.cnblogs.com/yifengs/p/11618814.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!