| author | ymh <ymh.work@gmail.com> |
| Sat, 21 Sep 2013 23:49:04 +0200 | |
| changeset 114 | 93b45b4f423c |
| parent 113 | c05567404888 |
| child 117 | 0a4e7d6ebe80 |
| permissions | -rw-r--r-- |
| 0 | 1 |
from django.conf.urls import patterns, include, url |
| 16 | 2 |
from django.contrib import admin |
| 24 | 3 |
from django.contrib.auth import urls as auth_urls |
| 40 | 4 |
from django.contrib.auth.decorators import login_required |
|
113
c05567404888
First version of indexation. Replace the list view by a search view
ymh <ymh.work@gmail.com>
parents:
93
diff
changeset
|
5 |
|
|
c05567404888
First version of indexation. Replace the list view by a search view
ymh <ymh.work@gmail.com>
parents:
93
diff
changeset
|
6 |
from p4l.search.views import RecordSearchView |
|
c05567404888
First version of indexation. Replace the list view by a search view
ymh <ymh.work@gmail.com>
parents:
93
diff
changeset
|
7 |
from p4l.views import (RecordDetailView, RecordEditView, RecordDeleteView, |
|
c05567404888
First version of indexation. Replace the list view by a search view
ymh <ymh.work@gmail.com>
parents:
93
diff
changeset
|
8 |
RecordNewView) |
|
c05567404888
First version of indexation. Replace the list view by a search view
ymh <ymh.work@gmail.com>
parents:
93
diff
changeset
|
9 |
|
| 0 | 10 |
|
| 39 | 11 |
js_info_dict = { |
12 |
'packages': ('p4l',), |
|
13 |
'domain': 'django', |
|
14 |
} |
|
15 |
||
| 0 | 16 |
admin.autodiscover() |
17 |
||
18 |
urlpatterns = patterns('', |
|
|
113
c05567404888
First version of indexation. Replace the list view by a search view
ymh <ymh.work@gmail.com>
parents:
93
diff
changeset
|
19 |
url(r'^$', login_required(RecordSearchView.as_view()), name='p4l_home'), |
| 24 | 20 |
url(r'^auth/', include(auth_urls)), |
| 40 | 21 |
url(r'^record/view/(?P<slug>\w+)$', login_required(RecordDetailView.as_view()), name='p4l_record_view'), |
22 |
url(r'^record/edit/(?P<slug>\w+)$', login_required(RecordEditView.as_view()), name='p4l_record_edit'), |
|
| 93 | 23 |
url(r'^record/new$', login_required(RecordNewView.as_view()), name='p4l_record_new'), |
| 92 | 24 |
url(r'^record/delete/(?P<slug>\w+)$', login_required(RecordDeleteView.as_view()), name='p4l_record_delete'), |
| 16 | 25 |
url(r'^api/', include('p4l.api.urls')), |
| 0 | 26 |
|
| 39 | 27 |
url(r'^i18n/', include('django.conf.urls.i18n')), |
28 |
url(r'^jsi18n/$', 'django.views.i18n.javascript_catalog', js_info_dict), |
|
| 0 | 29 |
url(r'^admin/', include(admin.site.urls)), |
| 16 | 30 |
|
| 1 | 31 |
) |