Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Commit

Permalink
Remove detail page for Occurrence model
Browse files Browse the repository at this point in the history
Remove view, template, and URL path for Occurrences which do not need
to be routable.
  • Loading branch information
jmurty committed Oct 17, 2016
1 parent 6458673 commit 289ce39
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 26 deletions.
4 changes: 0 additions & 4 deletions icekit_events/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -736,10 +736,6 @@ def save(self, *args, **kwargs):
def title(self):
return unicode(self)

def get_absolute_url(self):
return reverse('icekit_events_occurrence_detail',
args=(self.event.pk, self.pk,))


def get_occurrence_times_for_event(event):
"""
Expand Down
4 changes: 1 addition & 3 deletions icekit_events/templates/icekit_events/event.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@ <h2>Occurrences</h2>
<ul>
{% for occurrence in event.occurrences.all %}
<li>
<a href="{% url 'icekit_events_occurrence_detail' occurrence.event.pk occurrence.pk %}">
{{ occurrence.start }} to {{ occurrence.end }}
</a>
{{ occurrence.start }} to {{ occurrence.end }}
</li>
{% empty %}
<li>No occurrences for this event</li>
Expand Down
4 changes: 1 addition & 3 deletions icekit_events/templates/icekit_events/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@
{% for occurrence in occurrences %}
<ul>
<li>
<a href="{% url 'icekit_events_eventbase_detail' occurrence.event.pk %}">{{ occurrence.event.title }}</a>
&mdash;
<a href="{% url 'icekit_events_occurrence_detail' occurrence.event.pk occurrence.pk %}">{{ occurrence.start }} - {{ occurrence.end }}</a>
{{ occurrence.event.title }} &mdash; {{ occurrence.start }} - {{ occurrence.end }}
</li>
</ul>
{% endfor %}
Expand Down
14 changes: 0 additions & 14 deletions icekit_events/templates/icekit_events/occurrence.html

This file was deleted.

2 changes: 0 additions & 2 deletions icekit_events/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,4 @@
index, name='icekit_events_index'),
url(r'^(?P<event_id>[\d]+)/$',
event, name='icekit_events_eventbase_detail'),
url(r'^(?P<event_id>[\d]+)/(?P<occurrence_id>[\d]+)/$',
occurrence, name='icekit_events_occurrence_detail'),
]

0 comments on commit 289ce39

Please sign in to comment.