<s> from django import forms <EOL> class DeliveryForm ( forms . Form ) : <EOL> address = forms . CharField ( ) <EOL> pickup = forms . BooleanField ( required = False ) <EOL> state = forms . ChoiceField ( required = False , choices = ( ( "<STR_LIT>" , "<STR_LIT>" ) , ( "<STR_LIT>" , "<STR_LIT>" ) ) ) <EOL> def __init__ ( self , * args , ** kwargs ) : <EOL> self . instance = kwargs . pop ( '<STR_LIT>' , None ) <EOL> super ( DeliveryForm , self ) . __init__ ( * args , ** kwargs ) <EOL> def save ( self , commit = True ) : <EOL> self . instance . address = self . cleaned_data [ '<STR_LIT:address>' ] <EOL> self . instance . save ( ) </s>
