1 | from django.conf.urls.defaults import *
|
---|
2 | from django.contrib import admin
|
---|
3 | from watusee.work.models import Project
|
---|
4 |
|
---|
5 | admin.autodiscover()
|
---|
6 |
|
---|
7 | work_dict= {
|
---|
8 | 'queryset': Project.objects.all(),
|
---|
9 | 'extra_context' : {
|
---|
10 | 'worksnav' : Project.objects.filter(publish=True),
|
---|
11 | }
|
---|
12 | }
|
---|
13 |
|
---|
14 | urlpatterns = patterns('',
|
---|
15 | # (r'^works/$', 'django.views.generic.list_detail.object_list', dict(work_dict, template_name='works.html', template_object_name='works')),
|
---|
16 | (r'^works/(?P<slug>[-\w]+)/$', 'django.views.generic.list_detail.object_detail', dict(work_dict, slug_field='slug', template_name='work.html', template_object_name='work')),
|
---|
17 | (r'^admin/(.*)', admin.site.root),
|
---|
18 | (r'^site_media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': '/home2/mainderay/webapps/site_media/'}),
|
---|
19 | (r'', include('django.contrib.flatpages.urls')),
|
---|
20 |
|
---|
21 | )
|
---|