Removed photo albums from urls and views. #50
This commit is contained in:
parent
14a5387e2d
commit
a5bcde301c
@ -19,8 +19,6 @@ from lostplaces.views import (
|
||||
PlaceVisitDeleteView,
|
||||
PlaceImageCreateView,
|
||||
PlaceImageDeleteView,
|
||||
PhotoAlbumCreateView,
|
||||
PhotoAlbumDeleteView,
|
||||
ExternalLinkCreateView,
|
||||
ExternalLinkDeleteView,
|
||||
ExplorerProfileView,
|
||||
@ -50,8 +48,6 @@ urlpatterns = [
|
||||
path('place_image/create/<int:place_id>/', PlaceImageCreateView.as_view(), name='place_image_create'),
|
||||
path('place_image/delete/<int:pk>/', PlaceImageDeleteView.as_view(), name='place_image_delete'),
|
||||
|
||||
path('photo_album/create/<int:place_id>/', PhotoAlbumCreateView.as_view(), name='photo_album_create'),
|
||||
path('photo_album/delete/<int:pk>/', PhotoAlbumDeleteView.as_view(), name='photo_album_delete'),
|
||||
path('external_link/create/<int:place_id>/', ExternalLinkCreateView.as_view(), name='external_link_create'),
|
||||
path('external_link/delete/<int:pk>/', ExternalLinkDeleteView.as_view(), name='external_link_delete')
|
||||
]
|
||||
|
@ -12,7 +12,7 @@ from django.http import HttpResponseForbidden
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from lostplaces.forms import SignupVoucherForm, TagSubmitForm
|
||||
from lostplaces.models import Place, PhotoAlbum, ExternalLink
|
||||
from lostplaces.models import Place, ExternalLink
|
||||
from lostplaces.views.base_views import IsAuthenticatedMixin
|
||||
from lostplaces.common import redirect_referer_or
|
||||
|
||||
@ -48,18 +48,6 @@ class HomeView(IsAuthenticatedMixin, View):
|
||||
}
|
||||
return render(self.request, 'home_unauth.html', context)
|
||||
|
||||
class PhotoAlbumCreateView(PlaceAssetCreateView):
|
||||
model = PhotoAlbum
|
||||
fields = ['url', 'label']
|
||||
template_name = 'photo_album/photo_album_create.html'
|
||||
success_message = _('Photo album link submitted')
|
||||
|
||||
class PhotoAlbumDeleteView(PlaceAssetDeleteView):
|
||||
model = PhotoAlbum
|
||||
pk_url_kwarg = 'pk'
|
||||
success_message = _('Photo album link deleted')
|
||||
permission_denied_messsage = _('You are not allowed to edit this photo album link')
|
||||
|
||||
class ExternalLinkCreateView(PlaceAssetCreateView):
|
||||
model = ExternalLink
|
||||
fields = ['url', 'label', 'linktype']
|
||||
|
Loading…
Reference in New Issue
Block a user