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
|
2020-09-14 17:26:17 +02:00
|
|
|
from lostplaces.views import (
|
2020-08-05 18:57:09 +02:00
|
|
|
HomeView,
|
2020-08-12 19:24:04 +02:00
|
|
|
PlaceDetailView,
|
|
|
|
PlaceListView,
|
2020-07-31 00:27:01 +02:00
|
|
|
PlaceCreateView,
|
2020-08-06 16:57:43 +02:00
|
|
|
PlaceUpdateView,
|
2020-08-26 21:36:10 +02:00
|
|
|
PlaceDeleteView,
|
2020-09-09 20:22:44 +02:00
|
|
|
PlaceTagDeleteView,
|
|
|
|
PlaceTagSubmitView,
|
2020-08-27 10:30:50 +02:00
|
|
|
PhotoAlbumCreateView,
|
2020-09-03 00:11:08 +02:00
|
|
|
PhotoAlbumDeleteView,
|
2020-09-07 22:16:09 +02:00
|
|
|
FlatView
|
2020-07-31 00:27:01 +02:00
|
|
|
)
|
2020-07-26 22:19:37 +02:00
|
|
|
|
|
|
|
urlpatterns = [
|
2020-09-10 18:37:10 +02:00
|
|
|
path('', HomeView.as_view(), name='lostplaces_home'),
|
2020-08-12 19:24:04 +02:00
|
|
|
path('place/<int:pk>/', PlaceDetailView.as_view(), name='place_detail'),
|
2020-07-31 00:27:01 +02:00
|
|
|
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'),
|
2020-07-31 00:27:01 +02:00
|
|
|
path('place/update/<int:pk>/', PlaceUpdateView.as_view(), name='place_edit'),
|
2020-08-06 16:57:43 +02:00
|
|
|
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'),
|
2020-09-09 20:26:49 +02:00
|
|
|
path('flat/<slug:slug>/', FlatView, name='flatpage'),
|
2020-09-09 20:22:44 +02:00
|
|
|
|
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'),
|
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
|
|
|
]
|