mirror of
https://gitlab.science.ru.nl/technicie/MarietjeDjango.git
synced 2025-12-09 18:52:23 +01:00
17 lines
394 B
Python
17 lines
394 B
Python
from django.contrib import admin
|
|
|
|
from announcements.models import Announcement
|
|
|
|
|
|
@admin.register(Announcement)
|
|
class AnnouncementAdmin(admin.ModelAdmin):
|
|
"""Manage the admin pages for the announcements."""
|
|
|
|
list_display = ("title", "since", "until", "visible")
|
|
|
|
def visible(self, obj):
|
|
"""Is the object visible."""
|
|
return obj.is_visible
|
|
|
|
visible.boolean = True
|