<s> from __future__ import unicode_literals <EOL> from django import forms <EOL> from hunger . models import Invitation , InvitationCode <EOL> class InviteSendForm ( forms . ModelForm ) : <EOL> class Meta : <EOL> model = Invitation <EOL> fields = ( '<STR_LIT:email>' , ) <EOL> def __init__ ( self , * args , ** kwargs ) : <EOL> super ( InviteSendForm , self ) . __init__ ( * args , ** kwargs ) <EOL> self . fields [ '<STR_LIT:email>' ] . required = True <EOL> class InvitationCodeAdminForm ( forms . ModelForm ) : <EOL> code = forms . CharField ( <EOL> initial = lambda : InvitationCode . generate_invite_code ( ) ) <EOL> class Meta : <EOL> model = InvitationCode <EOL> exclude = ( ) </s>
