lostplaces-backend/django_lostplaces/lostplaces/urls.py

48 lines
1.9 KiB
Python
Raw Permalink Normal View History

2020-09-19 22:50:07 +02:00
#!/usr/bin/env python
# -*- coding: utf-8 -*-
2020-07-26 22:19:37 +02:00
from django.urls import path
from lostplaces.views import (
HomeView,
PlaceDetailView,
PlaceListView,
PlaceCreateView,
PlaceUpdateView,
2020-08-26 21:36:10 +02:00
PlaceDeleteView,
PlaceTagDeleteView,
PlaceTagSubmitView,
2020-12-24 15:56:33 +01:00
PlaceFavoriteView,
PlaceUnfavoriteView,
2020-08-27 10:30:50 +02:00
PhotoAlbumCreateView,
2020-09-03 00:11:08 +02:00
PhotoAlbumDeleteView,
PlaceImageCreateView,
2020-09-26 16:08:56 +02:00
PlaceImageDeleteView,
FlatView,
ExplorerProfileView
)
2020-07-26 22:19:37 +02:00
urlpatterns = [
2020-09-10 18:37:10 +02:00
path('', HomeView.as_view(), name='lostplaces_home'),
path('place/<int:pk>/', PlaceDetailView.as_view(), name='place_detail'),
path('place/create/', PlaceCreateView.as_view(), name='place_create'),
2020-08-26 21:36:10 +02:00
path('photo_album/create/<int:place_id>', PhotoAlbumCreateView.as_view(), name='photo_album_create'),
2020-08-27 10:30:50 +02:00
path('photo_album/delete/<int:pk>', PhotoAlbumDeleteView.as_view(), name='photo_album_delete'),
path('place/update/<int:pk>/', PlaceUpdateView.as_view(), name='place_edit'),
path('place/delete/<int:pk>/', PlaceDeleteView.as_view(), name='place_delete'),
2020-09-03 00:11:08 +02:00
path('place/', PlaceListView.as_view(), name='place_list'),
path('place_image/create/<int:place_id>', PlaceImageCreateView.as_view(), name='place_image_create'),
2020-09-26 16:08:56 +02:00
path('place_image/delete/<int:pk>', PlaceImageDeleteView.as_view(), name='place_image_delete'),
2020-09-09 20:26:49 +02:00
path('flat/<slug:slug>/', FlatView, name='flatpage'),
2020-09-10 00:32:56 +02:00
# POST-only URLs for tag submission
2020-09-12 11:24:16 +02:00
path('place/tag/<int:tagged_id>', PlaceTagSubmitView.as_view(), name='place_tag_submit'),
path('place/tag/delete/<int:tagged_id>/<int:tag_id>', PlaceTagDeleteView.as_view(), name='place_tag_delete'),
2020-12-24 15:56:33 +01:00
path('explorer/<int:explorer_id>/', ExplorerProfileView.as_view(), name='explorer_profile'),
path('explorer/favorite/<int:place_id>/', PlaceFavoriteView.as_view(), name='place_favorite'),
2020-12-24 16:41:30 +01:00
path('explorer/unfavorite/<int:place_id>/', PlaceUnfavoriteView.as_view(), name='place_unfavorite')
2020-12-24 15:56:33 +01:00
2020-07-31 14:53:39 +02:00
]