Dynamic, database-driven Django forms
Python JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
dataforms removed choice answer column. Jan 8, 2013
docs updates to docs. Nov 22, 2011
example renamed settings to app_settings for consistancy Nov 18, 2011
.gitignore -added migrations Nov 2, 2011
LICENSE adding authors, license, manifest, and more docs. Apr 3, 2011
MANIFEST.in Added static and templates to manifest so they can be pulled from set… Aug 26, 2011
README.rst updating readme and docs. Nov 21, 2011
setup.py Edited setup.py via GitHub Aug 15, 2011


Django Dataforms

django-dataforms is a wrapper for the Django forms API that lets you dynamically define forms in a database, rather than hard-coding form definitions. This can be

especially helpful for projects that have many forms and/or forms which constantly change, and you don't want to be constantly updating models and schemas. No model creation required.

See the Documentaion for more information.

Go from this...

# forms.py
from django import forms

class ContactForm(forms.Form):
    subject = forms.CharField(max_length=100)
    message = forms.CharField()
    sender = forms.EmailField()
    cc_myself = forms.BooleanField(required=False)

# view.py
def contact(request):
    if request.method == 'POST':
        form = ContactForm(request.POST)
        # ...
        form = ContactForm()

    return render_to_response('contact.html', {'form': form,})

To this!

# Now your form is stored in the database and you can
# change it without changing a model and DB schema!
create_form(request, form="contact-form" submission="mySubmission")