|
1 from django.conf import settings |
|
2 from django.conf.urls.defaults import * |
|
3 |
|
4 if settings.USE_I18N: |
|
5 i18n_view = 'django.views.i18n.javascript_catalog' |
|
6 else: |
|
7 i18n_view = 'django.views.i18n.null_javascript_catalog' |
|
8 |
|
9 urlpatterns = patterns('', |
|
10 ('^$', 'django.contrib.admin.views.main.index'), |
|
11 ('^r/', include('django.conf.urls.shortcut')), |
|
12 ('^jsi18n/$', i18n_view, {'packages': 'django.conf'}), |
|
13 ('^logout/$', 'django.contrib.auth.views.logout'), |
|
14 ('^password_change/$', 'django.contrib.auth.views.password_change'), |
|
15 ('^password_change/done/$', 'django.contrib.auth.views.password_change_done'), |
|
16 ('^template_validator/$', 'django.contrib.admin.views.template.template_validator'), |
|
17 |
|
18 # Documentation |
|
19 ('^doc/$', 'django.contrib.admin.views.doc.doc_index'), |
|
20 ('^doc/bookmarklets/$', 'django.contrib.admin.views.doc.bookmarklets'), |
|
21 ('^doc/tags/$', 'django.contrib.admin.views.doc.template_tag_index'), |
|
22 ('^doc/filters/$', 'django.contrib.admin.views.doc.template_filter_index'), |
|
23 ('^doc/views/$', 'django.contrib.admin.views.doc.view_index'), |
|
24 ('^doc/views/(?P<view>[^/]+)/$', 'django.contrib.admin.views.doc.view_detail'), |
|
25 ('^doc/models/$', 'django.contrib.admin.views.doc.model_index'), |
|
26 ('^doc/models/(?P<app_label>[^\.]+)\.(?P<model_name>[^/]+)/$', 'django.contrib.admin.views.doc.model_detail'), |
|
27 # ('^doc/templates/$', 'django.views.admin.doc.template_index'), |
|
28 ('^doc/templates/(?P<template>.*)/$', 'django.contrib.admin.views.doc.template_detail'), |
|
29 |
|
30 # "Add user" -- a special-case view |
|
31 ('^auth/user/add/$', 'django.contrib.admin.views.auth.user_add_stage'), |
|
32 # "Change user password" -- another special-case view |
|
33 ('^auth/user/(\d+)/password/$', 'django.contrib.admin.views.auth.user_change_password'), |
|
34 |
|
35 # Add/change/delete/history |
|
36 ('^([^/]+)/([^/]+)/$', 'django.contrib.admin.views.main.change_list'), |
|
37 ('^([^/]+)/([^/]+)/add/$', 'django.contrib.admin.views.main.add_stage'), |
|
38 ('^([^/]+)/([^/]+)/(.+)/history/$', 'django.contrib.admin.views.main.history'), |
|
39 ('^([^/]+)/([^/]+)/(.+)/delete/$', 'django.contrib.admin.views.main.delete_stage'), |
|
40 ('^([^/]+)/([^/]+)/(.+)/$', 'django.contrib.admin.views.main.change_stage'), |
|
41 ) |
|
42 |
|
43 del i18n_view |