Disclaimer: Just in case this was a naive mistake on my part, I posted this on django-users first [1] and posed the question several times on #django, but have received no answers.
#------------------------------------------------------------ # forms.py: #------------------------------------------------------------ from django import forms class TestForm(forms.Form): test_field = forms.BooleanField() #------------------------------------------------------------ #------------------------------------------------------------ # test.py: #------------------------------------------------------------ # import the same class from two different locations: from project_name.forms import TestForm from project_name.some_module.forms import TestForm as TestForm2 class MyForm(TestForm): extra_field = forms.BooleanField() print MyForm().fields.keys() # prints: ['test_field', 'extra_field'] as expected class MyForm2(TestForm2): extra_field = forms.BooleanField() print MyForm2().fields.keys() # prints: ['test_field'] # extra fields not registered if superclass imported from other app/module! #------------------------------------------------------------ Python 2.6.4, Django SVN-12401 Is this a bug? The same happens if you try to import, say, django.contrib.auth.forms.AuthenticationForm and subclass it. Surely I'm missing something here? Simon [1] http://groups.google.com/group/django-users/browse_thread/thread/b4b4ddd684b352e1 -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-develop...@googlegroups.com. To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-developers?hl=en.