Source

django-pim / pcbank / urls.py

Diff from to

pcbank/urls.py

     Cheque
 from pcbank.forms import NewBillForm, NewChequeForm
 from pcbank.feeds import BankingBookmarks
+from pcbank.views import ChequeDetail
 
 urlpatterns = patterns('pcbank.views',
     (r'^$', 'overview'),
     url(r'^ChequeBook/$', 'show_list', {'queryset':Cheque.objects.all()}, name='list-cheques'),
     url(r'^ChequeBook/add.py$', 'create', {'model':Cheque, 'form_class':NewChequeForm}, name='add-cheque'),
     url(r'^ChequeBook/(?P<cheque_id>\d+)/assign_transaction.py$', 'assign_transaction', name='assign-transaction'),
-    url(r'^ChequeBook/(?P<slug>\d+)/$', 'details', {'queryset':Cheque.objects.all(), 'slug_field':'number'}, name='view-cheque'),
+    url(r'^ChequeBook/(?P<slug>\d+)/$', ChequeDetail.as_view(), name='view-cheque'),
+    url(r'^ChequeBook/(?P<cheque_id>\d+)/upload_cheque.py$', 'upload_cheque', name='upload-cheque'),
     url(r'^Roommate/add.py$', 'create', {'model':Roommate}, name='add-roommate'),
     url(r'^Roommate/$', 'show_list', {'queryset':Roommate.objects.filter(active=True)}, name='list-roommate'),
     url(r'^Roommate/(?P<object_id>\d+)/edit.py$', 'update', {'model':Roommate}, name='edit-roommate'),