示例#1
0
)

# Document URLs
urlpatterns += patterns(
    '',
    url(_(r'^(?P<space_url>\w+)/docs/add/$'),
        AddDocument.as_view(),
        name='add-document'),
    url(_(r'^(?P<space_url>\w+)/docs/(?P<doc_id>\d+)/edit/$'),
        EditDocument.as_view(),
        name='edit-document'),
    url(_(r'^(?P<space_url>\w+)/docs/(?P<doc_id>\d+)/delete/$'),
        DeleteDocument.as_view(),
        name='delete-document'),
    url(_(r'^(?P<space_url>\w+)/docs/$'),
        ListDocs.as_view(),
        name='list-documents'),
)

# Event URLs
urlpatterns += patterns(
    '',
    url(_(r'^(?P<space_url>\w+)/event/add/$'),
        AddEvent.as_view(),
        name='add-event'),
    url(_(r'^(?P<space_url>\w+)/event/(?P<event_id>\d+)/edit/$'),
        EditEvent.as_view(),
        name='edit-event'),
    url(_(r'^(?P<space_url>\w+)/event/(?P<event_id>\d+)/delete/$'),
        DeleteEvent.as_view(),
        name='delete-event'),
示例#2
0
)

# Document URLs
urlpatterns += patterns('',

    url(_(r'^(?P<space_url>\w+)/docs/add/$'), AddDocument.as_view(),
        name=DOCUMENT_ADD),

    url(_(r'^(?P<space_url>\w+)/docs/(?P<doc_id>\d+)/edit/$'),
        EditDocument.as_view(), name=DOCUMENT_EDIT),

    url(_(r'^(?P<space_url>\w+)/docs/(?P<doc_id>\d+)/delete/$'),
        DeleteDocument.as_view(), name=DOCUMENT_DELETE),

    url(_(r'^(?P<space_url>\w+)/docs/$'), ListDocs.as_view(),
        name=DOCUMENT_LIST),

)

# Event URLs
urlpatterns += patterns('',

    url(_(r'^(?P<space_url>\w+)/event/add/$'), AddEvent.as_view(),
        name=EVENT_ADD),

    url(_(r'^(?P<space_url>\w+)/event/(?P<event_id>\d+)/edit/$'),
        EditEvent.as_view(), name=EVENT_EDIT),

    url(_(r'^(?P<space_url>\w+)/event/(?P<event_id>\d+)/delete/$'),
        DeleteEvent.as_view(), name=EVENT_DELETE),