mirror of
https://github.com/pacnpal/thrillwiki_django_no_react.git
synced 2025-12-20 07:51:09 -05:00
23 lines
969 B
Python
23 lines
969 B
Python
from django.urls import path
|
|
from . import views
|
|
|
|
app_name = 'companies'
|
|
|
|
urlpatterns = [
|
|
# List views first
|
|
path('', views.CompanyListView.as_view(), name='company_list'),
|
|
path('manufacturers/', views.ManufacturerListView.as_view(), name='manufacturer_list'),
|
|
|
|
# Create views
|
|
path('create/', views.CompanyCreateView.as_view(), name='company_create'),
|
|
path('manufacturers/create/', views.ManufacturerCreateView.as_view(), name='manufacturer_create'),
|
|
|
|
# Update views
|
|
path('<slug:slug>/edit/', views.CompanyUpdateView.as_view(), name='company_edit'),
|
|
path('manufacturers/<slug:slug>/edit/', views.ManufacturerUpdateView.as_view(), name='manufacturer_edit'),
|
|
|
|
# Detail views last (to avoid conflicts with other URL patterns)
|
|
path('<slug:slug>/', views.CompanyDetailView.as_view(), name='company_detail'),
|
|
path('manufacturers/<slug:slug>/', views.ManufacturerDetailView.as_view(), name='manufacturer_detail'),
|
|
]
|