stolen/app/urls.py

56 lines
3.7 KiB
Python
Raw Normal View History

from django.urls import path, include, reverse
from django.conf.urls import url
from django.contrib.auth.decorators import login_required
from django.contrib import admin
from django.contrib.auth.views import LogoutView
from two_factor.urls import urlpatterns as tf_urls
from two_factor.gateways.twilio.urls import urlpatterns as tf_twilio_urls
from . import views
urlpatterns = [
path('', views.index, name="index"),
path('clientarea/', views.clientarea, name="clientarea"),
path('clientarea/profile/', views.userprofile, name="userprofile"),
path('clientarea/profile/<userid>/', views.userprofile, name="userprofilebyid"),
path('clientarea/profile/password/', views.changepassword, name="changepassword"),
path('clientarea/profile/<userid>/promote/', views.UserPromoteView.as_view(), name="promoteuser"),
path('clientarea/profile/<userid>/demote/', views.UserDemoteView.as_view(), name="demoteuser"),
path('clientarea/items/', views.items, name="items"),
path('clientarea/items/add/', views.ItemCreateView.as_view(), name="additem"),
path('clientarea/items/<slug:uuid>/', views.ItemDetailView.as_view(), name="edititem"),
path('clientarea/items/<slug:uuid>/upload/', views.ImageCreateView.as_view(), name="imageupload"),
path('clientarea/items/<slug:uuid>/report/', views.ItemStolenView.as_view(), name="itemstolen"),
path('clientarea/items/<slug:uuid>/found/', views.ItemFoundView.as_view(), name="founditem"),
path('clientarea/items/<slug:uuid>/sold/', views.ItemSoldView.as_view(), name="solditem"),
path('clientarea/items/<slug:uuid>/transfer/', views.ItemTransferView.as_view(), name="transferitem"),
path('clientarea/items/<slug:uuid>/activate/', views.ItemActivateView.as_view(), name="activateitem"),
path('clientarea/categories/', views.CategoryListView.as_view(), name="categories"),
path('clientarea/categories/add/', views.CategoryCreateView.as_view(), name="addcategory"),
path('clientarea/categories/<slug:slug>/delete/', views.CategoryDeleteView.as_view(), name="deletecategory"),
path('clientarea/reports/', views.ReportListView.as_view(), name="reports"),
path('clientarea/reports/<slug:uuid>/', views.ReportDetailView.as_view(), name="report"),
path('clientarea/reports/<slug:uuid>/delete/', views.ReportDeleteView.as_view(), name="deletereport"),
path('clientarea/reports/<slug:uuid>/refuse/', views.ReportRefuseView.as_view(), name="refusereport"),
path('clientarea/reports/<slug:uuid>/process/', views.ReportProcessingView.as_view(), name="processreport"),
path('clientarea/reports/<slug:uuid>/finalize/', views.ReportFinalizeView.as_view(), name="finalizereport"),
path('clientarea/users/', views.UserListView.as_view(), name="users"),
path('clientarea/users/<id>/delete/', views.UserDeleteView.as_view(), name="deleteuser"),
path('clientarea/users/add/', views.UserCreateView.as_view(), name="adduser"),
path('account/register/', views.UserRegisterView.as_view(), name="register"),
path('accounts/logout/', LogoutView.as_view(), name="logout"),
path('protect/', views.protect, name="protect"),
path('check/', views.check, name="check"),
path('check/<slug:slug>/', views.StolenItemListView.as_view(), name="checkcategory"),
path('success/', views.success, name="reportsuccess"),
path('item/<slug:uuid>/', views.StolenItemView.as_view(), name="checkitem"),
path('item/<slug:uuid>/report/', views.ReportCreateView.as_view(), name="reportitem"),
path('privacy/', views.privacy, name="privacy"),
path('faq/', views.faq, name="faq"),
path('legal/', views.legal, name="legal"),
url(r'', include(tf_urls)),
url(r'', include(tf_twilio_urls)),
path('gdpr/', admin.site.urls),
]