Skip to content

Instantly share code, notes, and snippets.

@danfairs
Created July 12, 2012 08:57
Show Gist options
  • Save danfairs/3096838 to your computer and use it in GitHub Desktop.
Save danfairs/3096838 to your computer and use it in GitHub Desktop.
profile
class UserProfileForm(forms.ModelForm):
class Meta:
model = UserProfile
def __init__(self, *args, **kwargs):
super(UserProfileForm, self).__init__(*args, **kwargs)
self.fields['country'].queryset = Country.on_site.all()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment