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