announcements Package¶
activity
Module¶
admin
Module¶
forms
Module¶
-
class
kawaz.apps.announcements.forms.
AnnouncementForm
(*args, **kwargs)[ソース]¶ ベースクラス:
kawaz.core.forms.mixins.Bootstrap3HorizontalFormHelperMixin
,django.forms.models.ModelForm
-
class
Meta
[ソース]¶ ベースクラス:
object
-
exclude
= ('author', 'created_at', 'updated_at')¶
-
model
¶ Announcement
のエイリアス
-
-
AnnouncementForm.
base_fields
= OrderedDict([('pub_state', <django.forms.fields.TypedChoiceField object at 0x7f2543d30710>), ('title', <django.forms.fields.CharField object at 0x7f2543d306d8>), ('body', <kawaz.core.forms.fields.MarkdownField object at 0x7f2543d2b2e8>)])¶
-
AnnouncementForm.
declared_fields
= OrderedDict([('body', <kawaz.core.forms.fields.MarkdownField object at 0x7f2543d2b2e8>)])¶
-
AnnouncementForm.
media
¶
-
class
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 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 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
-
perms
Module¶
urls
Module¶
views
Module¶
-
class
kawaz.apps.announcements.views.
AnnouncementCreateView
(**kwargs)[ソース]¶ ベースクラス:
django.contrib.messages.views.SuccessMessageMixin
,django.views.generic.edit.CreateView
-
dispatch
(request, *args, **kwargs)¶
-
form_class
¶ AnnouncementForm
のエイリアス
-
model
¶ Announcement
のエイリアス
-
-
class
kawaz.apps.announcements.views.
AnnouncementDeleteView
(**kwargs)[ソース]¶ ベースクラス:
kawaz.core.views.delete.DeleteSuccessMessageMixin
,django.views.generic.edit.DeleteView
-
dispatch
(request, *args, **kwargs)¶
-
model
¶ Announcement
のエイリアス
-
success_url
= <django.utils.functional.lazy.<locals>.__proxy__ object>¶
-
-
class
kawaz.apps.announcements.views.
AnnouncementDetailView
(**kwargs)[ソース]¶ ベースクラス:
django.views.generic.detail.DetailView
-
dispatch
(request, *args, **kwargs)¶
-
model
¶ Announcement
のエイリアス
-
-
class
kawaz.apps.announcements.views.
AnnouncementListView
(**kwargs)[ソース]¶ ベースクラス:
django.views.generic.list.ListView
-
dispatch
(request, *args, **kwargs)¶
-
model
¶ Announcement
のエイリアス
-
paginate_by
= 5¶
-