views:

66

answers:

1

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 I code for the display to come as 'Home Address' instead of 'Home address' ? Please help.

A: 
class StudentAddressForm(djangoforms.ModelForm):

  def __init__(self):
    super(StudentAddressForm, self).__init__(*args, **kwargs)
    self.fields['address'].label = 'whatever you like'

  class Meta:
    model = StudentAddress 
Pickels