Example #1
0
 class Meta:
     model = Signal
     fields = (
         '_links',
         '_display',
         'id',
         'signal_id',
         'source',
         'text',
         'text_extra',
         'status',
         'location',
         'category',
         'reporter',
         'priority',
         'created_at',
         'updated_at',
         'incident_date_start',
         'incident_date_end',
         'operational_date',
         'has_attachments',
         'extra_properties',
         'notes',
     )
     read_only_fields = (
         'created_at',
         'updated_at',
         'has_attachments',
     )
     extra_kwargs = {
         'source': {
             'validators': [SignalSourceValidator()]
         },
     }
Example #2
0
 class Meta:
     model = Signal
     fields = (
         '_links',
         '_display',
         'id',
         'signal_id',
         'source',
         'text',
         'text_extra',
         'status',
         'location',
         'category',
         'reporter',
         'priority',
         'type',
         'created_at',
         'updated_at',
         'incident_date_start',
         'incident_date_end',
         'operational_date',
         'has_attachments',
         'extra_properties',
         'notes',
         'directing_departments',
         'finished_by',
         'country',
         'city',
         'city_object',
         'webform_kenmark',
         'mb_report_id',
         'facilitator_report_id',
         'report_days',
         'forman_emp_name',
         'urgency',
         'plan_time',
         'updates',
         'updated_by',
     )
     read_only_fields = (
         'created_at',
         'updated_at',
         'has_attachments',
     )
     extra_kwargs = {
         'source': {
             'validators': [SignalSourceValidator()]
         },
     }
Example #3
0
 class Meta(object):
     model = Signal
     fields = (
         'id',
         'signal_id',
         'source',
         'text',
         'text_extra',
         'location',
         'category',
         'reporter',
         'status',
         'priority',
         'created_at',
         'updated_at',
         'incident_date_start',
         'incident_date_end',
         'operational_date',
         'image',
         'attachments',
         'extra_properties',
     )
     read_only_fields = (
         'id',
         'signal_id',
         'created_at',
         'updated_at',
         'status',
         'image'
         'attachments',
     )
     extra_kwargs = {
         'id': {
             'label': 'ID'
         },
         'signal_id': {
             'label': 'SIGNAL_ID'
         },
         'source': {
             'validators': [SignalSourceValidator()]
         },
     }
Example #4
0
 class Meta:
     model = Signal
     list_serializer_class = _SignalListSerializer
     fields = ('_links', '_display', 'id', 'signal_id', 'source', 'text',
               'text_extra', 'status', 'location', 'category', 'reporter',
               'priority', 'type', 'created_at', 'updated_at',
               'incident_date_start', 'incident_date_end',
               'operational_date', 'has_attachments', 'extra_properties',
               'notes', 'directing_departments', 'routing_departments',
               'attachments', 'parent', 'has_parent', 'has_children',
               'assigned_user_id')
     read_only_fields = (
         'created_at',
         'updated_at',
         'has_attachments',
         'has_parent',
         'has_children',
     )
     extra_kwargs = {
         'source': {
             'validators': [SignalSourceValidator()]
         },
     }