None condition
This commit is contained in:
parent
2d5b61b0ec
commit
452ccc3f93
2 changed files with 6 additions and 3 deletions
|
@ -1,4 +1,5 @@
|
|||
{% load wagtailcore_tags %}
|
||||
{% if form %}
|
||||
<form action="{% pageurl form %}" method="POST">
|
||||
{% csrf_token %}
|
||||
<div class="form-group">
|
||||
|
@ -12,3 +13,4 @@
|
|||
</div>
|
||||
<button class="btn btn-primary" type="submit">Senden / Envoi</button>
|
||||
</form>
|
||||
{% endif %}
|
||||
|
|
|
@ -17,6 +17,7 @@ def contact_info():
|
|||
# Contact form (footer)
|
||||
@register.inclusion_tag('tags/footer_form.html')
|
||||
def footer_form():
|
||||
if Contact.objects.last():
|
||||
return {
|
||||
'form': Contact.objects.last().contact_form,
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue