add all fields to ordering_fields filter
This commit is contained in:
@@ -40,31 +40,34 @@ class AutoEvaluationView(BaseViewSetMixin, ModelViewSet):
|
|||||||
"car_number",
|
"car_number",
|
||||||
]
|
]
|
||||||
ordering_fields = [
|
ordering_fields = [
|
||||||
"registration_number",
|
"id",
|
||||||
"contract_date",
|
"contract_date",
|
||||||
"object_inspection_date",
|
"object_inspection_date",
|
||||||
"rate_date",
|
"object_owner_individual_person_passport_num",
|
||||||
"rate_report_date",
|
|
||||||
"rate_object_name",
|
|
||||||
"object_type",
|
|
||||||
"object_owner_type",
|
"object_owner_type",
|
||||||
"object_location_province",
|
"object_owner_individual_person_f_name",
|
||||||
"object_location_district",
|
"object_owner_individual_person_l_name",
|
||||||
"object_location_city",
|
"object_owner_individual_person_p_name",
|
||||||
|
"object_owner_legal_entity",
|
||||||
|
"object_owner_legal_inn",
|
||||||
"tex_passport_serie_num",
|
"tex_passport_serie_num",
|
||||||
"tex_passport_gived_date",
|
"rating_goal",
|
||||||
|
"object_location_province",
|
||||||
|
"registration_number",
|
||||||
|
"object_type",
|
||||||
|
"object_type_display",
|
||||||
"car_brand",
|
"car_brand",
|
||||||
"car_model",
|
"car_model",
|
||||||
"car_number",
|
"car_number",
|
||||||
"manufacture_year",
|
"manufacture_year",
|
||||||
"car_color",
|
"car_color",
|
||||||
"property_rights",
|
"status",
|
||||||
"form_ownership",
|
"status_display",
|
||||||
|
"created_at",
|
||||||
"value_determined",
|
"value_determined",
|
||||||
"rate_type",
|
"rate_type",
|
||||||
"status",
|
"property_rights",
|
||||||
"created_at",
|
"form_ownership",
|
||||||
"updated_at",
|
|
||||||
]
|
]
|
||||||
ordering = ["-created_at"]
|
ordering = ["-created_at"]
|
||||||
|
|
||||||
|
|||||||
@@ -43,7 +43,14 @@ class AutoEvaluationHistoryView(BaseViewSetMixin, ReadOnlyModelViewSet):
|
|||||||
|
|
||||||
filter_backends = [DjangoFilterBackend, OrderingFilter]
|
filter_backends = [DjangoFilterBackend, OrderingFilter]
|
||||||
filterset_class = AutoevaluationhistoryFilter
|
filterset_class = AutoevaluationhistoryFilter
|
||||||
ordering_fields = ["created_at"]
|
ordering_fields = [
|
||||||
|
"id",
|
||||||
|
"event_type",
|
||||||
|
"event_type_display",
|
||||||
|
"actor",
|
||||||
|
"meta",
|
||||||
|
"created_at",
|
||||||
|
]
|
||||||
ordering = ["created_at"]
|
ordering = ["created_at"]
|
||||||
|
|
||||||
action_permission_classes = {}
|
action_permission_classes = {}
|
||||||
|
|||||||
@@ -35,11 +35,28 @@ class EvaluationrequestView(BaseViewSetMixin, ModelViewSet):
|
|||||||
"tex_passport",
|
"tex_passport",
|
||||||
]
|
]
|
||||||
ordering_fields = [
|
ordering_fields = [
|
||||||
|
"id",
|
||||||
|
"rate_type",
|
||||||
|
"rate_type_display",
|
||||||
|
"object_type",
|
||||||
|
"object_type_display",
|
||||||
|
"customer_inn_number",
|
||||||
|
"owner_inn_number",
|
||||||
|
"tex_passport",
|
||||||
|
"value_determined",
|
||||||
|
"rate_goal",
|
||||||
|
"property_rights",
|
||||||
|
"form_ownership",
|
||||||
|
"worked_hours",
|
||||||
|
"chassi",
|
||||||
|
"need_delivering",
|
||||||
|
"location",
|
||||||
|
"location_name",
|
||||||
|
"status",
|
||||||
|
"status_display",
|
||||||
|
"user",
|
||||||
"created_at",
|
"created_at",
|
||||||
"updated_at",
|
"updated_at",
|
||||||
"rate_type",
|
|
||||||
"object_type",
|
|
||||||
"status",
|
|
||||||
]
|
]
|
||||||
ordering = ["-created_at"]
|
ordering = ["-created_at"]
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user