0

使用 django-pendulum 并尝试让它与最新的 Django 1.6 一起工作。使用示例空白项目,尝试反转 url 似乎会中断。我什至逃脱了模板中的 {url..} 语法,但没有运气。关于如何将其修复为使用 1.6 的任何想法?它在 1.5 中有效!

编辑 - 这是错误:

NoReverseMatch at /pendulum/
Reverse for 'pendulum-clock-in' with arguments '()' and keyword arguments '{}' not found. 0 pattern(s) tried: []
Request Method: GET
Request URL:    http://localhost:8000/pendulum/
Django Version: 1.6
Exception Type: NoReverseMatch
Exception Value:    
Reverse for 'pendulum-clock-in' with arguments '()' and keyword arguments '{}' not found. 0 pattern(s) tried: []

Error during template rendering

In template C:\Python27\lib\site-packages\django_pendulum-0.1.6_pre4-py2.7.egg\pendulum\templates\pendulum\pendulum_base.html, error at line 8
Reverse for 'pendulum-clock-in' with arguments '()' and keyword arguments '{}' not found. 0 pattern(s) tried: []
1   {% extends 'base.html' %}
2   
3   {% block content %}
4   {% block pendulum-controls %}
5   <div id="pendulum-controls">
6       <ul class="pendulum-controls">
7   {#        <li><strong>{{ emp }}</strong></li>#}
8           <li><a href="{% url 'pendulum-clock-in' %}">Clock In</a></li>
4

0 回答 0