fix: media urls
This commit is contained in:
parent
c74e50ebf1
commit
ab1246b6d0
@ -27,7 +27,7 @@
|
|||||||
{% if adoption_notice.get_photo %}
|
{% if adoption_notice.get_photo %}
|
||||||
<div class="adoption-notice-img">
|
<div class="adoption-notice-img">
|
||||||
<img title="{{ adoption_notice.get_photo.title }}"
|
<img title="{{ adoption_notice.get_photo.title }}"
|
||||||
src="/media/{{ adoption_notice.get_photo.image }}"
|
src="{{ MEDIA_URL }}/{{ adoption_notice.get_photo.image }}"
|
||||||
alt="{{ adoption_notice.get_photo.alt_text }}">
|
alt="{{ adoption_notice.get_photo.alt_text }}">
|
||||||
</div>
|
</div>
|
||||||
{% else %}
|
{% else %}
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
<div class="tag sex">{{ animal.get_sex_display }}</div>
|
<div class="tag sex">{{ animal.get_sex_display }}</div>
|
||||||
</div>
|
</div>
|
||||||
{% if animal.get_photo %}
|
{% if animal.get_photo %}
|
||||||
<img src="/media/{{ animal.get_photo.image }}" alt="{{ animal.get_photo.alt_text }}">
|
<img src="{{ MEDIA_URL }}/{{ animal.get_photo.image }}" alt="{{ animal.get_photo.alt_text }}">
|
||||||
</div>
|
</div>
|
||||||
{% else %}
|
{% else %}
|
||||||
{% translate "Keine Foto" %}
|
{% translate "Keine Foto" %}
|
||||||
|
@ -172,6 +172,7 @@ TEMPLATES = [
|
|||||||
'django.template.context_processors.debug',
|
'django.template.context_processors.debug',
|
||||||
'django.template.context_processors.request',
|
'django.template.context_processors.request',
|
||||||
'django.contrib.auth.context_processors.auth',
|
'django.contrib.auth.context_processors.auth',
|
||||||
|
'django.template.context_processors.media',
|
||||||
'django.contrib.messages.context_processors.messages',
|
'django.contrib.messages.context_processors.messages',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user