[TASK] Add small dynamic formset snippet.

This commit is contained in:
Jan Philipp Timme 2014-12-08 13:45:54 +01:00
parent 32862dbde2
commit c019b5f0b9
2 changed files with 8 additions and 0 deletions

View File

@ -51,6 +51,7 @@ INSTALLED_APPS = (
'bootstrap3_datetime', 'bootstrap3_datetime',
'django_bootstrap_breadcrumbs', 'django_bootstrap_breadcrumbs',
'frontend', 'frontend',
'debug_toolbar'
) )
MIDDLEWARE_CLASSES = ( MIDDLEWARE_CLASSES = (

View File

@ -1,6 +1,13 @@
{% extends "layout/base.html" %} {% extends "layout/base.html" %}
{% block head%} {% block head%}
{% load crispy_forms_tags %} {% load crispy_forms_tags %}
<script type="text/javascript">
$(function() {
$('#presentationform #presentationpersonformset').formset({
prefix: '{{ formset.prefix }}'
});
})
</script>
{% endblock %} {% endblock %}
{% block content %} {% block content %}
<a href="{% url 'frontend-index' %}">zurück</a><br> <a href="{% url 'frontend-index' %}">zurück</a><br>