Guest User

Untitled

a guest
May 25th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. referenced_catalog = forms.ModelChoiceField(
  2. queryset=Inventory_unit_catalog.objects.all().filter(parent_business_unit_context_id=user_context_id),
  3.  
  4. def __init__(self, *args, **kwargs):
  5. self.user_context_id = kwargs.pop('user_context_id', None)
  6. super(InventoryStockAddForm, self).__init__(*args, **kwargs)
  7.  
  8. SessionStore = import_module(settings.SESSION_ENGINE).SessionStore
  9. s = SessionStore()
  10. user_context_id = s['user_context_id']
Add Comment
Please, Sign In to add comment