|
|
|
@ -9,8 +9,8 @@ class ShiftAdmin(admin.ModelAdmin):
|
|
|
|
|
list_display = ('room_name', 'start_at', 'free_slots')
|
|
|
|
|
def room_name(self, object):
|
|
|
|
|
return object.room.name
|
|
|
|
|
#def helpeprs(self, object):
|
|
|
|
|
# object.helppers.count()
|
|
|
|
|
#def helpers(self, object):
|
|
|
|
|
# object.helpers.count()
|
|
|
|
|
def free_slots(self, object):
|
|
|
|
|
return object.room.required_helpers - object.shiftregistration_set.count()
|
|
|
|
|
#admin.site.register(Shift)
|
|
|
|
@ -19,4 +19,4 @@ class ShiftAdmin(admin.ModelAdmin):
|
|
|
|
|
admin.site.register(Helper)
|
|
|
|
|
admin.site.register(ShiftRegistration)
|
|
|
|
|
admin.site.register(Message)
|
|
|
|
|
admin.site.register(LoginToken)
|
|
|
|
|
admin.site.register(LoginToken)
|
|
|
|
|