Example #1
0
"""Urls for the Zinnia categories"""
from django.conf.urls import url
from django.conf.urls import patterns

from zinnia.urls import _
from zinnia.views.categories import CategoryList
from zinnia.views.categories import CategoryDetail


urlpatterns = patterns(
    '',
    url(r'^$',
        CategoryList.as_view(),
        name='zinnia_category_list'),
    url(_(r'^(?P<path>[-\/\w]+)/page/(?P<page>\d+)/$'),
        CategoryDetail.as_view(),
        name='zinnia_category_detail_paginated'),
    url(r'^(?P<path>[-\/\w]+)/$',
        CategoryDetail.as_view(),
        name='zinnia_category_detail'),
)
Example #2
0
"""Urls for the Zinnia categories"""
from django.urls import path

from zinnia.urls import _
from zinnia.views.categories import CategoryDetail
from zinnia.views.categories import CategoryList

urlpatterns = [
    path('', CategoryList.as_view(), name='category_list'),
    path(_('<path:path>/page/<int:page>/'),
         CategoryDetail.as_view(),
         name='category_detail_paginated'),
    path('<path:path>/', CategoryDetail.as_view(), name='category_detail'),
]