daily pastebin goal
80%
SHARE
TWEET

Untitled

a guest Oct 31st, 2012 29 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class NumberForm(forms.ModelForm):
  2.        
  3.         def __init__(self, *args, **kwargs):
  4.                 super(NumberForm, self).__init__(*args, **kwargs)
  5.                 self.fields['rooms'].queryset = kwargs['room_queryset']
  6.        
  7.         rooms = forms.ModelChoiceField(label='Room', queryset = Room.objects.none())   
  8.        
  9.         class Meta:
  10.                 model = Number
  11.                 fields = ('country','routing_rule','rooms')
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top