django-dataforms is a Django application that that allows Django forms to be dynamically data-driven. Django form logic is abstracted to the database layer. This allows for quick updates to forms and gives the user access to modify forms through the Django admin interface.
django-dataforms has only been tested with 1.3. It might work with previous versions, but has not been tested as such.
django-dataforms uses JQuery for parts of the admin interface. JQuery-UI is also used for date picker fields.
To get this application up and running, please follow the steps below:
Create a Django production environment using the setup of your choice. Refer to: http://docs.djangoproject.com/en/dev/intro/install/
Create a new Django Project:
$ django-admin.py startproject <projectname>
Install django-bft to either your PYTHON_PATH or in a folder inside your project:
Install from pip:
$ pip install django-dataforms
Download and install from source:
$ python setup.py install
Install source to local directory:
$ python setup.py build $ cp build/lib/bft /<PROJECT_ROOT>/
Add the following to your settings.py file:
Add 'dataforms', 'staticfiles' and 'admin' to INSTALLED_APPS:
INSTALLED_APPS = ( ... 'django.contrib.admin', 'django.contrib.staticfiles', 'dataforms', )
Make sure your static file finders are configured:
STATICFILES_FINDERS = ( 'django.contrib.staticfiles.finders.AppDirectoriesFinder', )
To maintain data integrity, you'll need to add the transaction middleware to your settings.py. This will put all queries from each request into a single transaction—so if something goes wrong, all DB changes from the entire request will not be committed.:
MIDDLEWARE_CLASSES = ( # ... 'django.middleware.transaction.TransactionMiddleware', )
Modify app_settings.py as needed. See :doc:`settings` for specifics.
Don't forget to collect your static files and sync your database:
$ python manage.py syncdb $ python manage.py collectstatic
.. toctree:: :maxdepth: 2 :hidden: usage concepts settings validation forms diagram