57 lines
2.1 KiB
Python
57 lines
2.1 KiB
Python
# -*- coding: utf-8 -*-
|
|
|
|
'''
|
|
biomon - Signs monitoring and patient management application
|
|
|
|
Copyright (C) 2015 Entr'ouvert
|
|
|
|
This program is free software: you can redistribute it and/or modify
|
|
it under the terms of the GNU Affero General Public License as
|
|
published by the Free Software Foundation, either version 3 of the
|
|
License, or (at your option) any later version.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU Affero General Public License for more details.
|
|
|
|
You should have received a copy of the GNU Affero General Public License
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
'''
|
|
|
|
|
|
from django.conf.urls import patterns, url, include
|
|
from django.conf import settings
|
|
from django.contrib import admin
|
|
from django.views.generic import TemplateView
|
|
from django.contrib.auth.decorators import login_required
|
|
|
|
from . import views
|
|
|
|
admin.autodiscover()
|
|
|
|
urlpatterns = patterns('',
|
|
url(r'^$', login_required(views.PatientList.as_view()), name='patient_list'),
|
|
url(r'^login/$', views.LoginView.as_view(), name='login'),
|
|
url(r'^logout/$', login_required(views.LogoutView.as_view()), name='logout'),
|
|
url(r'^patient/add/$', login_required(views.PatientCreate.as_view()), name='patient_add'),
|
|
url(r'^patient/(?P<pk>\d+)/$', login_required(views.PatientDetail.as_view()), name='patient_detail'),
|
|
url(r'^patient/(?P<pk>\d+)/update/$', login_required(views.PatientUpdate.as_view()), name='patient_update'),
|
|
url(r'^patient/(?P<pk>\d+)/delete/$', login_required(views.PatientDelete.as_view()), name='patient_delete'),
|
|
)
|
|
|
|
other_patterns = patterns('',
|
|
url(r'^admin/', include(admin.site.urls)),
|
|
)
|
|
|
|
urlpatterns += other_patterns
|
|
|
|
urlpatterns += patterns('',
|
|
(r'^patient/(?P<pk>\d+)/livedata_provider/', include('biomon.livedata_provider.urls')),
|
|
)
|
|
|
|
if settings.DEBUG:
|
|
urlpatterns += patterns('django.contrib.staticfiles.views',
|
|
url(r'^static/(?P<path>.*)$', 'serve'),
|
|
)
|