from django.contrib import admin from .models import * @admin.register(Company) class CompanyAdmin(admin.ModelAdmin): list_display = ( 'id', 'legal_name', 'repr_id', 'inn', 'kpp', 'ogrn', 'bank_name', 'bik', 'ks', 'rs', 'address', 'requirements', 'status', 'ticket_status', 'id_metaservice', 'is_global', 'is_visible', ) list_filter = ('repr_id', 'ticket_status') @admin.register(Permissions) class PermissionsAdmin(admin.ModelAdmin): list_display = ( 'id', 'check_date', 'id_permissions', 'check_level', 'checked_by', 'user_id', 'status', 'ticket_status', 'id_metaservice', 'is_global', 'is_visible', ) list_filter = ('check_date', 'checked_by', 'user_id', 'ticket_status') @admin.register(ServiceType) class ServiceTypeAdmin(admin.ModelAdmin): list_display = ( 'id', 'codename', 'caption', 'description', 'requirements', 'price_type', 'status', 'ticket_status', 'id_metaservice', 'link_agreement', 'is_global', 'is_visible', ) list_filter = ('ticket_status',) @admin.register(Provider) class ProviderAdmin(admin.ModelAdmin): list_display = ( 'id', 'type', 'company_id', 'user_id', 'id_metaservice', 'requirements', 'status', 'ticket_status', 'location_type', 'default_location', 'is_global', 'is_visible', ) list_filter = ('company_id', 'user_id', 'ticket_status') @admin.register(Resource) class ResourceAdmin(admin.ModelAdmin): list_display = ( 'id', 'type_id', 'user_id', 'requirements', 'status', 'ticket_status', 'id_metaservice', 'is_global', 'is_visible', ) list_filter = ('user_id', 'ticket_status') @admin.register(Service) class ServiceAdmin(admin.ModelAdmin): list_display = ( 'id', 'servicetype_id', 'id_provider', 'resource_id', 'requirements', 'id_metaservice', 'price_alg', 'price_km', 'price_min', 'price_amount', 'service_status', 'status', 'ticket_status', 'is_global', 'is_visible', ) list_filter = ( 'servicetype_id', 'id_provider', 'resource_id', 'ticket_status', ) @admin.register(Documents) class DocumentsAdmin(admin.ModelAdmin): list_display = ( 'id', 'check_date', 'check_level', 'expire_date', 'id_metaservice', 'requirements', 'status', 'ticket_status', 'datalink', 'doc_type', 'user_id', 'company_id', 'is_global', 'is_visible', 'checked_by', ) list_filter = ( 'check_date', 'expire_date', 'ticket_status', 'user_id', 'company_id', 'checked_by', ) @admin.register(Client) class ClientAdmin(admin.ModelAdmin): list_display = ( 'id', 'user', 'requirements', 'status', 'ticket_status', 'id_metaservice', 'is_global', 'is_visible', ) list_filter = ('user', 'ticket_status') @admin.register(Orders) class OrdersAdmin(admin.ModelAdmin): list_display = ( 'id', 'service', 'service_type', 'state', 'id_metaservice', 'provider', 'receiver', 'client_id', 'time_created', 'time_placed', 'time_start', 'time_finish_predicted', 'time_finish_real', 'ticket', 'predicted_price', 'real_price', 'is_global', 'is_visible', ) list_filter = ( 'service', 'service_type', 'provider', 'receiver', 'client_id', 'time_created', 'time_placed', 'time_start', 'time_finish_predicted', 'time_finish_real', ) @admin.register(Relationship) class RelationshipAdmin(admin.ModelAdmin): list_display = ( 'id', 'user_id_who', 'user_id_whom', 'neg_type', 'id_metaservice', 'requirements', 'status', 'ticket_status', 'is_global', 'is_visible', ) list_filter = ('user_id_who', 'user_id_whom', 'ticket_status')