| author | ymh <ymh.work@gmail.com> |
| Sat, 28 Sep 2013 02:55:26 +0200 | |
| changeset 120 | 6ec0300b626e |
| parent 119 | ece69ca3ac24 |
| child 126 | a345f1a67bf1 |
| 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 |
| 117 | 7 |
from p4l.views import RecordDetailView, RecordEditView, RecordDeleteView |
|
113
c05567404888
First version of indexation. Replace the list view by a search view
ymh <ymh.work@gmail.com>
parents:
93
diff
changeset
|
8 |
|
| 0 | 9 |
|
| 39 | 10 |
js_info_dict = { |
11 |
'packages': ('p4l',), |
|
12 |
'domain': 'django', |
|
13 |
} |
|
14 |
||
| 0 | 15 |
admin.autodiscover() |
16 |
||
17 |
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
|
18 |
url(r'^$', login_required(RecordSearchView.as_view()), name='p4l_home'), |
| 24 | 19 |
url(r'^auth/', include(auth_urls)), |
| 40 | 20 |
url(r'^record/view/(?P<slug>\w+)$', login_required(RecordDetailView.as_view()), name='p4l_record_view'), |
| 119 | 21 |
url(r'^record/edit/(?P<slug>[\w\:]+)$', login_required(RecordEditView.as_view()), name='p4l_record_edit'), |
| 117 | 22 |
url(r'^record/new$', login_required(RecordEditView.as_view(is_create_view=True)), name='p4l_record_new'), |
| 92 | 23 |
url(r'^record/delete/(?P<slug>\w+)$', login_required(RecordDeleteView.as_view()), name='p4l_record_delete'), |
| 16 | 24 |
url(r'^api/', include('p4l.api.urls')), |
| 0 | 25 |
|
| 39 | 26 |
url(r'^i18n/', include('django.conf.urls.i18n')), |
27 |
url(r'^jsi18n/$', 'django.views.i18n.javascript_catalog', js_info_dict), |
|
| 0 | 28 |
url(r'^admin/', include(admin.site.urls)), |
| 16 | 29 |
|
| 1 | 30 |
) |