Example #1
0
                           lend,
                           name='documents.lend'),
                       url(r'^missing/(?P<pk>\w\d+)/$',
                           missing,
                           name='documents.miss'),
                       url(r'^lost/(?P<pk>\w\d+)/$',
                           lost,
                           name='documents.lost'),
                       url(r'^unlend/(?P<pk>\w\d+)/$',
                           unlend,
                           name='documents.unlend'),
                       url(r'^edit/(?P<pk>\w\d+)/$',
                           DocumentChangeView.as_view(),
                           name='documents.edit'),
                       url(r'^new/$',
                           DocumentCreateView.as_view(),
                           name='documents.new'),
                       url(r'^export/$',
                           ExportView.as_view(),
                           name='documents.export'),
                       url(r'^export/allegro/$',
                           export_allegro,
                           name='documents.export.allegro'),
                       url(r'^export/bibtex/$',
                           export_bibtex,
                           name='documents.export.bibtex'),
                       url(r'^users/(?P<pk>\w+)/$',
                           NonUserDetailView.as_view(),
                           name='documents.external')
                       )
Example #2
0
from django.conf.urls import patterns, include, url
from documents.views import DocumentListView, DocumentCreateView, DocumentUpdateView
from django.contrib.auth.decorators import permission_required

urlpatterns = patterns('',
	url(r'^$', DocumentListView.as_view(), name='document_view'),
 	url(r'^add/$',permission_required('classlists.is_kksastaff', login_url='/registration/login/')(DocumentCreateView.as_view())),
 	url(r'^modify/(?P<pk>\d+)/$',permission_required('classlists.is_kksastaff', login_url='/registration/login/')(DocumentUpdateView.as_view())),
 							
	)
Example #3
0
from django.conf.urls.defaults import patterns, include, url
from documents.views import DocumentListView, DocumentCreateView, DocumentUpdateView
from django.contrib.auth.decorators import user_passes_test

urlpatterns = patterns('',
	url(r'^$', DocumentListView.as_view(), name='document-list-view'),
 	url(r'^add/$',user_passes_test(lambda u:u.is_staff)(DocumentCreateView.as_view())),
 	url(r'^modify/(?P<pk>\d+)/$',user_passes_test(lambda u:u.is_staff)(DocumentUpdateView.as_view())),
 							
	)
Example #4
0
# created by Navaneeth S, [email protected]
from django.conf.urls import url

from documents.views import DocumentListView, DocumentCreateView, DocumentDeleteView, DocumentUpdateView

urlpatterns = [
    url(r'^$', DocumentListView.as_view(), name='document'),
    url(r'^create/$', DocumentCreateView.as_view(), name='document_create'),
    url(r'^(?P<pk>[0-9]+)/update/$', DocumentUpdateView.as_view(), name='document_update'),
    url(r'^(?P<pk>[0-9]+)/delete/$', DocumentDeleteView.as_view(), name='document_delete'),
]