verbose_name='Home Address'
Hi I am new to Django working on Google App Engine.
class StudentAddress(db.Model):
name=db.UserProperty()
address=db.StringProperty(verbose_name='Home Address')
class StudentAddressForm(djangoforms.ModelForm):
class Meta:
moddel = StudentAddress
When the form is displayed, verbose name comes like this : Home address
How do 开发者_StackOverflowI code for the display to come as 'Home Address' instead of 'Home address' ? Please help.
class StudentAddressForm(djangoforms.ModelForm):
def __init__(self):
super(StudentAddressForm, self).__init__(*args, **kwargs)
self.fields['address'].label = 'whatever you like'
class Meta:
model = StudentAddress
精彩评论