1
|
from django.conf.urls import patterns, url
|
2
|
|
3
|
from calebasse.cbv import ListView, CreateView, DeleteView, UpdateView
|
4
|
|
5
|
from models import PatientRecord
|
6
|
from forms import CreatePatientRecordForm, EditPatientRecordForm
|
7
|
|
8
|
urlpatterns = patterns('',
|
9
|
url(r'^$', ListView.as_view(model=PatientRecord)),
|
10
|
url(r'^new/$', CreateView.as_view(model=PatientRecord,
|
11
|
form_class=CreatePatientRecordForm,
|
12
|
template_name_suffix='_new')),
|
13
|
url(r'^(?P<pk>\d+)/$', UpdateView.as_view(model=PatientRecord,
|
14
|
form_class=EditPatientRecordForm,
|
15
|
template_name_suffix='_edit')),
|
16
|
url(r'^(?P<pk>\d+)/delete/$', DeleteView.as_view(model=PatientRecord)),
|
17
|
)
|