mirror of
https://github.com/daniviga/django-ram.git
synced 2025-08-04 05:07:50 +02:00
160 lines
4.0 KiB
Python
160 lines
4.0 KiB
Python
from django.urls import path
|
|
|
|
from portal.views import (
|
|
GetData,
|
|
GetRoster,
|
|
GetObjectsFiltered,
|
|
GetManufacturerItem,
|
|
GetFlatpage,
|
|
GetRollingStock,
|
|
GetConsist,
|
|
Consists,
|
|
Companies,
|
|
Manufacturers,
|
|
Scales,
|
|
Types,
|
|
Books,
|
|
GetBook,
|
|
Catalogs,
|
|
GetCatalog,
|
|
SearchObjects,
|
|
)
|
|
|
|
urlpatterns = [
|
|
path("", GetData.as_view(template="home.html"), name="index"),
|
|
path("roster", GetRoster.as_view(), name="roster"),
|
|
path(
|
|
"roster/page/<int:page>",
|
|
GetRoster.as_view(),
|
|
name="roster_pagination"
|
|
),
|
|
path(
|
|
"page/<str:flatpage>",
|
|
GetFlatpage.as_view(),
|
|
name="flatpage",
|
|
),
|
|
path(
|
|
"consists",
|
|
Consists.as_view(template="consists.html"),
|
|
name="consists"
|
|
),
|
|
path(
|
|
"consists/page/<int:page>",
|
|
Consists.as_view(template="consists.html"),
|
|
name="consists_pagination"
|
|
),
|
|
path("consist/<uuid:uuid>", GetConsist.as_view(), name="consist"),
|
|
path(
|
|
"consist/<uuid:uuid>/page/<int:page>",
|
|
GetConsist.as_view(),
|
|
name="consist_pagination",
|
|
),
|
|
path(
|
|
"companies",
|
|
Companies.as_view(template="companies.html"),
|
|
name="companies"
|
|
),
|
|
path(
|
|
"companies/page/<int:page>",
|
|
Companies.as_view(template="companies.html"),
|
|
name="companies_pagination",
|
|
),
|
|
path(
|
|
"manufacturers/<str:category>",
|
|
Manufacturers.as_view(template="manufacturers.html"),
|
|
name="manufacturers"
|
|
),
|
|
path(
|
|
"manufacturers/<str:category>/page/<int:page>",
|
|
Manufacturers.as_view(template="manufacturers.html"),
|
|
name="manufacturers_pagination",
|
|
),
|
|
path(
|
|
"scales",
|
|
Scales.as_view(template="scales.html"),
|
|
name="scales"
|
|
),
|
|
path(
|
|
"scales/page/<int:page>",
|
|
Scales.as_view(template="scales.html"),
|
|
name="scales_pagination"
|
|
),
|
|
path(
|
|
"types",
|
|
Types.as_view(template="types.html"),
|
|
name="types"
|
|
),
|
|
path(
|
|
"types/page/<int:page>",
|
|
Types.as_view(template="types.html"),
|
|
name="types_pagination"
|
|
),
|
|
path(
|
|
"bookshelf/books",
|
|
Books.as_view(template="bookshelf/books.html"),
|
|
name="books"
|
|
),
|
|
path(
|
|
"bookshelf/books/page/<int:page>",
|
|
Books.as_view(template="bookshelf/books.html"),
|
|
name="books_pagination"
|
|
),
|
|
path("bookshelf/book/<uuid:uuid>", GetBook.as_view(), name="book"),
|
|
path(
|
|
"bookshelf/catalogs",
|
|
Catalogs.as_view(template="bookshelf/books.html"),
|
|
name="catalogs"
|
|
),
|
|
path(
|
|
"bookshelf/catalogs/page/<int:page>",
|
|
Catalogs.as_view(template="bookshelf/books.html"),
|
|
name="catalogs_pagination"
|
|
),
|
|
path(
|
|
"bookshelf/catalog/<uuid:uuid>",
|
|
GetCatalog.as_view(),
|
|
name="catalog"
|
|
),
|
|
path(
|
|
"search",
|
|
SearchObjects.as_view(http_method_names=["post"]),
|
|
name="search",
|
|
),
|
|
path(
|
|
"search/<str:search>/page/<int:page>",
|
|
SearchObjects.as_view(),
|
|
name="search_pagination",
|
|
),
|
|
path(
|
|
"manufacturer/<str:manufacturer>",
|
|
GetManufacturerItem.as_view(),
|
|
name="manufacturer",
|
|
),
|
|
path(
|
|
"manufacturer/<str:manufacturer>/page/<int:page>",
|
|
GetManufacturerItem.as_view(),
|
|
name="manufacturer_pagination",
|
|
),
|
|
path(
|
|
"manufacturer/<str:manufacturer>/<str:search>",
|
|
GetManufacturerItem.as_view(),
|
|
name="manufacturer",
|
|
),
|
|
path(
|
|
"manufacturer/<str:manufacturer>/<str:search>/page/<int:page>",
|
|
GetManufacturerItem.as_view(),
|
|
name="manufacturer_pagination",
|
|
),
|
|
path(
|
|
"<str:_filter>/<str:search>",
|
|
GetObjectsFiltered.as_view(),
|
|
name="filtered",
|
|
),
|
|
path(
|
|
"<str:_filter>/<str:search>/page/<int:page>",
|
|
GetObjectsFiltered.as_view(),
|
|
name="filtered_pagination",
|
|
),
|
|
path("<uuid:uuid>", GetRollingStock.as_view(), name="rolling_stock"),
|
|
]
|