Skip to content

Instantly share code, notes, and snippets.

Last active Dec 26, 2015
What would you like to do?
from django import forms
from django.forms import ModelForm
from import Author
class UpdateAuthorForm(ModelForm):
name = forms.CharField(
def save(self, commit=True):
instance = super(UpdateAuthorForm, self).save(commit=False)
if commit:
# save['name'])
return instance
class Meta:
model = Author
fields = ('name',)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment