Format using black
This commit is contained in:
parent
da8b0fc323
commit
effb56ef1d
7 changed files with 9 additions and 8 deletions
|
|
@ -40,7 +40,9 @@ class GalleryDateView(LoginRequiredMixin):
|
|||
def get_context_data(self, **kwargs):
|
||||
"""Always show all years in archive"""
|
||||
context = super().get_context_data(**kwargs)
|
||||
context['date_list'] = self.get_queryset().dates(self.date_field, 'year', 'DESC')
|
||||
context["date_list"] = self.get_queryset().dates(
|
||||
self.date_field, "year", "DESC"
|
||||
)
|
||||
return context
|
||||
|
||||
|
||||
|
|
@ -232,7 +234,10 @@ class GalleryUpload(PermissionRequiredMixin, FormView):
|
|||
# Notify user then managers
|
||||
n_success = len(uploaded_photo_name)
|
||||
if already_exists:
|
||||
messages.success(self.request, f"{n_success} photo(s) uploaded, {already_exists} photo(s) skipped as they already exist in this gallery.")
|
||||
messages.success(
|
||||
self.request,
|
||||
f"{n_success} photo(s) uploaded, {already_exists} photo(s) skipped as they already exist in this gallery.",
|
||||
)
|
||||
else:
|
||||
messages.success(self.request, f"{n_success} photo(s) uploaded.")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue