File: urls.py

package info (click to toggle)
django-tables 2.7.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,752 kB
  • sloc: python: 7,120; makefile: 132; sh: 74
file content (38 lines) | stat: -rw-r--r-- 1,360 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
from app.views import (
    ClassBased,
    FilteredPersonListView,
    MultipleTables,
    checkbox,
    country_detail,
    index,
    multiple,
    person_detail,
    template_example,
    tutorial,
)
from django.conf import settings
from django.contrib import admin
from django.urls import include, path
from django.views import static

urlpatterns = [
    path("", index),
    path("multiple/", multiple, name="multiple"),
    path("class-based/", ClassBased.as_view(), name="singletableview"),
    path("class-based-multiple/", MultipleTables.as_view(), name="multitableview"),
    path("class-based-filtered/", FilteredPersonListView.as_view(), name="filtertableview"),
    path("checkbox/", checkbox, name="checkbox"),
    path("tutorial/", tutorial, name="tutorial"),
    path("template/<str:version>/", template_example, name="template_example"),
    path("admin/doc/", include("django.contrib.admindocs.urls")),
    path("admin/", admin.site.urls),
    path("country/<int:pk>/", country_detail, name="country_detail"),
    path("person/<int:pk>/", person_detail, name="person_detail"),
    path("media/<path>", static.serve, {"document_root": settings.MEDIA_ROOT}),
    path("i18n/", include("django.conf.urls.i18n")),
]

if settings.DEBUG:
    import debug_toolbar

    urlpatterns = [path("__debug__/", include(debug_toolbar.urls))] + urlpatterns