Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class ProductsForm(forms.Form):
- def __init__(self, *args, **kwargs):
- self.request = kwargs.pop('request', None)
- super(ProductsForm, self).__init__(*args, **kwargs)
- def list_prod(self):
- user_name = (self.request).user.username
- u = User.objects.get(username=user_name).accesslevel.prod.split(',')
- v=(('---------','---------'),)
- for l in u:
- v=v+((l.lstrip(),l.lstrip()),)
- model = Factory
- Lists = forms.ChoiceField(choices=list_prod())
Add Comment
Please, Sign In to add comment