change photographer to CharField and Button positions

This commit is contained in:
2022-01-02 10:21:38 +00:00
parent 4f6abae5b3
commit b38780e163
2 changed files with 8 additions and 10 deletions

View File

@@ -15,10 +15,7 @@ class Album(models.Model):
verbose_name="Thumbnail", max_length=200, null=True, blank=True
)
photographer = models.ForeignKey(
User, on_delete=models.SET_NULL, null=True, blank=True
)
photographer = models.CharField(verbose_name="Fotograph(en)", max_length=200, null=True, blank=True)
description = models.TextField(null=True, blank=True)
STATUS = (

View File

@@ -9,11 +9,9 @@
<div class="grid-container">
<div class="grid-x padding-top-1">
<a class="button" href="{% url 'gallery' %}">Zurück</a>
</div>
<hr>
<div class="grid-x">
<div class="cell large-3 medium-4 small-12">
<a class="button" href="{% url 'gallery' %}">Zurück</a>
</div>
{% if request.user.is_authenticated %}
{% if album.id %}
<div class="cell large-3 medium-4 small-12">
@@ -25,11 +23,14 @@
</div>
{% endif %}
{% endif %}
</div>
<hr>
<div class="grid-x">
<div class="cell">
{{ album.title }}<br>
{% if album.photographer %}
Fotograf:<a href="{% url 'member' album.photographer.id %}"> {{ album.photographer | capfirst }}</a><br>
Fotograf(en): {{ album.photographer }}<br>
{% endif %}
{% if album.event_date %}
Datum: {{ album.event_date }}<br>