mirror of
https://github.com/daniviga/django-ram.git
synced 2025-08-04 13:17:50 +02:00
Major templates and views refactoring
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
from django.urls import path
|
||||
|
||||
from portal.views import (
|
||||
GetHome,
|
||||
GetHomeFiltered,
|
||||
GetData,
|
||||
GetRoster,
|
||||
GetRosterFiltered,
|
||||
GetFlatpage,
|
||||
GetRollingStock,
|
||||
GetConsist,
|
||||
@@ -13,8 +14,9 @@ from portal.views import (
|
||||
)
|
||||
|
||||
urlpatterns = [
|
||||
path("", GetHome.as_view(), name="index"),
|
||||
path("<int:page>", GetHome.as_view(), name="index_pagination"),
|
||||
path("", GetData.as_view(), name="index"),
|
||||
path("roster", GetRoster.as_view(), name="roster"),
|
||||
path("roster/<int:page>", GetRoster.as_view(), name="roster_pagination"),
|
||||
path(
|
||||
"page/<str:flatpage>",
|
||||
GetFlatpage.as_view(),
|
||||
@@ -22,7 +24,7 @@ urlpatterns = [
|
||||
),
|
||||
path(
|
||||
"search",
|
||||
GetHomeFiltered.as_view(http_method_names=["post"]),
|
||||
GetRosterFiltered.as_view(http_method_names=["post"]),
|
||||
name="search",
|
||||
),
|
||||
path("consists", Consists.as_view(), name="consists"),
|
||||
@@ -55,12 +57,12 @@ urlpatterns = [
|
||||
path("scales/<int:page>", Scales.as_view(), name="scales_pagination"),
|
||||
path(
|
||||
"<str:_filter>/<str:search>",
|
||||
GetHomeFiltered.as_view(),
|
||||
GetRosterFiltered.as_view(),
|
||||
name="filtered",
|
||||
),
|
||||
path(
|
||||
"<str:_filter>/<str:search>/<int:page>",
|
||||
GetHomeFiltered.as_view(),
|
||||
GetRosterFiltered.as_view(),
|
||||
name="filtered_pagination",
|
||||
),
|
||||
path("<uuid:uuid>", GetRollingStock.as_view(), name="rolling_stock"),
|
||||
|
Reference in New Issue
Block a user