hello everyone,


I'm trying to do subclassing using newforms, but anything in the subclass just doesn't get passed on to the superclass:


===================================================================
from django import newforms as forms

class BaseForm(forms.Form):
    field1 = forms.CharField()

class ExtendedForm(BaseForm):
    field2 = forms.CharField()

form1 = BaseForm()
print form1.as_ul()

# prints: u'<li><label for="id_field1">Field1:</label> <input type="text" name="field1" id="id_field1" /></li>'

form2 = ExtendedForm()
print form2.as_ul()

# prints: u'<li><label for="id_field2">Field2:</label> <input type="text" name="field2" id="id_field2" /></li>'
===================================================================


Is there a way to do this?


thanks,


 - bram


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to