From e233d15de3327de3a796a33dcd3a153a26836f4c Mon Sep 17 00:00:00 2001 From: Thomas Steen Rasmussen Date: Wed, 8 Mar 2017 02:01:38 +0100 Subject: [PATCH] use include for this --- src/bornhack/urls.py | 50 ++++++++++++++++++++++++-------------------- 1 file changed, 27 insertions(+), 23 deletions(-) diff --git a/src/bornhack/urls.py b/src/bornhack/urls.py index db7f7e35..47bbf47d 100644 --- a/src/bornhack/urls.py +++ b/src/bornhack/urls.py @@ -131,29 +131,33 @@ urlpatterns = [ name='schedule_index' ), url( - r'^speakers/$', - SpeakerListView.as_view(), - name='speaker_index' - ), - url( - r'^speakers/create/$', - SpeakerCreateView.as_view(), - name='speaker_create' - ), - url( - r'^speakers/(?P[-_\w+]+)/edit/$', - SpeakerEditView.as_view(), - name='speaker_edit' - ), - url( - r'^speakers/(?P[-_\w+]+)/$', - SpeakerDetailView.as_view(), - name='speaker_detail' - ), - url( - r'^speakers/(?P[-_\w+]+)/pictures/(?P[-_\w+]+)/$', - SpeakerPictureView.as_view(), - name='speaker_picture', + r'^speakers/', include([ + url( + r'^$', + SpeakerListView.as_view(), + name='speaker_index' + ), + url( + r'^create/$', + SpeakerCreateView.as_view(), + name='speaker_create' + ), + url( + r'^(?P[-_\w+]+)/$', + SpeakerDetailView.as_view(), + name='speaker_detail' + ), + url( + r'^(?P[-_\w+]+)/edit/$', + SpeakerEditView.as_view(), + name='speaker_edit' + ), + url( + r'^(?P[-_\w+]+)/pictures/(?P[-_\w+]+)/$', + SpeakerPictureView.as_view(), + name='speaker_picture', + ), + ]), ), url( r'^events/$',