-
Notifications
You must be signed in to change notification settings - Fork 2
/
urls.py
29 lines (25 loc) · 1.46 KB
/
urls.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
from django.conf.urls.defaults import patterns, include, url
from django.views.generic import ListView, TemplateView
from django.contrib import admin
from django.contrib.auth.views import login, logout
from core.views import FeedbackView
admin.autodiscover()
from logistics.models import Conveyance, Warehouse, Customs
from django.contrib.auth.decorators import login_required
urlpatterns = patterns('',
url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
url(r'^admin/', include(admin.site.urls)),
url(r'^$', login_required(TemplateView.as_view(template_name='dashboard.html'))),
url(r'^accounts/login/$', login),
url(r'^logout/$', logout),
url(r'^about/$', TemplateView.as_view(template_name='about.html')),
url(r'^feedback/$', FeedbackView.as_view(), name='feedback')
)
urlpatterns += patterns('',
url(r'^logistics/conveyances/$',
login_required(ListView.as_view(model=Conveyance, context_object_name='conveyance_list'))),
url(r'^logistics/warehouses/$',
login_required(ListView.as_view(model=Warehouse, context_object_name='warehouse_list'))),
url(r'^logistics/customs/$',
login_required(ListView.as_view(model=Customs, context_object_name='customs_list')))
)