Merge branch 'license' into 'master'

License

Closes #23

See merge request bde/photo21!14
This commit is contained in:
erdnaxe 2021-10-22 18:11:59 +02:00
commit 4514d7e020
4 changed files with 29 additions and 2 deletions

View file

@ -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"

View file

@ -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'),
),
]

View file

@ -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'

View file

@ -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>