announcements Package

activity Module

class kawaz.apps.announcements.activity.AnnouncementActivityMediator[ソース]

ベースクラス: activities.mediator.ActivityMediator

alter(instance, activity, **kwargs)[ソース]
notifiers = ('twitter_kawaz_info', 'twitter_kawaz_official')
prepare_context(activity, context, typename=None)[ソース]

admin Module

class kawaz.apps.announcements.admin.AnnouncementAdmin(model, admin_site)[ソース]

ベースクラス: django.contrib.admin.options.ModelAdmin

media
search_fields = ('title', 'body', 'author__username', 'author__nickname')

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

Announcement.author

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 a ForwardManyToOneDescriptor instance.

Announcement.author_id

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_absolute_url()[ソース]
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 a ForwardManyToOneDescriptor 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.

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

perms Module

class kawaz.apps.announcements.perms.AnnouncementPermissionLogic[ソース]

ベースクラス: permission.logics.base.PermissionLogic

Announcementの権限クラス

スタッフユーザーはあらゆる権限を持ち、それ以外は記事の状態とメンバーか否か により閲覧権限が変わる

has_perm(user_obj, perm, obj=None)[ソース]

urls Module

views Module