django-formfield 0.1.3

A form field that accepts a Django form as its first argument
django-formfield
  3 Screenshots
django-formfield is a form field for Django that accepts a Django form as its first argument.

Installation

Installation is easy using pip or easy_install.

pip install django-formfield

or

easy_install django-formfield

Add to installed apps

INSTALLED_APPS = (
 ...
 formfield,
 ...
)


Getting Started

django-formfield is a form field that accepts a django form as its first argument, and validates as well as render's each form field as expected. Yes a form within a form, within a dream? There are two types of fields available, FormField and ModelFormField. For ModelFormField the data is stored in json format. For FormField data is simply returned as a python dictionary (form.cleaned_data).

Example

from django.db import models
from django import forms

from formfield import ModelFormField

class PersonMetaForm(forms.Form):
 age = forms.IntegerField()
 sex = forms.ChoiceField(choices=((1, 'male'), (2, 'female')), required=False)


class Person(models.Model):
 name = CharField(max_length=200)

 meta_info = ModelFormField(PersonMetaForm)

last updated on:
February 7th, 2013, 22:14 GMT
price:
FREE!
homepage:
github.com
license type:
The Apache License 2.0 
developed by:
Jose Soares
category:
ROOT \ Internet \ Django Plugins
django-formfield
Download Button

In a hurry? Add it to your Download Basket!

user rating

UNRATED
0.0/5
 

0/5

Rate it!
3 Screenshots
django-formfielddjango-formfield
What's New in This Release:
  • Fixed bug when a form's initial value evaludated to False
  • pep8 related fixes
read full changelog

Add your review!

SUBMIT