-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Jan 30, 2008, at 3:22 PM, Paul wrote: > > The BaseForm.__init__ sets self.fields to self.base_fields.copy() > before your __init__ is run. The correct way to change the label is: > > class TestForm(forms.Form): > somefield = forms.IntegerField(label='foo') Yes, but I won't know the value of 'foo' until runtime. There's no other way to set it? I don't want to hardcode a bunch of entries like "self.somefield = whatever" in __init__, either, because I'm trying to consolidate a bunch of ad-hoc code into a single inheritable class. - -- Kirk Strauser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (Darwin) iD8DBQFHoRX05sRg+Y0CpvERAurkAJ0e+UGaOyv8ofaTARs2GJPBK1qw7wCcC3rO p6N4YJ+wXbvOJddGxWdQeQY= =/lEi -----END PGP SIGNATURE----- --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---