Mikhail Korobov avatar Mikhail Korobov committed fdcdabf

some docs; hello 1.3

Comments (0)

Files changed (3)

+1.3 (2013-04-05)
+* added support for ``WIDGET_ERROR_CLASS`` and  ``WIDGET_REQUIRED_CLASS``
+  template variables that affect ``{% render_field %}``.
 1.2 (2013-03-23)
 0.1 (2011-01-12)
-Initial release.
+Initial release.
     <!-- template variables can be used as attribute values -->
     {% render_field form.text placeholder=form.text.label %}
+For fields rendered with ``{% render_field %}`` tag it is possible
+to set error class and required fields class by using
+``WIDGET_ERROR_CLASS`` and  ``WIDGET_REQUIRED_CLASS`` template variables::
+    {% with WIDGET_ERROR_CLASS='my_error' WIDGET_REQUIRED_CLASS='my_required' %}
+        {% render_field form.field1 %}
+        {% render_field form.field2 %}
+        {% render_field form.field3 %}
+    {% endwith %}
+You can be creative with these variables: e.g. a context processor could
+set a default CSS error class on all fields rendered by
+``{% render_field %}``.
 field_type and widget_type
     if cmd in sys.argv:
         from setuptools import setup
     name = 'django-widget-tweaks',
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.