Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion app/eventyay/control/templates/control/event_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,17 @@ <h1 class="page-header">{% trans "Events" %}</h1>
</td>
</tr>
{% empty %}
<tr><td colspan="8" class="text-muted">{% trans "No events yet." %}</td></tr>
<tr>
<td colspan="8">
<div class="text-center mt-5 text-muted">
<h3>{% trans "No events available" %}</h3>
<p>{% trans "Looks like there are no events yet." %}</p>
<a href="/create" class="btn btn-primary mt-3">
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: Use Django URL reversing instead of a hardcoded "/create" path

This makes the link brittle if the URL pattern changes (e.g., prefixes, namespaces, localization). Use {% url 'event-create' %} (or the appropriate named URL) so the template stays in sync with the URLconf.

Suggested implementation:

      <a href="{% url 'event-create' %}" class="btn btn-primary mt-3">

  1. Ensure that your URLconf defines a URL pattern with the name event-create that points to the event creation view.
  2. If the actual URL name is different or namespaced (e.g., control:event-create), adjust the {% url %} tag accordingly: {% url 'control:event-create' %}.

{% trans "Create Your First Event" %}
</a>
</div>
</td>
</tr>
{% endfor %}
</tbody>
</table>
Expand Down
Loading