2021-12-22 18:03:21 +00:00
|
|
|
"""URL patterns for the categories app."""
|
2016-02-15 17:54:25 +00:00
|
|
|
from django.conf.urls import url
|
2016-02-15 21:47:21 +00:00
|
|
|
from django.views.generic import ListView
|
2009-07-03 00:23:08 +00:00
|
|
|
|
2021-12-05 14:34:46 +00:00
|
|
|
from . import views
|
|
|
|
|
from .models import Category
|
2013-03-20 11:52:09 +00:00
|
|
|
|
2021-12-05 14:34:46 +00:00
|
|
|
categorytree_dict = {"queryset": Category.objects.filter(level=0)}
|
2009-07-03 00:23:08 +00:00
|
|
|
|
2021-12-05 14:34:46 +00:00
|
|
|
urlpatterns = (url(r"^$", ListView.as_view(**categorytree_dict), name="categories_tree_list"),)
|
2009-07-03 00:23:08 +00:00
|
|
|
|
2021-12-05 14:34:46 +00:00
|
|
|
urlpatterns += (url(r"^(?P<path>.+)/$", views.category_detail, name="categories_category"),)
|