Source

Lightning Talks / lightning / common / forms.py

Full commit
import floppyforms as forms

from django.contrib.auth.models import User

from uni_form.helpers import FormHelper, Submit, Reset

class ProfileForm(forms.ModelForm):
    class Meta:
        model = User
        fields = ('first_name', 'last_name', 'email')

    def __init__(self, *args, **kwargs):
        super(ProfileForm, self).__init__(*args, **kwargs)
        self.fields['email'].help_text = "Never shown on the site"

    @property
    def helper(self):
        helper = FormHelper()
        submit = Submit('save', 'Save', **{'css_class': 'primary'})
        helper.add_input(submit)
        helper.form_action = ''
        helper.form_method = 'POST'
        return helper