diff --git a/photo21/locale/fr/LC_MESSAGES/django.po b/photo21/locale/fr/LC_MESSAGES/django.po index 3f8956afad676ad6a53f89e0377c7de51adb0cfa..18d2014019c859e01213adf201ff261fde033161 100644 --- a/photo21/locale/fr/LC_MESSAGES/django.po +++ b/photo21/locale/fr/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-10-15 12:15+0000\n" +"POT-Creation-Date: 2021-10-22 16:05+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -317,6 +317,10 @@ msgstr "date de début" msgid "end date" msgstr "date de fin" +#: photologue_custom/models.py:56 +msgid "license" +msgstr "licence" + #: photologue_custom/templates/photologue/gallery_archive.html:7 #: photologue_custom/templates/photologue/gallery_archive.html:12 msgid "Latest photo galleries" diff --git a/photologue_custom/migrations/0004_photoextended_license.py b/photologue_custom/migrations/0004_photoextended_license.py new file mode 100644 index 0000000000000000000000000000000000000000..87c68873a5104edac477b0d1e8c12ab107bb2010 --- /dev/null +++ b/photologue_custom/migrations/0004_photoextended_license.py @@ -0,0 +1,18 @@ +# Generated by Django 2.2.24 on 2021-10-22 16:04 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('photologue_custom', '0003_auto_20211013_1507'), + ] + + operations = [ + migrations.AddField( + model_name='photoextended', + name='license', + field=models.CharField(blank=True, max_length=255, verbose_name='license'), + ), + ] diff --git a/photologue_custom/models.py b/photologue_custom/models.py index 09e2765907f7cb7a2d8f2b0a20686abe09357bab..6275e647cc89c66cd7a4d6dec85ffaae688d4dd5 100644 --- a/photologue_custom/models.py +++ b/photologue_custom/models.py @@ -50,6 +50,11 @@ class PhotoExtended(models.Model): on_delete=models.CASCADE, verbose_name=_("owner"), ) + license = models.CharField( + max_length=255, + blank=True, + verbose_name=_("license"), + ) class Meta: verbose_name = 'Extra fields' diff --git a/photologue_custom/templates/photologue/gallery_detail.html b/photologue_custom/templates/photologue/gallery_detail.html index 1a241212532f5fb50b4f3fd4a24e18b80252168e..15c0b3211e2eafe72ba398c96944ae22edbd7aa0 100644 --- a/photologue_custom/templates/photologue/gallery_detail.html +++ b/photologue_custom/templates/photologue/gallery_detail.html @@ -67,7 +67,7 @@ SPDX-License-Identifier: GPL-3.0-or-later <div class="card-body row" id="lightgallery"> {% for photo in photos %} <a class="col-6 col-md-3 mb-2 text-center" href="{{ photo.get_absolute_url }}" data-src="{{ photo.get_display_url }}" data-download-url="{{ photo.image.url }}"> - <img src="{{ photo.get_thumbnail_url }}" class="img-thumbnail" alt="{{ photo.title }}{% if photo.date_taken %} - {{ photo.date_taken|date }} {{ photo.date_taken|time }}{% endif %} - {{ photo.extended.owner.get_full_name }}"> + <img src="{{ photo.get_thumbnail_url }}" class="img-thumbnail" alt="{{ photo.title }}{% if photo.date_taken %} - {{ photo.date_taken|date }} {{ photo.date_taken|time }}{% endif %} - {{ photo.extended.owner.get_full_name }}{% if photo.extended.license %} - {{ photo.extended.license }}{% endif %}"> </a> {% endfor %} </div>