Compare commits

..

No commits in common. "794353727612d961843e7fcfd7ca4833689d531c" and "df36fd8ed037faed6a22387f840c728187ef785a" have entirely different histories.

5 changed files with 19 additions and 71 deletions

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-10-11 07:48+0200\n"
"POT-Creation-Date: 2020-10-11 07:13+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Commander1024 <commander@commander1024.de>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -322,56 +322,4 @@ msgstr "Registrieren"
#: views/base_views.py:25
msgid "Please login to proceed"
msgstr "Bitte log Dich ein um fortzufahren"
#: views/place_image_views.py:26
msgid "Image(s) submitted successfully"
msgstr "Bild(er) erfolgreich hinzugefügt"
#: views/place_image_views.py:41
msgid "Image(s) deleted successfully"
msgstr "Bild(er) erfolgreich gelöscht"
#: views/place_image_views.py:42
msgid "You are not allowed to delete this image"
msgstr "Du darfst dieses Bild nicht löschen"
#: views/place_views.py:62
#, fuzzy
#| msgid "Successfully deleted place"
msgid "Successfully updated place"
msgstr "Place erfolgreich gelöscht"
#: views/place_views.py:63
msgid "You do no have permissions to alter this place"
msgstr "Du hast nicht die Berechtigung, diesen Place zu bearbeiten"
#: views/place_views.py:97
#, fuzzy
#| msgid "Successfully deleted place"
msgid "Successfully created place"
msgstr "Place erfolgreich gelöscht"
#: views/place_views.py:112
msgid "Successfully deleted place"
msgstr "Place erfolgreich gelöscht"
#: views/place_views.py:114
msgid "You do no have permission to delete this place"
msgstr "Du hast nicht die Berechtigung, diesen Place zu löschen"
#: views/views.py:29
msgid "User created"
msgstr "User erstellt"
#: views/views.py:54
msgid "Photo Album submitted"
msgstr "Fotoalbum hinzugefügt"
#: views/views.py:59
msgid "Photo Album deleted"
msgstr "Fotoalbum gelöscht"
#: views/views.py:60
msgid "You do not have permissions to alter this photo album"
msgstr "Du hast nicht die Berechtigung, diesen Place zu bearbeiten"
msgstr "Bitte log Dich ein um fortzufahren."

View File

@ -63,7 +63,7 @@
<a target="_blank" href="{{photo_album.url}}" class="LP-Link">
<span class="LP-Text">{{photo_album.label}}</span>
</a>
{% if user.explorer == photo_album.submitted_by or user.explorer == place.submitted_by %}
{% if user.explorer == photo_album.submitted_by or user.explorer == place.submitted_by %}
<a href="{% url 'photo_album_delete' pk=photo_album.pk%}" class="LP-Link LP-LinkList__ItemHover" title="Delete Photo Album">
<div class="RV-Iconized__Container RV-Iconized__Container--small">
{% icon 'trash' className="RV-Iconized__Icon" %}

View File

@ -1,6 +1,5 @@
from django.views import View
from django.shortcuts import get_object_or_404, redirect
from django.utils.translation import ugettext_lazy as _
from lostplaces.views.base_views import PlaceAssetCreateView, PlaceAssetDeleteView
from lostplaces.models import PlaceImage, Place
@ -23,7 +22,7 @@ class PlaceImageCreateView(MultiplePlaceImageUploadMixin, PlaceAssetCreateView):
model = PlaceImage
form_class = PlaceImageForm
template_name = 'place_image/place_image_create.html'
success_message = _('Image(s) submitted successfully')
success_message = 'Place Images submitted'
commit = False
def post(self, request, place_id, *args, **kwargs):
@ -38,5 +37,7 @@ class PlaceImageCreateView(MultiplePlaceImageUploadMixin, PlaceAssetCreateView):
class PlaceImageDeleteView(PlaceAssetDeleteView):
model = PlaceImage
success_message = _('Image(s) deleted successfully')
permission_denied_message = _('You are not allowed to delete this image')
success_message = 'Images deleted successfully'
permission_denied_message = 'You\'r not allowed to delete this image'

View File

@ -10,7 +10,6 @@ from django.views.generic import ListView
from django.contrib import messages
from django.contrib.messages.views import SuccessMessageMixin
from django.utils.translation import ugettext_lazy as _
from django.shortcuts import render, redirect, get_object_or_404
from django.urls import reverse_lazy
@ -59,8 +58,8 @@ class PlaceUpdateView(IsAuthenticatedMixin, IsPlaceSubmitterMixin, SuccessMessag
template_name = 'place/place_update.html'
model = Place
form_class = PlaceForm
success_message = _('Successfully updated place')
place_submitter_error_message = _('You do no have permissions to alter this place')
success_message = 'Successfully updated place.'
place_submitter_error_message = 'You do no have permissions to alter this place'
def get_success_url(self):
return reverse_lazy('place_detail', kwargs={'pk':self.get_object().pk})
@ -94,7 +93,7 @@ class PlaceCreateView(MultiplePlaceImageUploadMixin, IsAuthenticatedMixin, View)
messages.success(
self.request,
_('Successfully created place')
'Successfully created place.'
)
return redirect(reverse_lazy('place_detail', kwargs={'pk': place.pk}))
@ -109,13 +108,14 @@ class PlaceCreateView(MultiplePlaceImageUploadMixin, IsAuthenticatedMixin, View)
class PlaceDeleteView(IsAuthenticatedMixin, IsPlaceSubmitterMixin, DeleteView):
template_name = 'place/place_delete.html'
model = Place
success_message = _('Successfully deleted place')
success_message = 'Successfully deleted place.'
success_url = reverse_lazy('place_list')
place_submitter_error_message = _('You do no have permission to delete this place')
success_message = 'Place deleted'
place_submitter_error_message = 'You do no have permission to delete this place'
def delete(self, request, *args, **kwargs):
messages.success(self.request, self.success_message)
return super().delete(request, *args, **kwargs)
def get_place(self):
return self.get_object()
return self.get_object()

View File

@ -9,7 +9,6 @@ from django.contrib import messages
from django.urls import reverse_lazy
from django.shortcuts import render, redirect, get_object_or_404
from django.http import HttpResponseForbidden
from django.utils.translation import ugettext_lazy as _
from lostplaces.forms import ExplorerCreationForm, TagSubmitForm
from lostplaces.models import Place, PhotoAlbum
@ -26,7 +25,7 @@ class SignUpView(SuccessMessageMixin, CreateView):
form_class = ExplorerCreationForm
success_url = reverse_lazy('login')
template_name = 'signup.html'
success_message = _('User created')
success_message = 'User created.'
class HomeView(IsAuthenticatedMixin, View):
def get(self, request, *args, **kwargs):
@ -51,13 +50,13 @@ class PhotoAlbumCreateView(PlaceAssetCreateView):
model = PhotoAlbum
fields = ['url', 'label']
template_name = 'photo_album/photo_album_create.html'
success_message = _('Photo Album submitted')
success_message = 'Photo Album submitted'
class PhotoAlbumDeleteView(PlaceAssetDeleteView):
model = PhotoAlbum
pk_url_kwarg = 'pk'
success_message = _('Photo Album deleted')
permission_denied_messsage = _('You do not have permissions to alter this photo album')
success_message = 'Photo Album deleted'
permission_denied_messsage = 'You do not have permissions to alter this photo album'
class PlaceTagSubmitView(IsAuthenticatedMixin, View):
def post(self, request, tagged_id, *args, **kwargs):