¡@

Home 

python Programming Glossary: serviceform

Django Passing Custom Form Parameters to Formset

http://stackoverflow.com/questions/622982/django-passing-custom-form-parameters-to-formset

Formset I have a Django Form that looks like this class ServiceForm forms.Form option forms.ModelChoiceField queryset ServiceOption.objects.none.. self args kwargs affiliate kwargs.pop 'affiliate' super ServiceForm self .__init__ args kwargs self.fields option .queryset ServiceOption.objects.filter.. affiliate I call this form with something like this form ServiceForm affiliate request.affiliate Where request.affiliate is the logged..