announcements Package¶
activity
Module¶
admin
Module¶
forms
Module¶
models
Module¶
-
class
kawaz.apps.announcements.models.
Announcement
(*args, **kwargs)[ソース]¶ ベースクラス:
django.db.models.base.Model
スタッフがメンバーに告知する際に使用するモデル
-
exception
DoesNotExist
¶ ベースクラス:
django.core.exceptions.ObjectDoesNotExist
-
exception
Announcement.
MultipleObjectsReturned
¶ ベースクラス:
django.core.exceptions.MultipleObjectsReturned
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
child.parent
is aForwardManyToOneDescriptor
instance.
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
Announcement.
body
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
Announcement.
created_at
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
Announcement.
get_next_by_created_at
(*moreargs, **morekwargs)¶
-
Announcement.
get_next_by_updated_at
(*moreargs, **morekwargs)¶
-
Announcement.
get_previous_by_created_at
(*moreargs, **morekwargs)¶
-
Announcement.
get_previous_by_updated_at
(*moreargs, **morekwargs)¶
-
Announcement.
get_pub_state_display
(*moreargs, **morekwargs)¶
-
Announcement.
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
Announcement.
last_modifier
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
child.parent
is aForwardManyToOneDescriptor
instance.
-
Announcement.
last_modifier_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
Announcement.
objects
= <kawaz.apps.announcements.models.AnnouncementManager object>¶
-
Announcement.
pub_state
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
Announcement.
title
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
Announcement.
updated_at
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
exception
-
class
kawaz.apps.announcements.models.
AnnouncementManager
[ソース]¶ ベースクラス:
django.db.models.manager.Manager
,kawaz.core.publishments.models.PublishmentManagerMixin
-
draft
(user)[ソース]¶ 下書き状態のAnnouncementインスタンスを含むクエリを返す。
ユーザーがスタッフの場合は全ての下書きインスタンスを含むもの、それ以外 の場合は空のクエリを返す
パラメータ: user (User instance) – DjangoのUserモデル 戻り値: 指定されたユーザーに対して公開されているAnnouncementインスタンスを 含むQuerySet
-
published
(user)[ソース]¶ 指定されたユーザーに対して公開されているAnnouncementインスタンスを含む クエリを返す。
公開状態は指定されたユーザの所属によって変化する。 ユーザーが認証ユーザかつ[seele, nerv, chidlren]のいずれかに属している 場合は公開状態が public もしくは protected のものを、それ以外の場合 は公開状態が public になっているものだけを含む。
パラメータ: user (User instance) – DjangoのUserモデル 戻り値: 指定されたユーザーに対して公開されているAnnouncementインスタンスを 含むQuerySet
-