Permalink
Browse files

Only natlangs can be native tongues

  • Loading branch information...
1 parent 9f29758 commit ab0cbb0c8672f88ed1e1b20d97d6a14f576d552e @kaleissin committed Sep 24, 2010
Showing with 4 additions and 2 deletions.
  1. +4 −2 CALS/cals/forms.py
View
@@ -187,11 +187,13 @@ class Meta:
class ProfileForm(forms.ModelForm):
country = forms.ModelChoiceField(Country.objects.all(), required=False)
-# def __init__(self, *args, **kwargs):
-# super(ProfileForm, self).__init__(*args, **kwargs)
+ def __init__(self, *args, **kwargs):
+ super(ProfileForm, self).__init__(*args, **kwargs)
+ self.fields['native_tongue'].queryset = Language.natlangs.all()
# self.fields.keyOrder = ['username', 'first_name', 'last_name',
# 'email', 'homepage', 'homepage_title', 'country']
+
class Meta:
model = Profile
exclude = ('user', 'is_visible', 'date_format', 'secret',

0 comments on commit ab0cbb0

Please sign in to comment.