I am creating a couple pages for my website by extending a base.html template that I made. I want to be able to put bootstrap forms on some of the pages, but when I have the {% bootstrap_form formname %} tag inside the {% block content %} tag I get an error: Invalid block tag: 'bootstrap_form', expected 'endblock'.
Does anyone know how to put bootstrap tags inside of a template block??
My base.html:
<html>
<head>
<title>{% block title %}CYGNSS SIMPL{% endblock %}</title>
</head>
<body>
{% block content %}{% endblock %}
<div class="container">
<img class="img-responsive center-block" src="{% static "images/logo.png" %}" alt="Picture"/>
</div>
{% block footer %}{% endblock %}
</body>
</html>
My template:
{% extends "InterfaceApp/base.html" %}
{% block title %}Request Generator{% endblock %}
{% block content %}
<div class="container">
<div class="page-header">
<h1>
<p class="text-center">Such Request Generator</p>
</h1>
</div>
<div class="container-fluid">
<div class="panel panel-default">
<div class="panel-heading">
<p class="text-center">
Generate a Request.
</p>
</div>
<div class="container-fluid">
<form action="/InterfaceApp/Manual_Request/" method="post" class="form" onsubmit="return checkForm( this )">
{% csrf_token %}
<div class="panel-body text-center">
<table class="table-responsive centering">
<tbody>
<tr>
<td>
{% bootstrap_form form_length %}
</td>
</tr>
</tbody>
</table>
<br>
<table class="table-responsive centering">
<tbody>
<tr>
{% buttons %}
<td>
<button type="submit" class="btn btn-primary center-block" value="Submit">
{% bootstrap_icon "fire" %} Generate Manual Request
</button>
</td>
{% endbuttons %}
</tr>
</tbody>
</table>
</div>
</form>
</div>
</div>
</div>
</div>
{% endblock %}
Any help is much appreciated!