from django.contrib import admin from metaservicesynced.models import Permissions, ServiceType, Provider, Documents, Client, Orders, Relationship @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', 'user_id', 'id_metaservice', 'requirements', 'status', 'ticket_status', 'location_type', 'default_location', 'is_global', 'is_visible', ) list_filter = ('user_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', 'is_global', 'is_visible', 'checked_by', ) list_filter = ( 'check_date', 'expire_date', 'ticket_status', 'user_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_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_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')