mirror of
https://github.com/daniviga/django-ram.git
synced 2025-08-04 21:27:49 +02:00
Add support for consist and minor improvements
This commit is contained in:
@@ -1,6 +1,12 @@
|
||||
from django.urls import path
|
||||
|
||||
from portal.views import GetHome, GetHomeFiltered, GetRollingStock
|
||||
from portal.views import (
|
||||
GetHome,
|
||||
GetHomeFiltered,
|
||||
GetRollingStock,
|
||||
GetConsist,
|
||||
Consists,
|
||||
)
|
||||
|
||||
urlpatterns = [
|
||||
path("", GetHome.as_view(), name="index"),
|
||||
@@ -8,15 +14,30 @@ urlpatterns = [
|
||||
path(
|
||||
"search",
|
||||
GetHomeFiltered.as_view(http_method_names=["post"]),
|
||||
name="index_filtered",
|
||||
),
|
||||
path(
|
||||
"search/<str:search>", GetHomeFiltered.as_view(), name="index_filtered"
|
||||
name="search",
|
||||
),
|
||||
path("search/<str:search>", GetHomeFiltered.as_view(), name="search"),
|
||||
path(
|
||||
"search/<str:search>/<int:page>",
|
||||
GetHomeFiltered.as_view(),
|
||||
name="index_filtered_pagination",
|
||||
name="search_pagination",
|
||||
),
|
||||
path("consist", Consists.as_view(), name="consists"),
|
||||
path("consist/<uuid:uuid>", GetConsist.as_view(), name="consist"),
|
||||
path(
|
||||
"consist/<uuid:uuid>/<int:page>",
|
||||
GetConsist.as_view(),
|
||||
name="consist_pagination",
|
||||
),
|
||||
path(
|
||||
"<str:_filter>/<str:search>",
|
||||
GetHomeFiltered.as_view(),
|
||||
name="filtered",
|
||||
),
|
||||
path(
|
||||
"<str:_filter>/<str:search>/<int:page>",
|
||||
GetHomeFiltered.as_view(),
|
||||
name="filtered_pagination",
|
||||
),
|
||||
path("<uuid:uuid>", GetRollingStock.as_view(), name="rolling_stock"),
|
||||
]
|
||||
|
Reference in New Issue
Block a user