Advertisement
Mochinov

Untitled

Apr 19th, 2022
876
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.22 KB | None | 0 0
  1. ---- submission_request_resource_serializer.py
  2.  
  3. from misc.views.generic_serializer import GenericSerializer
  4. from users.models import SubmissionRequest, User
  5.  
  6.  
  7. class SubmissionRequestSerializer(GenericSerializer):
  8.     class Meta:
  9.         model = User
  10.         fields = []
  11.  
  12.  
  13.  
  14. ---- tables.py
  15.  
  16. class SubmissionRequestTable(GenericTable):
  17.     """Таблица Запросов."""
  18.  
  19.     from users.models import SubmissionRequest
  20.     from crm_control.views.serializers.submission_request_resource_serializer import SubmissionRequestSerializer
  21.  
  22.     name = 'SubmissionRequest'
  23.     verbose = 'Запросы'
  24.     url = reverse('submission_request_list')
  25.     icon = 'AccountVoice'
  26.     permission = 'users.crm_users_can_view_employee'
  27.     serializer = SubmissionRequestSerializer
  28.     # element_serializer = SubmissionRequestSerializer
  29.     table_structure_method = TableStructureGenerator.get_user_table_structure
  30.     element_structure_method = ElementStructureGenerator.get_submission_request_resource_tab_for_user_element_structure
  31.     table_filters_structure_method = FilterStructureGenerator.get_social_media_employee_element_structure
  32.     create_element_method = CreateElementStructureGenerator.get_default_element_structure
  33.  
  34.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement