Closed arnecoomans closed 1 hour ago
''' Get Form Add User field when staff ''' def get_form(self): ''' Add User field for staff ''' if self.request.user.is_staff == True: self.fields.append('status') form = super(EditImageMaster, self).get_form() return form
Fields status and user are required but not visible for non staff users
Solution; dynamically change fields based on user status