blogs Package¶
activity Module¶
admin Module¶
-
class
kawaz.apps.blogs.admin.EntryAdmin(model, admin_site)[source]¶ Bases:
django.contrib.admin.options.ModelAdmin-
list_display= ('title', 'author_nickname', 'get_pub_state_display', 'star_count', 'created_at', 'updated_at')¶
-
media¶
-
search_fields= ('title', 'body', 'author__username', 'author__nickname', 'category__label')¶
-
forms Module¶
-
class
kawaz.apps.blogs.forms.CategoryChoiceField(queryset, empty_label='---------', required=True, widget=None, label=None, initial=None, help_text='', to_field_name=None, limit_choices_to=None, *args, **kwargs)[source]¶ Bases:
django.forms.models.ModelChoiceFieldModelChoiceFieldのラベルにCategory.labelが使われるようにする
-
class
kawaz.apps.blogs.forms.EntryForm(*args, **kwargs)[source]¶ Bases:
kawaz.core.forms.mixins.Bootstrap3HorizontalFormHelperMixin,django.forms.models.ModelForm-
class
Meta[source]¶ Bases:
object-
exclude= ('author', 'created_at', 'updated_at', 'published_at')¶
-
model¶ alias of
Entry
-
-
EntryForm.base_fields= OrderedDict([('pub_state', <django.forms.fields.TypedChoiceField object at 0x7f2030734ac8>), ('title', <django.forms.fields.CharField object at 0x7f2030734a20>), ('body', <kawaz.core.forms.fields.MarkdownField object at 0x7f2030b86780>), ('category', <kawaz.apps.blogs.forms.CategoryChoiceField object at 0x7f2030734978>)])¶
-
EntryForm.declared_fields= OrderedDict([('body', <kawaz.core.forms.fields.MarkdownField object at 0x7f2030b86780>), ('category', <kawaz.apps.blogs.forms.CategoryChoiceField object at 0x7f2030734978>)])¶
-
EntryForm.media¶
-
class
models Module¶
-
class
kawaz.apps.blogs.models.Category(*args, **kwargs)[source]¶ Bases:
django.db.models.base.Modelブログが所属するカテゴリーモデル
カテゴリーは各ユーザーがそれぞれ所有するもので、自身のブログの整理に利用する 目的で存在する。
-
exception
DoesNotExist¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
Category.MultipleObjectsReturned¶ Bases:
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.parentis aForwardManyToOneDescriptorinstance.
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
Category.entries¶ 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.childrenis aReverseManyToOneDescriptorinstance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()defined below.
-
Category.id¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
Category.label¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
Category.objects= <django.db.models.manager.Manager object>¶
-
exception
-
class
kawaz.apps.blogs.models.Entry(*args, **kwargs)[source]¶ Bases:
django.db.models.base.Modelブログ記事モデル
-
exception
DoesNotExist¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
Entry.MultipleObjectsReturned¶ Bases:
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.parentis aForwardManyToOneDescriptorinstance.
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
Entry.body¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
Entry.category¶ 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.parentis aForwardManyToOneDescriptorinstance.
-
Entry.category_id¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
Entry.created_at¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
Entry.get_next_by_created_at(*moreargs, **morekwargs)¶
-
Entry.get_next_by_updated_at(*moreargs, **morekwargs)¶
-
Entry.get_previous_by_created_at(*moreargs, **morekwargs)¶
-
Entry.get_previous_by_updated_at(*moreargs, **morekwargs)¶
-
Entry.get_pub_state_display(*moreargs, **morekwargs)¶
-
Entry.id¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
Entry.objects= <kawaz.apps.blogs.models.EntryManager object>¶
-
Entry.pub_state¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
Entry.published_at¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
Entry.published_at_date¶ 公開日
-
Entry.title¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
Entry.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.blogs.models.EntryManager[source]¶ Bases:
django.db.models.manager.Manager,kawaz.core.publishments.models.PublishmentManagerMixin
urls Module¶
views Module¶
-
class
kawaz.apps.blogs.views.EntryAuthorDayArchiveView(**kwargs)[source]¶ Bases:
kawaz.apps.blogs.views.EntryDayArchiveView,kawaz.apps.blogs.views.EntryAuthorMixin
-
class
kawaz.apps.blogs.views.EntryAuthorListView(**kwargs)[source]¶ Bases:
kawaz.apps.blogs.views.EntryListView,kawaz.apps.blogs.views.EntryAuthorMixin
-
class
kawaz.apps.blogs.views.EntryAuthorMixin[source]¶ Bases:
kawaz.apps.blogs.views.EntryMultipleObjectMixin特定ユーザーが執筆した記事に限定して閲覧するためのMixin
-
class
kawaz.apps.blogs.views.EntryAuthorMonthArchiveView(**kwargs)[source]¶ Bases:
kawaz.apps.blogs.views.EntryMonthArchiveView,kawaz.apps.blogs.views.EntryAuthorMixin
-
class
kawaz.apps.blogs.views.EntryAuthorTodayArchiveView(**kwargs)[source]¶ Bases:
kawaz.apps.blogs.views.EntryTodayArchiveView,kawaz.apps.blogs.views.EntryAuthorMixin
-
class
kawaz.apps.blogs.views.EntryAuthorYearArchiveView(**kwargs)[source]¶ Bases:
kawaz.apps.blogs.views.EntryYearArchiveView,kawaz.apps.blogs.views.EntryAuthorMixin
-
class
kawaz.apps.blogs.views.EntryCategoryListView(**kwargs)[source]¶ Bases:
kawaz.apps.blogs.views.EntryAuthorMixin,django.views.generic.list.ListView-
template_name= 'blogs/entry_list.html'¶
-
-
class
kawaz.apps.blogs.views.EntryCreateView(**kwargs)[source]¶ Bases:
django.contrib.messages.views.SuccessMessageMixin,django.views.generic.edit.CreateView-
dispatch(request, *args, **kwargs)¶
-
form_class¶ alias of
EntryForm
-
model¶ alias of
Entry
-
-
class
kawaz.apps.blogs.views.EntryDayArchiveView(**kwargs)[source]¶ Bases:
django.views.generic.dates.DayArchiveView,kawaz.apps.blogs.views.EntryMultipleObjectMixin-
date_field= 'published_at'¶
-
model¶ alias of
Entry
-
month_format= '%m'¶
-
-
class
kawaz.apps.blogs.views.EntryDeleteView(**kwargs)[source]¶ Bases:
kawaz.core.views.delete.DeleteSuccessMessageMixin,django.views.generic.edit.DeleteView-
dispatch(request, *args, **kwargs)¶
-
model¶ alias of
Entry
-
success_url= <django.utils.functional.lazy.<locals>.__proxy__ object>¶
-
-
class
kawaz.apps.blogs.views.EntryDetailView(**kwargs)[source]¶ Bases:
django.views.generic.detail.DetailView-
dispatch(request, *args, **kwargs)¶
-
model¶ alias of
Entry
-
-
class
kawaz.apps.blogs.views.EntryListView(**kwargs)[source]¶ Bases:
django.views.generic.list.ListView,kawaz.apps.blogs.views.EntryMultipleObjectMixin-
dispatch(request, *args, **kwargs)¶
-
model¶ alias of
Entry
-
-
class
kawaz.apps.blogs.views.EntryMonthArchiveView(**kwargs)[source]¶ Bases:
django.views.generic.dates.MonthArchiveView,kawaz.apps.blogs.views.EntryMultipleObjectMixin-
date_field= 'published_at'¶
-
model¶ alias of
Entry
-
month_format= '%m'¶
-
-
class
kawaz.apps.blogs.views.EntryMultipleObjectMixin[source]¶ Bases:
django.views.generic.list.MultipleObjectMixinアクセスしたユーザーにより閲覧可能な記事を指定するためのMixin
-
paginate_by= 5¶
-
-
class
kawaz.apps.blogs.views.EntryPreviewView(**kwargs)[source]¶ Bases:
kawaz.core.views.preview.SingleObjectPreviewViewMixin,django.views.generic.detail.DetailView-
model¶ alias of
Entry
-
template_name= 'blogs/components/entry_detail.html'¶
-
-
class
kawaz.apps.blogs.views.EntryTodayArchiveView(**kwargs)[source]¶ Bases:
django.views.generic.dates.TodayArchiveView,kawaz.apps.blogs.views.EntryMultipleObjectMixin-
date_field= 'published_at'¶
-
model¶ alias of
Entry
-