30 # The fact that you are presently reading this means that you have had |
30 # The fact that you are presently reading this means that you have had |
31 # knowledge of the CeCILL-B license and that you accept its terms. |
31 # knowledge of the CeCILL-B license and that you accept its terms. |
32 # |
32 # |
33 |
33 |
34 from django.conf.urls import patterns, include, url |
34 from django.conf.urls import patterns, include, url |
35 from django.contrib import admin |
35 #from django.contrib import admin |
36 from django.contrib.auth import urls as auth_urls |
36 from django.contrib.auth import urls as auth_urls |
37 from django.contrib.auth.decorators import login_required |
37 from django.contrib.auth.decorators import login_required |
38 |
38 |
39 from p4l.search.views import RecordSearchView |
39 from p4l.search.views import RecordSearchView |
40 from p4l.views import RecordDetailView, RecordEditView, RecordDeleteView |
40 from p4l.views import RecordDetailView, RecordEditView, RecordDeleteView |
|
41 from p4l import admin |
41 |
42 |
42 |
43 |
43 js_info_dict = { |
44 js_info_dict = { |
44 'packages': ('p4l',), |
45 'packages': ('p4l',), |
45 'domain': 'django', |
46 'domain': 'django', |
46 } |
47 } |
47 |
48 |
48 admin.autodiscover() |
49 #admin.autodiscover() |
49 |
50 |
50 urlpatterns = patterns('', |
51 urlpatterns = patterns('', |
51 url(r'^$', login_required(RecordSearchView.as_view()), name='p4l_home'), |
52 url(r'^$', login_required(RecordSearchView.as_view()), name='p4l_home'), |
52 url(r'^auth/', include(auth_urls)), |
53 url(r'^auth/', include(auth_urls)), |
53 url(r'^record/view/(?P<slug>\w+)$', login_required(RecordDetailView.as_view()), name='p4l_record_view'), |
54 url(r'^record/view/(?P<slug>\w+)$', login_required(RecordDetailView.as_view()), name='p4l_record_view'), |