~akl-web-site-team/akl-web-site/django

« back to all changes in this revision

Viewing changes to src/programos/urls.py

  • Committer: Mantas Zimnickas
  • Date: 2010-06-05 16:16:40 UTC
  • Revision ID: sirexas@gmail.com-20100605161640-nmq3o8a25rdf7o9y
Almost working projects list

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
from django.conf.urls.defaults import *
 
2
from django.conf import settings
 
3
from programos.models import Project
 
4
 
 
5
try:
 
6
    PAGINATE = settings.NEWS_PAGINATE_BY
 
7
except:
 
8
    PAGINATE = 2
 
9
 
 
10
project = Project()
 
11
projects_dict = {
 
12
    'queryset': project.published(),
 
13
    'template_object_name': 'item',
 
14
}
 
15
 
 
16
urlpatterns = patterns('django.views.generic.list_detail',
 
17
    url(r'^$', 'object_list', dict(projects_dict,
 
18
                                   paginate_by=PAGINATE),
 
19
        name="projects-index"),
 
20
)