django-agenda
django-agenda copied to clipboard
Reverse for 'agenda-archive-year' Not found in demo template
when you browse to the / dir where the app is configured to run you get the following error:
Caught an exception while rendering: Reverse for 'agenda-archive-year' with arguments '('',)' and keyword arguments '{}' not found.
this is because previous_year and next_year aren't defined, since you didn't supply them.
The demo template assumes it's in the year modus if month wasn't found.
to fix: apply this patch
57,68c57,66
< {% if year %}
< <a href="{% url agenda-archive-year previous_year %}">{{ previous_year}}</a>
< <a href="{% url agenda-archive-year next_year %}">{{ next_year }}</a>
< <h1>{{ year }}</h1>
< {% if months %}
< <ul>
< {% for month in months %}
< <li><a href="{% url agenda-archive-month month.year month.month %}">{{ month|date:"M Y"}}</a></li>
< {% endfor %}
< </ul>
< {% endif %}
< {% endif %}
---
> <a href="{% url agenda-archive-year previous_year %}">{{ previous_year }}</a>
> <a href="{% url agenda-archive-year next_year %}">{{ next_year }}</a>
> <h1>{{ year }}</h1>
> {% if months %}
> <ul>
> {% for month in months %}
> <li><a href="{% url agenda-archive-month month.year month.month %}">{{ month|date:"M Y"}}</a></li>
> {% endfor %}
> </ul>
> {% endif %}
Hey Jens,
As stated in the other issue filed for this project: I endorse people to fork my project for now as I will not maintain the current branch. I am considering large parts of the code to be substandard and there is a general lack of unit tests.
However, as some people are actually using this code right now they will benefit from you fixing this issue and sharing. Other people have already started this, you might want to consider forking of off them - forking is very easy and gives you your own copy of the code to mess around with and do as you please. Currently, the branch forked by glibersat looks sane: http://github.com/glibersat/django-agenda/fork
So: please fork!
Thanks anyway for finding this issue and submitting the patch.