Added crude double-import detection to search registration. Added Django 1.2 fallback...
[philo.git] / models / fields / __init__.py
index 1f9603e..d900e31 100644 (file)
@@ -109,7 +109,8 @@ class SlugMultipleChoiceField(models.Field):
                                del kwargs[k]
                
                defaults.update(kwargs)
                                del kwargs[k]
                
                defaults.update(kwargs)
-               form_class = forms.TypedMultipleChoiceField
+               # Django 1.2 does not supply MultipleChoiceField
+               form_class = getattr(forms, 'TypedMultipleChoiceField', forms.MultipleChoiceField)
                return form_class(**defaults)
        
        def validate(self, value, model_instance):
                return form_class(**defaults)
        
        def validate(self, value, model_instance):