lostplaces-backend/lostplaces/lostplaces_app/urls.py

30 lines
1.2 KiB
Python
Raw Normal View History

2020-07-26 22:19:37 +02:00
from django.urls import path
from .views import (
HomeView,
PlaceDetailView,
PlaceListView,
SignUpView,
PlaceCreateView,
PlaceUpdateView,
2020-08-26 21:36:10 +02:00
PlaceDeleteView,
2020-08-27 10:30:50 +02:00
PhotoAlbumCreateView,
2020-08-30 18:39:45 +02:00
PhotoAlbumDeleteView,
2020-09-02 00:08:00 +02:00
PlaceTagSubmitView,
PlaceTagDeleteView
)
2020-07-26 22:19:37 +02:00
urlpatterns = [
path('', HomeView.as_view(), name='home'),
path('signup/', SignUpView.as_view(), name='signup'),
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-08-30 18:39:45 +02:00
path('place/', PlaceListView.as_view(), name='place_list'),
2020-09-01 22:14:19 +02:00
# POST-only URL for tag submission
2020-08-30 18:39:45 +02:00
path('place/tag/<int:place_id>', PlaceTagSubmitView.as_view(), name='place_tag_submit'),
2020-09-02 00:08:00 +02:00
path('place/tag/delete/<int:tagged_id>/<int:tag_id>', PlaceTagDeleteView.as_view(), name='place_tag_delete')
2020-07-31 14:53:39 +02:00
]