1
This commit is contained in:
1 parent
9f350cbbe1
commit
d1db19fc58
10 files changed
+55
-1
No files matched your search
@@ -0,0 +1,12 @@
|
||||
from django.contrib import admin
|
||||
from .models import *
|
||||
|
||||
class GeneralVacationAdmin(admin.ModelAdmin):
|
||||
fields = ('user', 'planned_date', 'count_days', 'type_of_vacation', 'start_work_period', 'end_work_period')
|
||||
list_display=('get_name', 'user', 'planned_date', 'count_days', 'type_of_vacation', 'start_work_period', 'end_work_period')
|
||||
readonly_fields=('get_name',)
|
||||
def get_name(self, obj):
|
||||
print(obj.user.fio(), '----------------obj.user.fio()')
|
||||
return obj.user.fio()
|
||||
|
||||
admin.site.register(GeneralVacation, GeneralVacationAdmin)
|
||||
Reference in new issue
Block a user