summaryrefslogtreecommitdiff
path: root/apps/projects/urls.py
blob: 14722a8fbd762681d8f1d075fbf7aee5e03d5dcf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
from django.conf.urls.defaults import *
from django.views.generic.list_detail import object_list
from django.views.generic.simple import redirect_to,direct_to_template
from django.views.generic import list_detail

from projects.models.base import Project

projects = {
    'queryset': Project.objects.filter(status__exact=1).order_by('-pub_date'),
}

urlpatterns = patterns('',
    (r'data/(?P<id>\d+)/$', 'projects.views.data_json'),
    (r'(?P<slug>[-\w]+)/$', 'projects.views.detail'),
    (r'^$',list_detail.object_list, dict(projects, template_name='archives/projects.html')),
)