Skip to content

Commit

Permalink
Many documentation changes
Browse files Browse the repository at this point in the history
  • Loading branch information
pydanny committed Jun 5, 2011
1 parent d0ca38e commit 5579aa9
Show file tree
Hide file tree
Showing 16 changed files with 278 additions and 89 deletions.
75 changes: 44 additions & 31 deletions CONTRIBUTORS.txt
@@ -1,37 +1,50 @@
django-uni-form Project Lead
============================
Daniel Greenfeld <pydanny@gmail.com>
============
Contributors
============

django-uni-form Project Leads
=============================

* Miguel Araujo <miguel.araujo.perez@gmail.com>
* Daniel Greenfeld <pydanny@gmail.com>

django-uni-form Project Founder
================================

* Daniel Greenfeld <pydanny@gmail.com>

Uni-Form Author
===============
Dragan Babic

* Dragan Babic

Contributors
============
Alison Rowland <arowla>
Bojan Mihelac <bmihelac>
bjunix
Casper S. Jensen <semadk>
Chris Adams <acdha>
Eddy Mulyono <eddymul>
j0hnsmith
James Pic <jamespic.com>
James Tauber <jtauber>
Karl Bowden <agentk>
Marcin Grzybowski <marcin.grzybowski@gildia.info>
Michael Lind Mortensen <illio>
mirumee
mvaerle
Nagy Viktor <nagyv>
Patrick Lauber <digi604>
Patryk Zawadzki <patrys>
Skylar Saveland <skyl>
Stepan Rakhimov
John Maxwell <astrofinch>
Richard Marko <sorki>
Victor Nagy <nagyv>
Antti Kaihola <akaihola>
J. Javier Maestro <jjmaestro>
Issac Kelly <issackelly>
John Debs <johnthedebs>
Adam Cupiał <adamcupial>

* Alison Rowland <arowla>
* Bojan Mihelac <bmihelac>
* bjunix
* Casper S. Jensen <semadk>
* Chris Adams <acdha>
* Eddy Mulyono <eddymul>
* j0hnsmith
* James Pic <jamespic.com>
* James Tauber <jtauber>
* Karl Bowden <agentk>
* Marcin Grzybowski <marcin.grzybowski@gildia.info>
* Michael Lind Mortensen <illio>
* mirumee
* mvaerle
* Nagy Viktor <nagyv>
* Patrick Lauber <digi604>
* Patryk Zawadzki <patrys>
* Skylar Saveland <skyl>
* Stepan Rakhimov
* John Maxwell <astrofinch>
* Richard Marko <sorki>
* Victor Nagy <nagyv>
* Antti Kaihola <akaihola>
* J. Javier Maestro <jjmaestro>
* Issac Kelly <issackelly>
* John Debs <johnthedebs>
* Adam Cupiał <adamcupial>
Empty file added __init__.py
Empty file.
6 changes: 6 additions & 0 deletions docs/api_field.rst
@@ -0,0 +1,6 @@
========================================
API uni_form.templatetags.uni_form_field
========================================

.. automodule:: templatetags.uni_form_field
:members:
6 changes: 6 additions & 0 deletions docs/api_filters.rst
@@ -0,0 +1,6 @@
==========================================
API uni_form.templatetags.uni_form_filters
==========================================

.. automodule:: templatetags.uni_form_filters
:members:
7 changes: 7 additions & 0 deletions docs/api_helpers.rst
@@ -0,0 +1,7 @@
===================================
API uni_form.helpers
===================================


.. automodule:: helpers
:members:
7 changes: 7 additions & 0 deletions docs/api_tags.rst
@@ -0,0 +1,7 @@
========================================
API uni_form.templatetags.uni_form_tags
========================================

.. automodule:: templatetags.uni_form_tags
:members:

115 changes: 115 additions & 0 deletions docs/changelog.rst
@@ -0,0 +1,115 @@
===========
Change Log
===========


0.8.0
=====

Built-in csrf support
----------------------

Fully generated forms from the `uni_form` tag now have Django 1.2+'s support for csrf built-in.

Field labels now with safe filter
----------------------------------

This release renders django.form.field labels with the 'safe_' filter. If you have user generated form field labels you should take this into consideration.

On the rare occasions this a problem, just create a **uni_form** directory in your templates directory, copy `uni_form/templates/uni_form/field.html` there, and remove the 'safe_' filter.

errorMsg div now outside the fieldset
-------------------------------------

This release lays out the HTML for the uni_form tag differently than previous versions. The errorMsg div is now outside the fieldset as it should be.

Support for CSRF in fully generated forms.

uni_form_tags has been split into two files
---------------------------------------------

Because `uni_form_tags` got so big it was broken up into two files, `uni_form_tags` and `uni_form_filters`. In order to support backwards compatibility, `uni_form_tags`
imports all the functions of `uni_form_filters`, so existing projects won't be affected.

Removed {% uni_form_jquery %} tag
---------------------------------

This was always somewhat problematic to get working. Static media should not be obfuscated via code and while this tag seemed helpful in practice it caused more headaches then what it was worth.

Miscellaneous
--------------

* Based on @issackelly's and @johnthedebs's work a template called `betterform` has been added for supporting @carljm's form-utils BetterForms.
* FormHelper's method get_attr has been renamed to get_attributes
* uni_form_tags has been split into two different files: `uni_form_tags` and `uni_form_filters`.
* Removing i18n tags from the templates, as they are not necessary anymore.
* Removed all the internationalized hardcoded text, in favor of template variables: `form_error_title` and `formset_error_title`, bot can be set as helper's attributes.
* as_uni_errors filter can now render formset's non_form_errors uni-form way.
* Moved setup filter to use STATIC_URL instead of MEDIA_URL
* Added the possibility to specify a helper for formsets too.
* Renamed media directory to static, to be compatible with Django 1.3 staticfiles.
* Added a form_style Helper attribute for setting global style of a form: inline or default.
* Turning HTML into a context aware field, having form as a context variable and working as a Django template.
* Turning Layout and Fieldset fields into lists, so that they can be changed dynamically.
* Changing formHints from paragraphs to divs, so ul or ol can be placed within.
* Removing slugify filter from form ids, so they can be set as user's preferences.
* Added CSS class 'asteriskField' for asterisks. Added CSS class 'fieldRequired' for required input labels.
* FAIL_SILENTLY setting has been added for making django-uni-form log errors and fail silently, based on Adam Cupiał's work.
* Several bug fixes in MultiField.
* Added unicode support for layout field names and improved error handling.
* Refactored testing system and raised testing coverage.
* Clean part of the code base and comments. All old CSRF code for supporting old versions of Django has been removed.
* Refactored BasicNode for better readability and reducing lines of code.
* Added formsets support based on Victor Nagy's (nagyv) and Antti Kaihola's (akahiola) work.
* Bug fix in {% uni_form %} tag that didn't work without a helper and it was meant to be optional.
* CSS classes can be set in Submit buttons.
* Thanks to J. Javier Maestro (jjmaestro) now we can set ids and classes for Fieldset, MultiField, Row and Column.
* Thanks to Richard Marko (sorki) changed CSS class of PasswordInput widget.
* Removing Toggle class as it wasn't being used anywhere.
* Moved BaseInput to helpers and removed util.py file.
* Removed {% uni_form_jquery %} tag
* Removed `namify` function from tags, as It wasn't being used anywhere.
* Improved internal documentation
* form methods generated by FormHelper are in lowercase (http://github.com/pydanny/django-uni-form/issues#issue/20)
* Thanks to Nagy Viktor added form_tag attribute to FormHelper. Now you can use the uni_form tag without the leading and trailing form tags.
* Thanks for Alison Rowland for giving django-uni-form sphinx docs
* Incorporated uni-form 1.4 by Dragan Babic
* Provide better adherence to uni-form specification of error messages
* mirumee provided some great work for making FormHelper more subclassable.
* django-uni-form 0.8 and higher lays out the HTML for the uni_form tag differently. The errorMsg div is now outside the fieldset as it should be.
* Thanks to Casper S. Jensen django-uni-form now supports 1.2 style csrf_token.
* csrf_token does not break earlier versions of Django. This will change when no version of django does not support csrf_token.
* Thanks to j0hnsmith changed {{ error }} to {{ error|safe }} so that html (eg links) can be added to error messages.
* Thanks to j0hnsmith changed {{ field.label }} to {{ field.label|safe }} so that html (eg links) can be added to field labels
* Kudos to Stepan Rakhimov fixed an admin datetime issue.
* Thanks to patrys (Patryk Zawadzki) FormHelper class is now easily subclass-able.
* Sorki (Richard Marko) made it so things work better in direct_to_template.


0.7.0
=====

Calling the template tags library
---------------------------------

Release 0.7 and higher breaks backwards compatibility with previous versions of django-uni-form . All you have to do is update templates that call on the django-uni-form template tag from::

{% load uni_form %}
To::

{% load uni_form_tags %}
.. _safe: https://docs.djangoproject.com/en/dev/ref/templates/builtins/#safe

Miscellaneous
---------------

* Removed a <hr /> from the layout module.
* Changed templatetags/uni_form.py to templatetags/uni_form_tags.py. Yes, this breaks backwards compatibility but fixes a namespace problems in Django with naming a templatetag library after the parent application.
* Changed form_action attribute to accept not just named URLs but also any old URL.
* Added in uni_form_setup tag.
* Added tests
* Added several new contributors including Dragan Babic
* Added Danish language translation

6 changes: 3 additions & 3 deletions docs/conf.py
Expand Up @@ -16,9 +16,9 @@
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#sys.path.append(os.path.abspath('../'))
sys.path.insert(0, os.path.abspath('../../'))
sys.path.insert(0, os.path.abspath('../uni_form/'))
sys.path.insert(0, os.path.abspath('..'))
sys.path.insert(0, os.path.abspath('../uni_form'))
sys.path.insert(0, os.path.abspath('../uni_form/templatetags'))
sys.path.insert(0, os.path.abspath('../test_project'))

import settings
Expand Down
50 changes: 50 additions & 0 deletions docs/contributors.rst
@@ -0,0 +1,50 @@
============
Contributors
============

django-uni-form Project Leads
=============================

* Miguel Araujo <miguel.araujo.perez@gmail.com>
* Daniel Greenfeld <pydanny@gmail.com>

django-uni-form Project Founder
================================

* Daniel Greenfeld <pydanny@gmail.com>

Uni-Form Author
===============

* Dragan Babic

Contributors
============

* Alison Rowland <arowla>
* Bojan Mihelac <bmihelac>
* bjunix
* Casper S. Jensen <semadk>
* Chris Adams <acdha>
* Eddy Mulyono <eddymul>
* j0hnsmith
* James Pic <jamespic.com>
* James Tauber <jtauber>
* Karl Bowden <agentk>
* Marcin Grzybowski <marcin.grzybowski@gildia.info>
* Michael Lind Mortensen <illio>
* mirumee
* mvaerle
* Nagy Viktor <nagyv>
* Patrick Lauber <digi604>
* Patryk Zawadzki <patrys>
* Skylar Saveland <skyl>
* Stepan Rakhimov
* John Maxwell <astrofinch>
* Richard Marko <sorki>
* Victor Nagy <nagyv>
* Antti Kaihola <akaihola>
* J. Javier Maestro <jjmaestro>
* Issac Kelly <issackelly>
* John Debs <johnthedebs>
* Adam Cupiał <adamcupial>
20 changes: 6 additions & 14 deletions docs/index.rst
Expand Up @@ -14,18 +14,6 @@ format.

`Uni-form`_ has been selected as the base model for the design of the forms.

**Warning:** django-uni-form 0.8 and higher renders django.form.field labels with the 'safe' filter. If you have user generated form field labels you should take this into consideration.

**Note:** django-uni-form 0.8 and higher lays out the HTML for the uni_form tag differently than previous versions. The errorMsg div is now outside the fieldset as it should be.

**Note:** django-uni-form 0.7 and higher breaks backwards compatibility with previous versions of django-uni-form. All you have to do is update templates that call on the django-uni-form template tag from::

{% load uni_form %}
To::

{% load uni_form_tags %}

.. _Django: http://djangoproject.com
.. _`Uni-form`: http://sprawsm.com/uni-form

Expand All @@ -37,8 +25,12 @@ Contents:
install
usage
customization
uni_form_tags
reference
api_helpers
api_tags
api_filters
api_field
changelog
contributors

Indices and tables
==================
Expand Down
23 changes: 0 additions & 23 deletions docs/reference.rst

This file was deleted.

5 changes: 0 additions & 5 deletions docs/uni_form_tags.rst

This file was deleted.

5 changes: 3 additions & 2 deletions docs/usage.rst
@@ -1,12 +1,13 @@
=====
Usage
===========================
=====

How to use django-uni-form


Using the django-uni-form filter (Easy and fun!)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1. Add ``{% load uni_form_tags %}`` to the template that calls your form.
1. Add ``{% load uni_form_filters %}`` to the template that calls your form.
2. Append your form call with the as_uni_form filter::

{{ my_form|as_uni_form }}
Expand Down

0 comments on commit 5579aa9

Please sign in to comment.