From 120e63808a45bcbed9cf5b172f4ed0062826a349 Mon Sep 17 00:00:00 2001 From: reverend Date: Tue, 6 Apr 2021 19:14:36 +0200 Subject: [PATCH] Replace include with partial tag --- django_lostplaces/lostplaces/templates/global.html | 3 ++- django_lostplaces/lostplaces/templates/home.html | 10 ++++++---- .../lostplaces/templates/home_unauth.html | 7 +++++-- .../lostplaces/templates/partials/place_teaser.html | 6 ++++-- 4 files changed, 17 insertions(+), 9 deletions(-) diff --git a/django_lostplaces/lostplaces/templates/global.html b/django_lostplaces/lostplaces/templates/global.html index ac54f70..d777ec4 100644 --- a/django_lostplaces/lostplaces/templates/global.html +++ b/django_lostplaces/lostplaces/templates/global.html @@ -1,5 +1,6 @@ {% load static %} {% load i18n %} +{% load lostplaces%} @@ -87,7 +88,7 @@ {% block footer %} - {% include 'partials/nav/footer.html' %} + {% partial 'nav/footer' %} {% endblock footer %} diff --git a/django_lostplaces/lostplaces/templates/home.html b/django_lostplaces/lostplaces/templates/home.html index 6df0ef5..a09bc7b 100644 --- a/django_lostplaces/lostplaces/templates/home.html +++ b/django_lostplaces/lostplaces/templates/home.html @@ -2,6 +2,7 @@ {% load static %} {% load i18n %} +{% load lostplaces %} {% block additional_head %} @@ -11,11 +12,13 @@ {% block maincontent %} -{% include 'partials/welcome.html' %} +{% partial 'welcome' %}
- -{% include 'partials/osm_map.html' with config=mapping_config modifier='wide' %} +{% partial 'osm_map' %} + {% set config mapping_config %} + {% set modifier 'wide' %} +{% endpartial %}

{% translate 'Explore the latest places' %}

- {% endblock maincontent %} \ No newline at end of file diff --git a/django_lostplaces/lostplaces/templates/home_unauth.html b/django_lostplaces/lostplaces/templates/home_unauth.html index f447b6d..f24d23e 100644 --- a/django_lostplaces/lostplaces/templates/home_unauth.html +++ b/django_lostplaces/lostplaces/templates/home_unauth.html @@ -1,11 +1,12 @@ {% extends 'global.html'%} {% load i18n %} +{% load lostplaces%} # {% block title %}Start{% endblock %} {% block maincontent %} -{% include 'partials/welcome.html' %} +{% partial 'welcome' %}

{% blocktranslate %}You can create, view and share your lost places with other members of this site. You can upload photos, place links to your web galleries and contribute your knowledge by tagging other places or commenting on them. You will find detailed information on where these locations are, how to get there and what to expect from them. This might even include detailed information on the surroundings or the history of a lost place.{% endblocktranslate %} @@ -24,7 +25,9 @@

- {% include 'partials/image.html' with source_url=place.placeimages.first.filename.thumbnail.url %} + {% partial 'image' %} + {% source_url source_url=place.placeimages.first.filename.thumbnail.url %} + {% endpartial %}