change photographer to CharField and Button positions
This commit is contained in:
@@ -15,10 +15,7 @@ class Album(models.Model):
|
|||||||
verbose_name="Thumbnail", max_length=200, null=True, blank=True
|
verbose_name="Thumbnail", max_length=200, null=True, blank=True
|
||||||
)
|
)
|
||||||
|
|
||||||
photographer = models.ForeignKey(
|
photographer = models.CharField(verbose_name="Fotograph(en)", max_length=200, null=True, blank=True)
|
||||||
User, on_delete=models.SET_NULL, null=True, blank=True
|
|
||||||
)
|
|
||||||
|
|
||||||
description = models.TextField(null=True, blank=True)
|
description = models.TextField(null=True, blank=True)
|
||||||
|
|
||||||
STATUS = (
|
STATUS = (
|
||||||
|
|||||||
@@ -9,11 +9,9 @@
|
|||||||
|
|
||||||
<div class="grid-container">
|
<div class="grid-container">
|
||||||
<div class="grid-x padding-top-1">
|
<div class="grid-x padding-top-1">
|
||||||
<a class="button" href="{% url 'gallery' %}">Zurück</a>
|
<div class="cell large-3 medium-4 small-12">
|
||||||
</div>
|
<a class="button" href="{% url 'gallery' %}">Zurück</a>
|
||||||
<hr>
|
</div>
|
||||||
|
|
||||||
<div class="grid-x">
|
|
||||||
{% if request.user.is_authenticated %}
|
{% if request.user.is_authenticated %}
|
||||||
{% if album.id %}
|
{% if album.id %}
|
||||||
<div class="cell large-3 medium-4 small-12">
|
<div class="cell large-3 medium-4 small-12">
|
||||||
@@ -25,11 +23,14 @@
|
|||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
<div class="grid-x">
|
||||||
<div class="cell">
|
<div class="cell">
|
||||||
{{ album.title }}<br>
|
{{ album.title }}<br>
|
||||||
{% if album.photographer %}
|
{% if album.photographer %}
|
||||||
Fotograf:<a href="{% url 'member' album.photographer.id %}"> {{ album.photographer | capfirst }}</a><br>
|
Fotograf(en): {{ album.photographer }}<br>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if album.event_date %}
|
{% if album.event_date %}
|
||||||
Datum: {{ album.event_date }}<br>
|
Datum: {{ album.event_date }}<br>
|
||||||
|
|||||||
Reference in New Issue
Block a user