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

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
from django.conf.urls.defaults import *
from django.conf import settings
from programos.models import Project

try:
    PAGINATE = settings.NEWS_PAGINATE_BY
except:
    PAGINATE = 2

project = Project()
projects_dict = {
    'queryset': project.published(),
    'template_object_name': 'item',
}

urlpatterns = patterns('django.views.generic.list_detail',
    url(r'^$', 'object_list', dict(projects_dict,
                                   paginate_by=PAGINATE),
        name="projects-index"),
)