начал работать с интерфейсом
All checks were successful
Deploy MES Core / deploy (push) Successful in 9s
All checks were successful
Deploy MES Core / deploy (push) Successful in 9s
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import os
|
||||
from django.contrib import admin
|
||||
from .models import Company, Machine, Deal, Material, Item
|
||||
from .models import Company, EmployeeProfile, Machine, Deal, Material, Item
|
||||
|
||||
# --- Настройка отображения Компаний ---
|
||||
@admin.register(Company)
|
||||
@@ -11,7 +11,7 @@ class CompanyAdmin(admin.ModelAdmin):
|
||||
# --- Настройка отображения Сделок ---
|
||||
@admin.register(Deal)
|
||||
class DealAdmin(admin.ModelAdmin):
|
||||
list_display = ('number', 'company', 'created_at')
|
||||
list_display = ('number', 'company')
|
||||
search_fields = ('number', 'company__name')
|
||||
list_filter = ('company',)
|
||||
|
||||
@@ -68,4 +68,9 @@ class ItemAdmin(admin.ModelAdmin):
|
||||
return initial
|
||||
|
||||
# Регистрация станков просто списком
|
||||
admin.site.register(Machine)
|
||||
admin.site.register(Machine)
|
||||
|
||||
@admin.register(EmployeeProfile)
|
||||
class EmployeeProfileAdmin(admin.ModelAdmin):
|
||||
list_display = ('user', 'role')
|
||||
filter_horizontal = ('machines',) # Красивый выбор станков двумя колонками
|
||||
Reference in New Issue
Block a user