all remaining editor pages except space children
This commit is contained in:
parent
2ab1462349
commit
fd4994ba25
6 changed files with 54 additions and 37 deletions
|
@ -1,6 +1,6 @@
|
|||
from django.conf.urls import url
|
||||
|
||||
from c3nav.editor.views import edit, list_objects, main_index, section_detail
|
||||
from c3nav.editor.views import edit, list_objects, main_index, section_detail, space_detail
|
||||
|
||||
|
||||
def add_editor_urls(name, model, parent_name_plural=None, parent_name=None, with_list=True, explicit_edit=False):
|
||||
|
@ -21,9 +21,8 @@ def add_editor_urls(name, model, parent_name_plural=None, parent_name=None, with
|
|||
|
||||
urlpatterns = [
|
||||
url(r'^$', main_index, name='editor.index'),
|
||||
url(r'^sections/(?P<pk>[0-9]+)/$', section_detail, name='editor.section'),
|
||||
url(r'^sections/(?P<pk>[0-9]+)/edit$', edit, name='editor.section.edit', kwargs={'model': 'Section'}),
|
||||
url(r'^sections/create$', edit, name='editor.section.create', kwargs={'model': 'Section'}),
|
||||
url(r'^sections/(?P<pk>[0-9]+)/$', section_detail, name='editor.sections.detail'),
|
||||
url(r'^sections/(?P<section>[0-9]+)/spaces/(?P<pk>[0-9]+)/$', space_detail, name='editor.spaces.detail'),
|
||||
]
|
||||
urlpatterns.extend(add_editor_urls('sections', 'Section', with_list=False, explicit_edit=True))
|
||||
urlpatterns.extend(add_editor_urls('locationgroups', 'LocationGroup'))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue