|
|
@ -3,7 +3,15 @@ from django.contrib.admin import DateFieldListFilter
|
|
|
|
|
|
|
|
|
|
|
|
from .models import Room, Shift, Helper, ShiftRegistration, Message, LoginToken
|
|
|
|
from .models import Room, Shift, Helper, ShiftRegistration, Message, LoginToken
|
|
|
|
|
|
|
|
|
|
|
|
admin.site.register(Room)
|
|
|
|
|
|
|
|
|
|
|
|
@admin.register(Room)
|
|
|
|
|
|
|
|
class RoomAdmin(admin.ModelAdmin):
|
|
|
|
|
|
|
|
list_display = ("name", "description_length")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def description_length(self, object):
|
|
|
|
|
|
|
|
if object.description:
|
|
|
|
|
|
|
|
return len(object.description)
|
|
|
|
|
|
|
|
return 0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@admin.register(Shift)
|
|
|
|
@admin.register(Shift)
|
|
|
|