Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reverse for 'agenda-archive-year' Not found in demo template #3

Open
JensTimmerman opened this issue May 19, 2010 · 1 comment
Open

Comments

@JensTimmerman
Copy link

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 %}
@dokterbob
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants