diff --git a/README.md b/README.md index 7ffe737..8c0ee6f 100644 --- a/README.md +++ b/README.md @@ -20,10 +20,22 @@ add it to your installed apps: 'django-spectre-css', ] -## Examples: -This module defines the following tags to make displaying Forms easier. +## Warning The help_text from models is marked as save in the template and therefore it is possible to have html e.g. links in the help_text. +This means that help_text of an ModelField should never be directly based on user input. + +## Examples: +This module defines the following tags to make displaying forms easier. + +- render the form header (csrf-token and non-field errors) for the form 'form': + + + {% load spectre_css %} +
- render a field user of the form 'form': diff --git a/django-spectre-css/templates/spectre-css/form-haeder.html b/django-spectre-css/templates/spectre-css/form-header.html similarity index 100% rename from django-spectre-css/templates/spectre-css/form-haeder.html rename to django-spectre-css/templates/spectre-css/form-header.html diff --git a/django-spectre-css/templates/spectre-css/form.html b/django-spectre-css/templates/spectre-css/form.html index 377fa04..582cbb3 100644 --- a/django-spectre-css/templates/spectre-css/form.html +++ b/django-spectre-css/templates/spectre-css/form.html @@ -1,6 +1,6 @@ {% load widget_tweaks %} -{% include 'spectre-css/form-haeder.html' %} +{% include 'spectre-css/form-header.html' %} {% for field in form.visible_fields %} {% include 'spectre-css/generic-field.html' with field=field %} diff --git a/django-spectre-css/templates/spectre-css/render-multi-field-part.html b/django-spectre-css/templates/spectre-css/render-multi-field-part.html index 7bd1e61..a28f57c 100644 --- a/django-spectre-css/templates/spectre-css/render-multi-field-part.html +++ b/django-spectre-css/templates/spectre-css/render-multi-field-part.html @@ -3,7 +3,7 @@ {% render_multi_field field index class+=additional_class class+=field_class id=field_id %} {% else %}