зеркало из https://github.com/mozilla/kitsune.git
Clean up wiki.urls.
This commit is contained in:
Родитель
6d6c5ad8dc
Коммит
07193c4df5
|
@ -1,6 +1,25 @@
|
|||
from django.conf.urls.defaults import patterns, url
|
||||
from django.conf.urls.defaults import patterns, url, include
|
||||
|
||||
|
||||
# These URLs inherit (?P<document_slug>[^\/]).
|
||||
document_patterns = patterns('wiki.views',
|
||||
url(r'^$', 'document', name='wiki.document'),
|
||||
url(r'^/revision/(?P<revision_id>\d+)$', 'revision',
|
||||
name='wiki.revision'),
|
||||
url(r'^/history$', 'document_revisions', name='wiki.document_revisions'),
|
||||
url(r'^/edit$', 'edit_document', name='wiki.edit_document'),
|
||||
url(r'^/edit/(?P<revision_id>\d+)$', 'edit_document',
|
||||
name='wiki.new_revision_based_on'),
|
||||
url(r'^/review/(?P<revision_id>\d+)$', 'review_revision',
|
||||
name='wiki.review_revision'),
|
||||
url(r'^/compare$', 'compare_revisions', name='wiki.compare_revisions'),
|
||||
url(r'^/translate$', 'translate', name='wiki.translate'),
|
||||
|
||||
# Un/Subscribe to document edit notifications.
|
||||
url(r'^/watch$', 'watch_document', name='wiki.document_watch'),
|
||||
url(r'^/unwatch$', 'unwatch_document', name='wiki.document_unwatch'),
|
||||
)
|
||||
|
||||
urlpatterns = patterns('wiki.views',
|
||||
|
||||
# TODO: update view to the kb landing/home page when we have it
|
||||
|
@ -18,26 +37,5 @@ urlpatterns = patterns('wiki.views',
|
|||
url(r'^/preview-wiki-content$', 'preview_revision', name='wiki.preview'),
|
||||
url(r'^/category/(?P<category>\d+)$', 'list_documents',
|
||||
name='wiki.category'),
|
||||
url(r'^/(?P<document_slug>[^\/]+)$', 'document',
|
||||
name='wiki.document'),
|
||||
url(r'^/(?P<document_slug>[^\/]+)/revision/(?P<revision_id>\d+)$',
|
||||
'revision', name='wiki.revision'),
|
||||
url(r'^/(?P<document_slug>[^\/]+)/history$',
|
||||
'document_revisions', name='wiki.document_revisions'),
|
||||
url(r'^/(?P<document_slug>[^\/]+)/edit$', 'edit_document',
|
||||
name='wiki.edit_document'),
|
||||
url(r'^/(?P<document_slug>[^\/]+)/edit/(?P<revision_id>\d+)$',
|
||||
'edit_document', name='wiki.new_revision_based_on'),
|
||||
url(r'^/(?P<document_slug>[^\/]+)/review/(?P<revision_id>\d+)$',
|
||||
'review_revision', name='wiki.review_revision'),
|
||||
url(r'^/(?P<document_slug>[^\/]+)/compare$',
|
||||
'compare_revisions', name='wiki.compare_revisions'),
|
||||
url(r'^/(?P<document_slug>[^\/]+)/translate$',
|
||||
'translate', name='wiki.translate'),
|
||||
|
||||
# Un/Subscribe to document edit notifications.
|
||||
url(r'^/(?P<document_slug>[^\/]+)/watch$', 'watch_document',
|
||||
name='wiki.document_watch'),
|
||||
url(r'^/(?P<document_slug>[^\/]+)/unwatch$', 'unwatch_document',
|
||||
name='wiki.document_unwatch'),
|
||||
(r'^/(?P<document_slug>[^\/]+)', include(document_patterns)),
|
||||
)
|
||||
|
|
Загрузка…
Ссылка в новой задаче