Commits

Benoît Bryon  committed 41bada3 Draft

Refs #27 - Fixed templates distribution. And more changes related to development environment (not related to implementation).

  • Participants
  • Parent commits b7e28b2
  • Branches 27-packaging-templates

Comments (0)

Files changed (37)

 syntax: glob
 
-# Virtualenv's directories
-bin
-include
-lib
+# Local binaries (they are generated).
+bin/
 
-# Buildout's directories
-bin
-develop-eggs
-eggs
-parts
-.installed.cfg
-downloads
-lib
+# Local configuration (generated from templates)...
+etc/
 
-# Setuptools/Distribute's files
-*.egg-info
-dist
-build
+# External libraries (generated).
+lib/
 
-# Python's precompiled files
+# External source files (managed with their own VCS).
+src/
+
+# Data files (backup).
+var/
+
+# Python files.
 *.pyc
 *.pyo
+*.egg-info
 
-# Sphinx's builds
-docs/_build
+# Editors' temporary files
+.*.swp
+#######
+Authors
+#######
+
+* Benoît Bryon <benoit@marmelune.net>
+#######
+Changes
+#######
+
+0.2, 2011-05-22 -- Beta release
+===============================
+
+* Python module rename: from django-formrenderingtools to 
+  djc.formrenderingtools. The package name does not change (still
+  django-formrenderingtools on Pypi).
+* Improved documentation
+* Improved packaging. Buildout integration.
+* A demo project is now part of the sourcecode, so that one can quickly
+  discover the application and perform experiments in a sandbox.
+* replaced dependency of Django >= 1.1 by Django >= 1.0
+
+0.1, 2010-06-03 -- Initial release
+==================================
+
+Initial release as a package.
+
+0.0, 2008-10-14 -- Project initialization
+=========================================
+
+Closed-source and not packaged at the beginning.
+############
+Installation
+############
+
+The code is published under the BSD license. See LICENSE for details.
+
+If you just want to discover the application, have a look at the :doc:`/demo`.
+
+*********************
+Installation synopsis
+*********************
+
+* Check requirements
+* Get the code
+* Update project settings
+
+************
+Requirements
+************
+
+Notice that managing requirements is easier if you choose an automatic
+installation procedure.
+
+This application requires:
+
+* `Django-1.3`_. The application targets the latest stable release of 
+  branch 1.x. It may work with previous versions, but tests focus on the latest
+  one.
+* `django-templateaddons`_: a set of helpers for the template designer and
+  template tag developer.
+
+.. _`Django-1.3`: http://djangoproject.com/
+.. _`django-templateaddons`: http://bitbucket.org/benoitbryon/django-templateaddons
+
+************
+Get the code
+************
+
+The code is published under the BSD license. See :doc:`LICENSE` for details.
+
+Latest release
+==============
+
+This application is known as "django-formrenderingtools" on 
+`Pypi <http://pypi.python.org/>`_. 
+
+So you can install it with pip or easy_install. As an example::
+
+  # pip install -U django-formrenderingtools
+
+Obviously, you can also add it to your eggs list in a buildout configuration
+file.
+
+Development files
+=================
+
+You can use pip to automatically download and install the project with 
+versionning::
+
+  # pip install -U -e hg+http://bitbucket.org/benoitbryon/django-formrenderingtools#egg=djc.formrenderingtools
+
+Manual installation
+===================
+
+Manual installation is not the recommended way: you'd better learn about
+buildout or virtualenv+pip.
+
+The main project page is http://bitbucket.org/benoitbryon/django-formrenderingtools.
+
+You can clone the repository with the following command line:
+
+.. code-block:: bash
+
+  $ hg clone http://bitbucket.org/benoitbryon/django-formrenderingtools
+
+Copy the django-formrenderingtools/djc folder somewhere in your PYTHON_PATH. It
+may be in your project's directory.
+
+***************
+Update settings
+***************
+
+* add 'djc.formrenderingtools' to your INSTALLED_APPS
+#######
+License
+#######
+
+Copyright (c) 2008-2012, Benoît Bryon <benoit@marmelune.net>.
+See AUTHORS for a full list of contributors.
+
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without 
+modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice, 
+      this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright notice, 
+      this list of conditions and the following disclaimer in the documentation 
+      and/or other materials provided with the distribution.
+    * Neither the name of the author nor the names of other contributors may be 
+      used to endorse or promote products derived from this software without 
+      specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+recursive-include djc *
+recursive-include docs *
+global-exclude *.pyc
 include *.txt
-include setup.cfg
-include setup.py
-recursive-include docs *
-recursive-include formrenderingtools *
+SHELL = /usr/bin/env bash
+
+# Initialize some variables.
+PROJECT = 'django-formrenderingtools'
+ROOT_DIR = `cd $(@D) && pwd`
+BUILDOUT_BOOTSTRAP_URL = http://svn.zope.org/*checkout*/zc.buildout/tags/1.5.2/bootstrap/bootstrap.py?content-type=text%2Fplain
+BUILDOUT_CONFIGURATION = $(ROOT_DIR)/etc/buildout/buildout.cfg
+# Programs. See http://www.gnu.org/software/make/manual/make.html#Implicit-Variables
+WGET = wget
+VIRTUALENV = virtualenv
+PYTHON = $(ROOT_DIR)/lib/virtualenv/bin/python
+BUILDOUT = $(ROOT_DIR)/bin/buildout -c $(BUILDOUT_CONFIGURATION)
+DJANGO = $(ROOT_DIR)/bin/django
+
+configure:
+	# For now, we are using static configuration files (not real templates).
+	# These files are stored locally in templates/ folder.
+	# Generate local configuration.
+	mkdir -p $(ROOT_DIR)/etc
+	cp -R $(ROOT_DIR)/etc-templates/* $(ROOT_DIR)/etc/
+
+virtualenv:
+	if [ ! -f $(PYTHON) ]; then \
+	    if [[ "`$(VIRTUALENV) --version`" < "`echo '1.8'`" ]]; then \
+	        $(VIRTUALENV) --no-site-packages --distribute $(ROOT_DIR)/lib/virtualenv; \
+	    else \
+	        $(VIRTUALENV) $(ROOT_DIR)/lib/virtualenv; \
+	    fi \
+	fi
+
+buildout:
+	# Download zc.buildout's bootstrap script.
+	if [ ! -f $(ROOT_DIR)/lib/buildout/bootstrap.py ]; then \
+	    mkdir -p $(ROOT_DIR)/lib/buildout; \
+	    $(WGET) $(BUILDOUT_BOOTSTRAP_URL) -O $(ROOT_DIR)/lib/buildout/bootstrap.py; \
+	fi
+	# Generate local directories file for zc.buildout (makes it possible to
+	# set buildout:directory elsewhere than the main configuration file).
+	echo "# Generated by $(ROOT_DIR)/makefile on `date --utc`" > $(ROOT_DIR)/etc/buildout/directories-local.cfg
+	echo "[buildout]" >> $(ROOT_DIR)/etc/buildout/directories-local.cfg
+	echo "directory = $(ROOT_DIR)" >> $(ROOT_DIR)/etc/buildout/directories-local.cfg
+	# Bootstrap zc.buildout.
+	if [ ! -f $(ROOT_DIR)/bin/buildout ]; then \
+	    $(PYTHON) $(ROOT_DIR)/lib/buildout/bootstrap.py --distribute -c $(BUILDOUT_CONFIGURATION); \
+	fi
+	# Run zc.buildout.
+	$(BUILDOUT) -N
+
+update: buildout 
+
+develop: virtualenv update
+
+clean:
+	rm -rf bin/ lib/
+
+documentation:
+	make --directory=docs clean html
+	mkdir -p $(ROOT_DIR)/var/docs/html
+	bin/rst2 html README > $(ROOT_DIR)/var/docs/html/README.html
+
+test:
+	bin/django test --config=$(ROOT_DIR)/etc/nose.cfg
+	rm -f $(ROOT_DIR)/.coverage
+
+release:
+	# Freeze versions.
+	cp $(ROOT_DIR)/etc/buildout/versions-kgs.cfg $(ROOT_DIR)/etc-templates/buildout/
+	# Run zest.releaser.
+	#bin/fullrelease
+#########################
+django-formrenderingtools
+#########################
+
+django-formrenderingtools is an application for the `Django framework
+<http://www.djangoproject.com/>`_.
+It provides tools for the template designer to customize forms.
+
+Rather than using {{ form.as_p }}, set up and reuse templates to render 
+Django's form elements.
+
+For the impatient, use the bundled demo project to discover and try the
+application (see docs/demo.txt for details).
+
+This application provides a "form_layouts" template tag library
+which itself provides the following template tags:
+
+* form: renders a full form, i.e. non field errors, all fields, field
+  errors, labels and help texts
+* form_errors: renders global form errors, i.e. non field errors
+* field_list: renders a set of fields in a form, with corresponding 
+  field errors, labels and help texts
+* field: renders a field, with field errors, label and help text
+* field_errors: renders errors related to a field
+* label: renders a field's label
+* help_text: renders a field's help text
+
+The goal of this application is to provide a pack of template tags which helps
+you render each element of a form: full form, list of fields, non field errors 
+(global errors), field errors (specific errors), field, label, help text...
+
+Every form element has a corresponding template tag, which uses templates to
+generate the output. Template designers no longer rely on developers to 
+customize the form output.
+
+This application uses a template-naming system that lets you reuse generic 
+templates or use specific ones, depending on your needs. You can reuse built-in 
+templates, override them or create your own templates.
+
+*****
+Links
+*****
+
+HTML documentation
+  Browse the HTML documentation online at 
+  http://packages.python.org/django-formrenderingtools/
+
+RestructuredText documentation
+  Read the RestructuredText documentation in the docs/ folder in the source
+  code
+
+Source code repository
+  Follow the project on BitBucket at
+  http://bitbucket.org/benoitbryon/django-formrenderingtools
+
+Pypi
+  The project is known as "django-formrenderingtools" in the Python package
+  index. See http://pypi.python.org/pypi/django-formrenderingtools
+
+*******************
+Credits and license
+*******************
+
+This application is published under the BSD license. See 
+`docs/LICENSE.txt <http://packages.python.org/django-formrenderingtools/LICENSE.html>`_
+for details.

File README.txt

-#########################
-django-formrenderingtools
-#########################
-
-django-formrenderingtools is an application for the `Django framework
-<http://www.djangoproject.com/>`_.
-It provides tools for the template designer to customize forms.
-
-Rather than using {{ form.as_p }}, set up and reuse templates to render 
-Django's form elements.
-
-For the impatient, use the bundled demo project to discover and try the
-application (see docs/demo.txt for details).
-
-This application provides a "form_layouts" template tag library
-which itself provides the following template tags:
-
-* form: renders a full form, i.e. non field errors, all fields, field
-  errors, labels and help texts
-* form_errors: renders global form errors, i.e. non field errors
-* field_list: renders a set of fields in a form, with corresponding 
-  field errors, labels and help texts
-* field: renders a field, with field errors, label and help text
-* field_errors: renders errors related to a field
-* label: renders a field's label
-* help_text: renders a field's help text
-
-The goal of this application is to provide a pack of template tags which helps
-you render each element of a form: full form, list of fields, non field errors 
-(global errors), field errors (specific errors), field, label, help text...
-
-Every form element has a corresponding template tag, which uses templates to
-generate the output. Template designers no longer rely on developers to 
-customize the form output.
-
-This application uses a template-naming system that lets you reuse generic 
-templates or use specific ones, depending on your needs. You can reuse built-in 
-templates, override them or create your own templates.
-
-*****
-Links
-*****
-
-HTML documentation
-  Browse the HTML documentation online at 
-  http://packages.python.org/django-formrenderingtools/
-
-RestructuredText documentation
-  Read the RestructuredText documentation in the docs/ folder in the source
-  code
-
-Source code repository
-  Follow the project on BitBucket at
-  http://bitbucket.org/benoitbryon/django-formrenderingtools
-
-Pypi
-  The project is known as "django-formrenderingtools" in the Python package
-  index. See http://pypi.python.org/pypi/django-formrenderingtools
-
-*******************
-Credits and license
-*******************
-
-This application is published under the BSD license. See 
-`docs/LICENSE.txt <http://packages.python.org/django-formrenderingtools/LICENSE.html>`_
-for details.
+0.2.1

File bootstrap.py

-##############################################################################
-#
-# Copyright (c) 2006 Zope Foundation and Contributors.
-# All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-#
-##############################################################################
-"""Bootstrap a buildout-based project
-
-Simply run this script in a directory containing a buildout.cfg.
-The script accepts buildout command-line options, so you can
-use the -c option to specify an alternate configuration file.
-"""
-
-import os, shutil, sys, tempfile, textwrap, urllib, urllib2, subprocess
-from optparse import OptionParser
-
-if sys.platform == 'win32':
-    def quote(c):
-        if ' ' in c:
-            return '"%s"' % c # work around spawn lamosity on windows
-        else:
-            return c
-else:
-    quote = str
-
-# See zc.buildout.easy_install._has_broken_dash_S for motivation and comments.
-stdout, stderr = subprocess.Popen(
-    [sys.executable, '-Sc',
-     'try:\n'
-     '    import ConfigParser\n'
-     'except ImportError:\n'
-     '    print 1\n'
-     'else:\n'
-     '    print 0\n'],
-    stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()
-has_broken_dash_S = bool(int(stdout.strip()))
-
-# In order to be more robust in the face of system Pythons, we want to
-# run without site-packages loaded.  This is somewhat tricky, in
-# particular because Python 2.6's distutils imports site, so starting
-# with the -S flag is not sufficient.  However, we'll start with that:
-if not has_broken_dash_S and 'site' in sys.modules:
-    # We will restart with python -S.
-    args = sys.argv[:]
-    args[0:0] = [sys.executable, '-S']
-    args = map(quote, args)
-    os.execv(sys.executable, args)
-# Now we are running with -S.  We'll get the clean sys.path, import site
-# because distutils will do it later, and then reset the path and clean
-# out any namespace packages from site-packages that might have been
-# loaded by .pth files.
-clean_path = sys.path[:]
-import site
-sys.path[:] = clean_path
-for k, v in sys.modules.items():
-    if k in ('setuptools', 'pkg_resources') or (
-        hasattr(v, '__path__') and
-        len(v.__path__)==1 and
-        not os.path.exists(os.path.join(v.__path__[0],'__init__.py'))):
-        # This is a namespace package.  Remove it.
-        sys.modules.pop(k)
-
-is_jython = sys.platform.startswith('java')
-
-setuptools_source = 'http://peak.telecommunity.com/dist/ez_setup.py'
-distribute_source = 'http://python-distribute.org/distribute_setup.py'
-
-# parsing arguments
-def normalize_to_url(option, opt_str, value, parser):
-    if value:
-        if '://' not in value: # It doesn't smell like a URL.
-            value = 'file://%s' % (
-                urllib.pathname2url(
-                    os.path.abspath(os.path.expanduser(value))),)
-        if opt_str == '--download-base' and not value.endswith('/'):
-            # Download base needs a trailing slash to make the world happy.
-            value += '/'
-    else:
-        value = None
-    name = opt_str[2:].replace('-', '_')
-    setattr(parser.values, name, value)
-
-usage = '''\
-[DESIRED PYTHON FOR BUILDOUT] bootstrap.py [options]
-
-Bootstraps a buildout-based project.
-
-Simply run this script in a directory containing a buildout.cfg, using the
-Python that you want bin/buildout to use.
-
-Note that by using --setup-source and --download-base to point to
-local resources, you can keep this script from going over the network.
-'''
-
-parser = OptionParser(usage=usage)
-parser.add_option("-v", "--version", dest="version",
-                          help="use a specific zc.buildout version")
-parser.add_option("-d", "--distribute",
-                   action="store_true", dest="use_distribute", default=False,
-                   help="Use Distribute rather than Setuptools.")
-parser.add_option("--setup-source", action="callback", dest="setup_source",
-                  callback=normalize_to_url, nargs=1, type="string",
-                  help=("Specify a URL or file location for the setup file. "
-                        "If you use Setuptools, this will default to " +
-                        setuptools_source + "; if you use Distribute, this "
-                        "will default to " + distribute_source +"."))
-parser.add_option("--download-base", action="callback", dest="download_base",
-                  callback=normalize_to_url, nargs=1, type="string",
-                  help=("Specify a URL or directory for downloading "
-                        "zc.buildout and either Setuptools or Distribute. "
-                        "Defaults to PyPI."))
-parser.add_option("--eggs",
-                  help=("Specify a directory for storing eggs.  Defaults to "
-                        "a temporary directory that is deleted when the "
-                        "bootstrap script completes."))
-parser.add_option("-t", "--accept-buildout-test-releases",
-                  dest='accept_buildout_test_releases',
-                  action="store_true", default=False,
-                  help=("Normally, if you do not specify a --version, the "
-                        "bootstrap script and buildout gets the newest "
-                        "*final* versions of zc.buildout and its recipes and "
-                        "extensions for you.  If you use this flag, "
-                        "bootstrap and buildout will get the newest releases "
-                        "even if they are alphas or betas."))
-parser.add_option("-c", None, action="store", dest="config_file",
-                   help=("Specify the path to the buildout configuration "
-                         "file to be used."))
-
-options, args = parser.parse_args()
-
-# if -c was provided, we push it back into args for buildout's main function
-if options.config_file is not None:
-    args += ['-c', options.config_file]
-
-if options.eggs:
-    eggs_dir = os.path.abspath(os.path.expanduser(options.eggs))
-else:
-    eggs_dir = tempfile.mkdtemp()
-
-if options.setup_source is None:
-    if options.use_distribute:
-        options.setup_source = distribute_source
-    else:
-        options.setup_source = setuptools_source
-
-if options.accept_buildout_test_releases:
-    args.append('buildout:accept-buildout-test-releases=true')
-args.append('bootstrap')
-
-try:
-    import pkg_resources
-    import setuptools # A flag.  Sometimes pkg_resources is installed alone.
-    if not hasattr(pkg_resources, '_distribute'):
-        raise ImportError
-except ImportError:
-    ez_code = urllib2.urlopen(
-        options.setup_source).read().replace('\r\n', '\n')
-    ez = {}
-    exec ez_code in ez
-    setup_args = dict(to_dir=eggs_dir, download_delay=0)
-    if options.download_base:
-        setup_args['download_base'] = options.download_base
-    if options.use_distribute:
-        setup_args['no_fake'] = True
-    ez['use_setuptools'](**setup_args)
-    if 'pkg_resources' in sys.modules:
-        reload(sys.modules['pkg_resources'])
-    import pkg_resources
-    # This does not (always?) update the default working set.  We will
-    # do it.
-    for path in sys.path:
-        if path not in pkg_resources.working_set.entries:
-            pkg_resources.working_set.add_entry(path)
-
-cmd = [quote(sys.executable),
-       '-c',
-       quote('from setuptools.command.easy_install import main; main()'),
-       '-mqNxd',
-       quote(eggs_dir)]
-
-if not has_broken_dash_S:
-    cmd.insert(1, '-S')
-
-find_links = options.download_base
-if not find_links:
-    find_links = os.environ.get('bootstrap-testing-find-links')
-if find_links:
-    cmd.extend(['-f', quote(find_links)])
-
-if options.use_distribute:
-    setup_requirement = 'distribute'
-else:
-    setup_requirement = 'setuptools'
-ws = pkg_resources.working_set
-setup_requirement_path = ws.find(
-    pkg_resources.Requirement.parse(setup_requirement)).location
-env = dict(
-    os.environ,
-    PYTHONPATH=setup_requirement_path)
-
-requirement = 'zc.buildout'
-version = options.version
-if version is None and not options.accept_buildout_test_releases:
-    # Figure out the most recent final version of zc.buildout.
-    import setuptools.package_index
-    _final_parts = '*final-', '*final'
-    def _final_version(parsed_version):
-        for part in parsed_version:
-            if (part[:1] == '*') and (part not in _final_parts):
-                return False
-        return True
-    index = setuptools.package_index.PackageIndex(
-        search_path=[setup_requirement_path])
-    if find_links:
-        index.add_find_links((find_links,))
-    req = pkg_resources.Requirement.parse(requirement)
-    if index.obtain(req) is not None:
-        best = []
-        bestv = None
-        for dist in index[req.project_name]:
-            distv = dist.parsed_version
-            if _final_version(distv):
-                if bestv is None or distv > bestv:
-                    best = [dist]
-                    bestv = distv
-                elif distv == bestv:
-                    best.append(dist)
-        if best:
-            best.sort()
-            version = best[-1].version
-if version:
-    requirement = '=='.join((requirement, version))
-cmd.append(requirement)
-
-if is_jython:
-    import subprocess
-    exitcode = subprocess.Popen(cmd, env=env).wait()
-else: # Windows prefers this, apparently; otherwise we would prefer subprocess
-    exitcode = os.spawnle(*([os.P_WAIT, sys.executable] + cmd + [env]))
-if exitcode != 0:
-    sys.stdout.flush()
-    sys.stderr.flush()
-    print ("An error occurred when trying to install zc.buildout. "
-           "Look above this message for any errors that "
-           "were output by easy_install.")
-    sys.exit(exitcode)
-
-ws.add_entry(eggs_dir)
-ws.require(requirement)
-import zc.buildout.buildout
-zc.buildout.buildout.main(args)
-if not options.eggs: # clean up temporary egg directory
-    shutil.rmtree(eggs_dir)

File buildout.cfg

-[buildout]
-parts = 
-    django
-    sphinx
-develop = .
-eggs = djc.formrenderingtools
-
-[django]
-recipe = djangorecipe
-version = 1.3
-project = demo
-settings = settings
-test = formrenderingtools
-eggs = ${buildout:eggs}
-
-[sphinx]
-recipe = collective.recipe.sphinxbuilder
-source = ${buildout:directory}/docs
-build = ${buildout:directory}/docs/_build

File demo/settings.py

 
 DEBUG = True
 TEMPLATE_DEBUG = DEBUG
+TEST_RUNNER = 'django_nose.NoseTestSuiteRunner'
 
 ADMINS = (
     # ('Your Name', 'your_email@example.com'),
     # 'django.contrib.admin',
     # Uncomment the next line to enable admin documentation:
     # 'django.contrib.admindocs',
+    'django_nose',
     'djc.formrenderingtools',
     'demo.demoapp',
 )

File docs/AUTHORS.txt

-#######
-Authors
-#######
-
-* Benoît Bryon <benoit@marmelune.net>

File docs/CHANGES.txt

-#######
-Changes
-#######
-
-*******************************
-0.2, 2011-05-22 -- Beta release
-*******************************
-
-* Python module rename: from django-formrenderingtools to 
-  djc.formrenderingtools. The package name does not change (still
-  django-formrenderingtools on Pypi).
-* Improved documentation
-* Improved packaging. Buildout integration.
-* A demo project is now part of the sourcecode, so that one can quickly
-  discover the application and perform experiments in a sandbox.
-* replaced dependency of Django >= 1.1 by Django >= 1.0
-
-**********************************
-0.1, 2010-06-03 -- Initial release
-**********************************
-
-Initial release as a package.

File docs/INSTALL.txt

 Installation
 ############
 
-The code is published under the BSD license. See LICENSE for details.
+The code is published under the BSD license. See :doc:`about/license` for
+details.
 
-If you just want to discover the application, have a look at the :doc:`/demo`.
+If you just want to discover the application, you may have a look at the
+:doc:`/demo`.
 
-*********************
-Installation synopsis
-*********************
+If you want to contribute to the code, you should go to :doc:`contribute`
+documentation.
 
-* Check requirements
-* Get the code
-* Update project settings
 
-************
-Requirements
-************
+**********************
+Install Python package
+**********************
 
-Notice that managing requirements is easier if you choose an automatic
-installation procedure.
+Install the package with your favorite Python installer. As an example, with
+pip:
 
-This application requires:
+.. code-block:: sh
 
-* `Django-1.3`_. The application targets the latest stable release of 
-  branch 1.x. It may work with previous versions, but tests focus on the latest
-  one.
-* `django-templateaddons`_: a set of helpers for the template designer and
-  template tag developer.
+   pip install django-formrenderingtools
 
-.. _`Django-1.3`: http://djangoproject.com/
-.. _`django-templateaddons`: http://bitbucket.org/benoitbryon/django-templateaddons
 
-************
-Get the code
-************
+******************************
+Update Django project settings
+******************************
 
-The code is published under the BSD license. See :doc:`LICENSE` for details.
-
-Latest release
-==============
-
-This application is known as "django-formrenderingtools" on 
-`Pypi <http://pypi.python.org/>`_. 
-
-So you can install it with pip or easy_install. As an example::
-
-  # pip install -U django-formrenderingtools
-
-Obviously, you can also add it to your eggs list in a buildout configuration
-file.
-
-Development files
-=================
-
-You can use pip to automatically download and install the project with 
-versionning::
-
-  # pip install -U -e hg+http://bitbucket.org/benoitbryon/django-formrenderingtools#egg=djc.formrenderingtools
-
-Manual installation
-===================
-
-Manual installation is not the recommended way: you'd better learn about
-buildout or virtualenv+pip.
-
-The main project page is http://bitbucket.org/benoitbryon/django-formrenderingtools.
-
-You can clone the repository with the following command line:
-
-.. code-block:: bash
-
-  $ hg clone http://bitbucket.org/benoitbryon/django-formrenderingtools
-
-Copy the django-formrenderingtools/djc folder somewhere in your PYTHON_PATH. It
-may be in your project's directory.
-
-***************
-Update settings
-***************
-
-* add 'djc.formrenderingtools' to your INSTALLED_APPS
+Add 'djc.formrenderingtools' to the INSTALLED_APPS list in your Django project
+settings.

File docs/LICENSE.txt

-#######
-License
-#######
-
-Copyright (c) 2008-2010, Benoît Bryon <benoit@marmelune.net>.
-See :doc:`AUTHORS` for a full list of contributors.
-
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without 
-modification, are permitted provided that the following conditions are met:
-
-    * Redistributions of source code must retain the above copyright notice, 
-      this list of conditions and the following disclaimer.
-    * Redistributions in binary form must reproduce the above copyright notice, 
-      this list of conditions and the following disclaimer in the documentation 
-      and/or other materials provided with the distribution.
-    * Neither the name of the author nor the names of other contributors may be 
-      used to endorse or promote products derived from this software without 
-      specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 
-FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 
-CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

File docs/Makefile

+# Makefile for Sphinx documentation
+#
+
+# You can set these variables from the command line.
+SPHINXOPTS    =
+SPHINXBUILD   = ../bin/sphinx-build
+PAPER         =
+BUILDDIR      = ../var/docs
+
+# Internal variables.
+PAPEROPT_a4     = -D latex_paper_size=a4
+PAPEROPT_letter = -D latex_paper_size=letter
+ALLSPHINXOPTS   = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
+# the i18n builder cannot share the environment and doctrees with the others
+I18NSPHINXOPTS  = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
+
+.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext
+
+help:
+	@echo "Please use \`make <target>' where <target> is one of"
+	@echo "  html       to make standalone HTML files"
+	@echo "  dirhtml    to make HTML files named index.html in directories"
+	@echo "  singlehtml to make a single large HTML file"
+	@echo "  pickle     to make pickle files"
+	@echo "  json       to make JSON files"
+	@echo "  htmlhelp   to make HTML files and a HTML help project"
+	@echo "  qthelp     to make HTML files and a qthelp project"
+	@echo "  devhelp    to make HTML files and a Devhelp project"
+	@echo "  epub       to make an epub"
+	@echo "  latex      to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
+	@echo "  latexpdf   to make LaTeX files and run them through pdflatex"
+	@echo "  text       to make text files"
+	@echo "  man        to make manual pages"
+	@echo "  texinfo    to make Texinfo files"
+	@echo "  info       to make Texinfo files and run them through makeinfo"
+	@echo "  gettext    to make PO message catalogs"
+	@echo "  changes    to make an overview of all changed/added/deprecated items"
+	@echo "  linkcheck  to check all external links for integrity"
+	@echo "  doctest    to run all doctests embedded in the documentation (if enabled)"
+
+clean:
+	-rm -rf $(BUILDDIR)/*
+
+html:
+	$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
+	@echo
+	@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
+
+dirhtml:
+	$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
+	@echo
+	@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
+
+singlehtml:
+	$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
+	@echo
+	@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
+
+pickle:
+	$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
+	@echo
+	@echo "Build finished; now you can process the pickle files."
+
+json:
+	$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
+	@echo
+	@echo "Build finished; now you can process the JSON files."
+
+htmlhelp:
+	$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
+	@echo
+	@echo "Build finished; now you can run HTML Help Workshop with the" \
+	      ".hhp project file in $(BUILDDIR)/htmlhelp."
+
+qthelp:
+	$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
+	@echo
+	@echo "Build finished; now you can run "qcollectiongenerator" with the" \
+	      ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
+	@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/django-formrenderingtools.qhcp"
+	@echo "To view the help file:"
+	@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/django-formrenderingtools.qhc"
+
+devhelp:
+	$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
+	@echo
+	@echo "Build finished."
+	@echo "To view the help file:"
+	@echo "# mkdir -p $$HOME/.local/share/devhelp/django-formrenderingtools"
+	@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/django-formrenderingtools"
+	@echo "# devhelp"
+
+epub:
+	$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
+	@echo
+	@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
+
+latex:
+	$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
+	@echo
+	@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
+	@echo "Run \`make' in that directory to run these through (pdf)latex" \
+	      "(use \`make latexpdf' here to do that automatically)."
+
+latexpdf:
+	$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
+	@echo "Running LaTeX files through pdflatex..."
+	$(MAKE) -C $(BUILDDIR)/latex all-pdf
+	@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
+
+text:
+	$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
+	@echo
+	@echo "Build finished. The text files are in $(BUILDDIR)/text."
+
+man:
+	$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
+	@echo
+	@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
+
+texinfo:
+	$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
+	@echo
+	@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
+	@echo "Run \`make' in that directory to run these through makeinfo" \
+	      "(use \`make info' here to do that automatically)."
+
+info:
+	$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
+	@echo "Running Texinfo files through makeinfo..."
+	make -C $(BUILDDIR)/texinfo info
+	@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
+
+gettext:
+	$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
+	@echo
+	@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
+
+changes:
+	$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
+	@echo
+	@echo "The overview file is in $(BUILDDIR)/changes."
+
+linkcheck:
+	$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
+	@echo
+	@echo "Link check complete; look for any errors in the above output " \
+	      "or in $(BUILDDIR)/linkcheck/output.txt."
+
+doctest:
+	$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
+	@echo "Testing of doctests in the sources finished, look at the " \
+	      "results in $(BUILDDIR)/doctest/output.txt."

File docs/about/alternatives.txt

+############
+Alternatives
+############
+
+This document lists some projects which provide similar or complementary
+functionalities.
+
+
+******************
+django-floppyforms
+******************
+
+`django-floppyforms`_ deals with form widgets, which are not in the scope of
+``django-formrenderingtools``. The two projects offer complementary
+functionalities.
+
+
+********************************
+Gsoc2011: Revised form rendering
+********************************
+
+In 2011, the `Revised form rendering project`_, during Google Summer of Code,
+tried to:
+
+1. merge `django-floppyforms`_ in core Django;
+2. add similar functionality for form layouts in core Django.
+
+Part one was done pretty quick.
+
+Part two raised lots of discussions. The resulting plan was quite big. And
+(as far as I know) didn't succeed.
+
+Even if ``django-formrenderingtools`` introduced the #2 basic functionalities
+more than one year before, it wasn't well known (I guess it remains quite
+invisible as of July 2012) and wasn't considered as a candidate for
+implementation. It was mentioned in discussions. Some concepts influenced Gsoc
+proposal. But not more.
+
+The Gsoc ended, Django 1.4 was released in 2012. As of July 2012, there is no
+template-based form rendering in core Django.
+
+So, ``django-formrenderingtools`` keeps on being an option...
+
+.. note::
+
+   One big point in discussions during Gsoc was about performances: using
+   templates can generate many disk access and some overhead.
+   `django-floppyforms`_ has benchmarks and implemented optimizations.
+   ``django-formrenderingtools`` has none currently, but :doc:`contributions
+   are welcome </contribute>`!
+
+
+*******************
+django-crispy-forms
+*******************
+
+`django-crispy-forms`_ is about form layouts too. The main part is in Python
+code: helpers and layout classes (configuration).
+
+It could be an interesting alternative when you don't mind the layouts to be
+configured in Python code, i.e. when your web designers can contribute to
+Python code or when your developers do the web design.
+
+
+*****
+More?
+*****
+
+Of course there are other projects!
+As an example, around the Gsoc2011, some "proof-of-concept" projects appear.
+
+You can find some of them at http://www.djangopackages.com/grids/g/forms/
+
+
+**********
+References
+**********
+
+.. _`django-floppyforms`: http://pypi.python.org/pypi/django-floppyforms
+.. _`Revised form rendering project`: 
+   http://www.google-melange.com/gsoc/project/google/gsoc2011/gregmuellegger/5001
+.. _`django-crispy-forms`: http://pypi.python.org/pypi/django-crispy-forms/1.1.4

File docs/about/authors.txt

+.. include:: ../../AUTHORS

File docs/about/changes.txt

+.. include:: ../../CHANGELOG

File docs/about/index.txt

+###############################
+About django-formrenderingtools
+###############################
+
+This project was initiated in 2010 in order to help web designers focus on
+templates (pseudo-HTML) and CSS, whereas developers focus on Python code.
+
+.. toctree::
+   :maxdepth: 1
+
+   alternatives
+   license
+   authors
+   changes

File docs/about/license.txt

+.. include:: ../../LICENSE

File docs/conf.py

 
 import sys, os
 
+
+docs_dir = os.path.dirname(os.path.abspath(__file__))
+root_dir = os.path.dirname(docs_dir)
+
 # 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('.'))
 
 # -- General configuration -----------------------------------------------------
 
+# If your documentation needs a minimal Sphinx version, state it here.
+#needs_sphinx = '1.0'
+
 # Add any Sphinx extension module names here, as strings. They can be extensions
 # coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
 extensions = []
 source_suffix = '.txt'
 
 # The encoding of source files.
-#source_encoding = 'utf-8'
+source_encoding = 'utf-8'
 
 # The master toctree document.
 master_doc = 'index'
 
 # General information about the project.
 project = u'django-formrenderingtools'
-copyright = u'2010-2011, Benoit Bryon'
+copyright = u'2010-2012, Benoit Bryon'
 
 # The version info for the project you're documenting, acts as replacement for
 # |version| and |release|, also used in various other places throughout the
 # built documents.
 #
+# The full version, including alpha/beta/rc tags.
+release = open(os.path.join(root_dir, 'VERSION')).read().strip()
+version_info = release.split('.')
 # The short X.Y version.
-version = '0.2'
-# The full version, including alpha/beta/rc tags.
-release = '0.2.1'
+version = '.'.join(version_info[0:1])
 
 # The language for content autogenerated by Sphinx. Refer to documentation
 # for a list of supported languages.
-#language = None
+language = 'en'
 
 # There are two options for replacing |today|: either, you set today to some
 # non-false value, then it is used:
 # Else, today_fmt is used as the format for a strftime call.
 #today_fmt = '%B %d, %Y'
 
-# List of documents that shouldn't be included in the build.
-#unused_docs = []
-
-# List of directories, relative to source directory, that shouldn't be searched
-# for source files.
-exclude_trees = ['_build']
+# List of patterns, relative to source directory, that match files and
+# directories to ignore when looking for source files.
+exclude_patterns = ['_build']
 
 # The reST default role (used for this markup: `text`) to use for all documents.
 #default_role = None
 
 # -- Options for HTML output ---------------------------------------------------
 
-# The theme to use for HTML and HTML Help pages.  Major themes that come with
-# Sphinx are currently 'default' and 'sphinxdoc'.
+# The theme to use for HTML and HTML Help pages.  See the documentation for
+# a list of builtin themes.
 html_theme = 'default'
 
 # Theme options are theme-specific and customize the look and feel of a theme
 #html_additional_pages = {}
 
 # If false, no module index is generated.
-#html_use_modindex = True
+#html_domain_indices = True
 
 # If false, no index is generated.
 #html_use_index = True
 # If true, links to the reST sources are added to the pages.
 #html_show_sourcelink = True
 
+# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
+#html_show_sphinx = True
+
+# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
+#html_show_copyright = True
+
 # If true, an OpenSearch description file will be output, and all pages will
 # contain a <link> tag referring to it.  The value of this option must be the
 # base URL from which the finished HTML is served.
 #html_use_opensearch = ''
 
-# If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml").
-#html_file_suffix = ''
+# This is the file name suffix for HTML files (e.g. ".xhtml").
+#html_file_suffix = None
 
 # Output file base name for HTML help builder.
 htmlhelp_basename = 'django-formrenderingtoolsdoc'
 
 # -- Options for LaTeX output --------------------------------------------------
 
-# The paper size ('letter' or 'a4').
-#latex_paper_size = 'letter'
+latex_elements = {
+# The paper size ('letterpaper' or 'a4paper').
+#'papersize': 'letterpaper',
 
 # The font size ('10pt', '11pt' or '12pt').
-#latex_font_size = '10pt'
+#'pointsize': '10pt',
+
+# Additional stuff for the LaTeX preamble.
+#'preamble': '',
+}
 
 # Grouping the document tree into LaTeX files. List of tuples
 # (source start file, target name, title, author, documentclass [howto/manual]).
 # not chapters.
 #latex_use_parts = False
 
-# Additional stuff for the LaTeX preamble.
-#latex_preamble = ''
+# If true, show page references after internal links.
+#latex_show_pagerefs = False
+
+# If true, show URL addresses after external links.
+#latex_show_urls = False
 
 # Documents to append as an appendix to all manuals.
 #latex_appendices = []
 
 # If false, no module index is generated.
-#latex_use_modindex = True
+#latex_domain_indices = True
+
+
+# -- Options for manual page output --------------------------------------------
+
+# One entry per manual page. List of tuples
+# (source start file, name, description, authors, manual section).
+man_pages = [
+    ('index', 'django-formrenderingtools', u'Django-formrenderingtools Documentation',
+     [u'Benoit Bryon'], 1)
+]
+
+# If true, show URL addresses after external links.
+#man_show_urls = False
+
+
+# -- Options for Texinfo output ------------------------------------------------
+
+# Grouping the document tree into Texinfo files. List of tuples
+# (source start file, target name, title, author,
+#  dir menu entry, description, category)
+texinfo_documents = [
+  ('index', 'django-formrenderingtools', u'Django-formrenderingtools Documentation',
+   u'Benoit Bryon', 'django-formrenderingtools', 'One line description of project.',
+   'Miscellaneous'),
+]
+
+# Documents to append as an appendix to all manuals.
+#texinfo_appendices = []
+
+# If false, no module index is generated.
+#texinfo_domain_indices = True
+
+# How to display URL addresses: 'footnote', 'no', or 'inline'.
+#texinfo_show_urls = 'footnote'

File docs/contribute.txt

 Contribution guidelines
 #######################
 
-**************************************************************************
-Install django-formrenderingtools and initialize a development environment
-**************************************************************************
+
+*****************************
+Get a development environment
+*****************************
 
 .. code-block:: bash
 
-  # Get the source
+  # Get the source.
   hg clone http://bitbucket.org/benoitbryon/django-formrenderingtools
-  # Optional but recommended: create a virtual environment
-  virtualenv --distribute --no-site-packages django-formrenderingtools
-  source django-formrenderingtools/bin/activate
-  # Installation with buildout
-  cd django-formrenderingtools
-  python bootstrap.py -d
-  bin/buildout
+  cd django-formrenderingtools/
+  # Install.
+  make develop
   # You can run the tests!
-  bin/test
+  make test
 
-If everything went fine, you have a buildout environment and can test the 
-application.
+If everything went fine, you have a everything you need in the folder. Have a
+look at the provided :file:`Makefile` for details.
+
+If a proble occurred, look at the provided :file:`Makefile`. It is the live
+install-for-development documentation.
+
 
 **********
-Contribute
+Guidelines
 **********
 
-* Create issues if necessary.
-* Create a branch per issue. See 
-  https://bitbucket.org/benoitbryon/django-formrenderingtools/issues/
-* Make your changes
-* Test with bin/test
-* Write documentation in docs/
-* Generate and check documentation with bin/sphinx and a web browser
-* Commit and push
+* Create issues, preferably before starting to hack, so that we can discuss as
+  soon as possible.
+* Work in branches, ideally one branch per issue.
+* Write tests and run them with ``make test``.
+* Write documentation in :file:`docs/`. Build it with ``make documentation``.
+* Update the demo project in :file:`demo/`.

File docs/index.txt

 django-formrenderingtools's documentation
 #########################################
 
-django-formrenderingtools is an application for the `Django framework
-<http://www.djangoproject.com/>`_.
-It provides tools for the template designer to customize forms.
+Customize layout of forms in templates, not in Python code.
 
-Rather than using {{ form.as_p }}, set up and reuse templates to render 
-Django's form elements.
+``django-formrenderingtools`` is an application for the `Django framework
+<http://www.djangoproject.com/>`_. It provides tools to customize form
+rendering with templates.
+
+Rather than using {{ form.as_p }} and Python code, set up and reuse templates
+to render Django's form elements.
+
+As an example, to reproduce Django's ``{{ form.as_p }}``:
+
+.. code-block:: django
+
+  {% load form_layouts %}
+
+  <form>
+    {% form layout="as_p" %}
+    <input type="submit">
+  </form>
 
 For the impatient, jump to the :doc:`/demo` to discover and try the application
 in a sandbox.
 
-Notice that Django-formrenderingtools is not intended to customize widgets.
-Have a look at `django-floppyforms
-<http://pypi.python.org/pypi/django-floppyforms>`_ for this purpose.
+.. note::
+
+   Notice that Django-formrenderingtools is not intended to customize widgets.
+   Have a look at `django-floppyforms
+   <http://pypi.python.org/pypi/django-floppyforms>`_ for this purpose.
+
 
 ********
 Contents
    migrate
    best_practices
    contribute
-   LICENSE
-   AUTHORS
-   CHANGES
+   about/index
+
 
 *****
 Links
   <http://pypi.python.org/pypi/django-formrenderingtools>`_
   in the Python package index.
 
+
 *******************
 Credits and license
 *******************
 
-This application is published under the BSD license. See :doc:`LICENSE` and 
-:doc:`AUTHORS` for details.
+This application is published under the BSD license. See :doc:`about/license`
+and :doc:`about/authors` for details.

File etc-templates/buildout/buildout.cfg

+# Main configuration file for zc.buildout.
+[buildout]
+# Load configuration from specific files.
+# "extends" are loaded **before** this one.
+extends =
+    directories.cfg
+    versions.cfg
+    django-formrenderingtools.cfg
+    documentation.cfg
+    releaser.cfg
+# Placeholder for default Python projects to share accross configuration
+# sections.
+eggs +=

File etc-templates/buildout/directories.cfg

+# Buildout's directories configuration.
+# 
+# Put buildout generated files in lib/buildout instead of in current directory.
+# See http://www.marmelune.net/en/python/buildout/tidy-buildout-directories/
+# 
+# Paths are implicitely relative to ${buildout:directory}.
+[buildout]
+# Overrides ${buildout:directory}
+extends = directories-local.cfg
+bin-directory = bin
+develop-eggs-directory = lib/buildout/develop-eggs
+downloads-directory = lib/buildout/downloads
+downloads-cache = lib/buildout/downloads-cache
+eggs-directory = lib/buildout/eggs
+installed = lib/buildout/.installed.cfg
+parts-directory = lib/buildout/parts

File etc-templates/buildout/django-formrenderingtools.cfg

+# Buildout configuration file for postbox.front component.
+[buildout]
+eggs +=
+    django-formrenderingtools   
+    bpython
+    django-nose
+    rednose
+    coverage
+develop = ${buildout:directory}
+parts +=
+    django
+    django-directories
+
+[django]
+recipe = djangorecipe
+project = demo
+settings = settings
+test = formrenderingtools
+eggs = ${buildout:eggs}
+
+[django-directories]
+recipe = z3c.recipe.mkdir
+paths =
+    ${buildout:directory}/var

File etc-templates/buildout/documentation.cfg

+# Configuration for documentation builder.
+[buildout]
+parts +=
+    documentation-builder
+    readme-builder
+
+[documentation-builder]
+recipe = z3c.recipe.scripts
+eggs =
+    ${buildout:eggs}
+    sphinx
+
+[readme-builder]
+recipe = z3c.recipe.scripts
+eggs = zc.rst2

File etc-templates/buildout/releaser.cfg

+# Buildout configuration to deploy zest.releaser.
+[buildout]
+parts += releaser
+
+[releaser]
+recipe = zc.recipe.egg
+eggs = zest.releaser

File etc-templates/buildout/versions-kgs.cfg

+# Know good set (KGS) of versions, generated automatically by zc.buildout,
+# or more accurately by buildout-versions extension.
+# 
+# Note: the versions pinned here are those which have not been explicitely
+# pinned yet. If your project requires an explicit version of a dependency,
+# you should specify it in "versions" part of versions.cfg.
+# 
+# If you want to upgrade some dependencies for your project:
+# 
+# * Delete some lines below;
+# * Run buildout again.
+[versions]
+
+# Added by Buildout Versions at 2012-07-24 15:03:11.585407
+Django = 1.4
+Jinja2 = 2.6
+Pygments = 1.5
+Sphinx = 1.1.3
+bpython = 0.11
+buildout-versions = 1.7
+coverage = 3.5.2
+distribute = 0.6.28
+django-nose = 1.1
+django-templateaddons = 0.1
+djangorecipe = 1.2.1
+nose = 1.1.2
+python-termstyle = 0.1.9
+rednose = 0.3
+z3c.recipe.mkdir = 0.5
+z3c.recipe.scripts = 1.0.1
+zc.rst2 = 0.2
+zest.releaser = 3.37
+
+# Required by:
+# zc.rst2==0.2
+docutils = 0.9.1
+
+# Required by:
+# djangorecipe==1.2.1
+zc.buildout = 1.5.2
+
+# Required by:
+# djangorecipe==1.2.1
+zc.recipe.egg = 1.3.2

File etc-templates/buildout/versions.cfg

+# Manage versions of dependencies.
+# 
+# This file is used with versions-kgs.cfg to freeze dependencies version
+# numbers, so that your build is repeatable:
+#
+# * versions.cfg contains versions explicitely required by the project, i.e.
+#   versions you manually set. As an example, you may require version 1.3 of
+#   the Django project.
+# 
+# * versions-kgs.cfg contains versions automatically collected by build tools,
+#   i.e. a known good set of versions. As an example, if you don't explicitely
+#   require a version for Sphinx, the 1.1.3 version may be chosen
+#   automatically.
+[buildout]
+extensions += buildout-versions
+extends = versions-kgs.cfg
+buildout_versions_file = ${buildout:directory}/etc/buildout/versions-kgs.cfg
+versions = versions
+
+[versions]
+# Pin here versions that are explicitely required by the project.
+# Implicit dependencies will be pinned automatically in versions-kgs.cfg.

File etc-templates/nose.cfg

+[nosetests]
+verbosity = 2
+with-doctest = True
+rednose = 1
+with-coverage = True
+cover-erase = True
+cover-package = djc.formrenderingtools
+no-path-adjustment = True
+where = djc/

File requirements.txt

-Django==1.3
-distribute==0.6.10
-django-templateaddons==0.1
-wsgiref==0.1.2
 [upload_docs]
-upload-dir = docs/_build/html
+upload-dir = var/docs/html
 
 [build_sphinx]
 source-dir = docs
-build-dir  = docs/_build
+build-dir  = var/docs
 all_files  = 1
 # coding=utf-8
-import os.path
-from setuptools import setup, find_packages
+"""Python packaging."""
+import os
+from setuptools import setup
+
 
 def read_relative_file(filename):
-    """Returns contents of the given file.
-    Filename argument must be relative to this module.
-    """
+    """Returns contents of the given file, which path is supposed relative
+    to this module."""
     with open(os.path.join(os.path.dirname(__file__), filename)) as f:
         return f.read()
 
-setup(
-    name='django-formrenderingtools',
-    version='0.2.1',
-    url='http://bitbucket.org/benoitbryon/django-formrenderingtools',
-    download_url='http://bitbucket.org/benoitbryon/django-formrenderingtools/downloads',
-    author='Benoit Bryon',
-    author_email='benoit@marmelune.net',
-    license='BSD',
-    description="Template-based rendering of Django forms (excluding widgets).",
-    long_description=read_relative_file('README.txt'),
-    platforms='Any',
-    classifiers = [
-        'Development Status :: 4 - Beta',
-        'License :: OSI Approved :: BSD License',
-        'Operating System :: OS Independent',
-        'Framework :: Django',
-    ],
-    packages=find_packages(),
-    namespace_packages=['djc'],
-    include_package_data = True,
-    install_requires=[
-        'setuptools',
-        'django>=1.0',
-        'django-templateaddons>=0.1'
-    ],
+
+name = 'django-formrenderingtools'
+version = read_relative_file('VERSION').strip()
+readme = read_relative_file('README')
+packages = ['djc']
+namespace_packages = packages
+
+
+setup(name=name,
+      version=version,
+      description="Template-based rendering of Django forms layouts (not widgets).",
+      long_description=readme,
+      platforms='Any',
+      classifiers = ['Development Status :: 4 - Beta',
+                     'License :: OSI Approved :: BSD License',
+                     'Operating System :: OS Independent',
+                     'Framework :: Django',
+      ],
+      keywords='templates forms layout',
+      author='Benoit Bryon',
+      author_email='benoit@marmelune.net',
+      license='BSD',
+      url='http://bitbucket.org/benoitbryon/django-formrenderingtools',
+      download_url='http://bitbucket.org/benoitbryon/django-formrenderingtools/downloads',
+      packages=packages,
+      namespace_packages=namespace_packages,
+      include_package_data=True,
+      zip_safe=False,
+      install_requires=['setuptools',
+                        'django>=1.0',
+                        'django-templateaddons>=0.1'
+      ],
+      entry_points={},
 )