Hello All!
I try pass initial parameters to form, with choise.
But it's not work.
class PhoneNumber(db.Model):
number = db.StringProperty()
phone_type = db.StringProperty(
choices=('work', 'cell'))
class PhoneNumberForm(djangoforms.ModelForm):
class Meta:
model = PhoneNumber
def newp(request):
user = users.GetCurrentUser()
form = PhoneNumberForm(initial={'phone_type':(('1','w'),
('2','r'))})
return respond(request, user, 'addst', {'form': form})
Why choise list 'w', 'r' are ignored?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---