announcements package¶
Submodules¶
announcements.admin module¶
Registers admin interfaces for the announcements module
-
class
announcements.admin.
AnnouncementAdmin
(model, admin_site)[source]¶ Bases:
utils.translation.TranslatedModelAdmin
Manage the admin pages for the announcements
-
content_html
(obj)[source]¶ Get the content of the object as html
- Parameters
obj – the object to render for
- Returns
the stripped html
-
exclude
= None¶
-
fields
= None¶
-
list_display
= ('content_html', 'since', 'until', 'visible')¶ show these fields in the admin overview list see :py:method:content_html for the ‘content_html’ field see :py:method:visible for the visible field
-
property
media
¶
-
search_fields
= ()¶
-
-
class
announcements.admin.
FrontpageArticleAdmin
(model, admin_site)[source]¶ Bases:
utils.translation.TranslatedModelAdmin
Manage front page articles
-
exclude
= None¶
-
fields
= None¶
-
list_display
= ('title', 'since', 'until', 'visible')¶ available fields in the admin overview list
-
property
media
¶
-
search_fields
= ()¶
-
-
class
announcements.admin.
SlideAdmin
(model, admin_site)[source]¶ Bases:
utils.translation.TranslatedModelAdmin
Manage the admin pages for the slides
-
exclude
= None¶
-
fields
= None¶
-
list_display
= ('title', 'since', 'until', 'visible')¶ show these fields in the admin overview list see :py:method:visible for the visible field
-
property
media
¶
-
search_fields
= ()¶
-
announcements.apps module¶
Configuration for the announcement package
announcements.context_processors module¶
These context processors can be used to expand the context provided to admin views.
announcements.models module¶
The models defined by the announcement package
-
class
announcements.models.
Announcement
(*args, **kwargs)[source]¶ Bases:
django.db.models.base.Model
Describes an announcement
-
exception
DoesNotExist
¶
-
exception
MultipleObjectsReturned
¶
-
closeable
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
property
content
¶ Accessor that fetches the localized variant of content
-
content_en
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
content_nl
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
get_next_by_since
(*, field=<django.db.models.fields.DateTimeField: since>, is_next=True, **kwargs)¶
-
get_previous_by_since
(*, field=<django.db.models.fields.DateTimeField: since>, is_next=False, **kwargs)¶
-
icon
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
property
is_visible
¶ Is this announcement currently visible
-
objects
= <django.db.models.manager.Manager object>¶
-
since
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
until
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
exception
-
class
announcements.models.
FrontpageArticle
(*args, **kwargs)[source]¶ Bases:
django.db.models.base.Model
Front page articles
-
exception
DoesNotExist
¶
-
exception
MultipleObjectsReturned
¶
-
property
content
¶ Accessor that fetches the localized variant of content
-
content_en
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
content_nl
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
get_next_by_since
(*, field=<django.db.models.fields.DateTimeField: since>, is_next=True, **kwargs)¶
-
get_previous_by_since
(*, field=<django.db.models.fields.DateTimeField: since>, is_next=False, **kwargs)¶
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
property
is_visible
¶ Is this announcement currently visible
-
objects
= <django.db.models.manager.Manager object>¶
-
since
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
property
title
¶ Accessor that fetches the localized variant of title
-
title_en
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
title_nl
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
until
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
exception
-
class
announcements.models.
Slide
(*args, **kwargs)[source]¶ Bases:
django.db.models.base.Model
Describes an announcement
-
exception
DoesNotExist
¶
-
exception
MultipleObjectsReturned
¶
-
property
content
¶ Accessor that fetches the localized variant of content
-
content_en
¶ Just like the FileDescriptor, but for ImageFields. The only difference is assigning the width/height to the width_field/height_field, if appropriate.
-
content_nl
¶ Just like the FileDescriptor, but for ImageFields. The only difference is assigning the width/height to the width_field/height_field, if appropriate.
-
event_set
¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
property
is_visible
¶ Is this slide currently visible
-
members_only
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
objects
= <django.db.models.manager.Manager object>¶
-
order
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
since
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
title
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
until
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
url
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
url_blank
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
exception