Skip to content

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

@JensTimmerman

Description

@JensTimmerman

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 %}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions