projects Package

projects Package

activity Module

class kawaz.apps.projects.activity.ProjectActivityMediator[ソース]

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

alter(instance, activity, **kwargs)[ソース]
m2m_fields = ('members',)
prepare_context(activity, context, typename=None)[ソース]

admin Module

class kawaz.apps.projects.admin.CategoryAdmin(model, admin_site)[ソース]

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

media
class kawaz.apps.projects.admin.ProjectAdmin(model, admin_site)[ソース]

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

static administrator_nickname(obj)[ソース]
static is_legacy(obj)[ソース]
list_display = ('title', 'get_status_display', 'administrator_nickname', 'created_at', 'updated_at', 'is_legacy')
media
search_fields = ('title', 'body', 'administrator__username', 'administrator__nickname', 'category__label')

forms Module

class kawaz.apps.projects.forms.ProjectCreateForm(*args, **kwargs)[ソース]

ベースクラス: kawaz.core.forms.mixins.Bootstrap3HorizontalFormHelperMixin, django.forms.models.ModelForm

class Meta[ソース]

ベースクラス: object

exclude = ('administrator', 'members', 'created_at', 'updated_at')
model

Project のエイリアス

ProjectCreateForm.base_fields = OrderedDict([('pub_state', <django.forms.fields.TypedChoiceField object at 0x7f2542676160>), ('status', <django.forms.fields.TypedChoiceField object at 0x7f2542676240>), ('title', <django.forms.fields.CharField object at 0x7f2542fdbcf8>), ('slug', <django.forms.fields.SlugField object at 0x7f254310a128>), ('body', <kawaz.core.forms.fields.MarkdownField object at 0x7f25426789e8>), ('icon', <django.forms.fields.ImageField object at 0x7f2542fdb7f0>), ('category', <django.forms.models.ModelChoiceField object at 0x7f2542681550>), ('tracker', <django.forms.fields.URLField object at 0x7f25426810b8>), ('repository', <django.forms.fields.URLField object at 0x7f2542655f28>)])
ProjectCreateForm.declared_fields = OrderedDict([('body', <kawaz.core.forms.fields.MarkdownField object at 0x7f25426789e8>)])
ProjectCreateForm.media
class kawaz.apps.projects.forms.ProjectUpdateForm(*args, **kwargs)[ソース]

ベースクラス: kawaz.apps.projects.forms.ProjectCreateForm

class Meta[ソース]

ベースクラス: kawaz.apps.projects.forms.Meta

exclude = ['slug']
ProjectUpdateForm.base_fields = OrderedDict([('pub_state', <django.forms.fields.TypedChoiceField object at 0x7f2542676c18>), ('status', <django.forms.fields.TypedChoiceField object at 0x7f2542655b38>), ('title', <django.forms.fields.CharField object at 0x7f2542678470>), ('body', <kawaz.core.forms.fields.MarkdownField object at 0x7f25426789e8>), ('icon', <django.forms.fields.ImageField object at 0x7f2543176fd0>), ('category', <django.forms.models.ModelChoiceField object at 0x7f2542f98f98>), ('tracker', <django.forms.fields.URLField object at 0x7f25426b1400>), ('repository', <django.forms.fields.URLField object at 0x7f2542655320>)])
ProjectUpdateForm.declared_fields = OrderedDict([('body', <kawaz.core.forms.fields.MarkdownField object at 0x7f25426789e8>)])
ProjectUpdateForm.media

models Module

class kawaz.apps.projects.models.Category(*args, **kwargs)[ソース]

ベースクラス: django.db.models.base.Model

プロジェクトが所属するカテゴリモデル

スタッフが作成し、メンバーがプロジェクト作成・編集時に利用する

exception DoesNotExist

ベースクラス: django.core.exceptions.ObjectDoesNotExist

exception Category.MultipleObjectsReturned

ベースクラス: django.core.exceptions.MultipleObjectsReturned

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>
Category.projects

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

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

class kawaz.apps.projects.models.Project(*args, **kwargs)[ソース]

ベースクラス: django.db.models.base.Model

現在進行形で作成しているプロジェクトを示すモデル

メンバーであれば自由に作成可能で所有者および参加者が編集権限を持つ また削除権限は所有者のみが持ち、所有権限の委託は未だ作成されていない。

exception DoesNotExist

ベースクラス: django.core.exceptions.ObjectDoesNotExist

exception Project.MultipleObjectsReturned

ベースクラス: django.core.exceptions.MultipleObjectsReturned

Project.STATUS = (('planning', <django.utils.functional.lazy.<locals>.__proxy__ object at 0x7f25441ebba8>), ('active', <django.utils.functional.lazy.<locals>.__proxy__ object at 0x7f25441ebc88>), ('paused', <django.utils.functional.lazy.<locals>.__proxy__ object at 0x7f25441ebcc0>), ('eternal', <django.utils.functional.lazy.<locals>.__proxy__ object at 0x7f25441ebcf8>), ('done', <django.utils.functional.lazy.<locals>.__proxy__ object at 0x7f25441ebd30>))
Project.active_members
Project.administrator

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

Project.administrator_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

Project.body

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

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

Project.category_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

Project.created_at

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

Project.get_absolute_url()[ソース]
Project.get_default_icon(size)[ソース]

デフォルトアイコンを返します

Project.get_huge_icon()
Project.get_icon(size)[ソース]

渡したサイズのアイコンURLを返します 未設定の場合や、見つからない場合はデフォルトアイコンを返します

Project.get_large_icon()
Project.get_middle_icon()
Project.get_next_by_created_at(*moreargs, **morekwargs)
Project.get_next_by_updated_at(*moreargs, **morekwargs)
Project.get_previous_by_created_at(*moreargs, **morekwargs)
Project.get_previous_by_updated_at(*moreargs, **morekwargs)
Project.get_pub_state_display(*moreargs, **morekwargs)
Project.get_small_icon()
Project.get_status_display(*moreargs, **morekwargs)
Project.icon

Enhanced ImageFileDescriptor

Just like the ImageFileDescriptor, but for ThumbnailField. The only difference is removing previous Image and Thumbnails from storage when the value has changed.

Project.id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

Project.is_legacy

企画中か活動中、かつ180日以上更新されていない場合、Trueが返ります

Project.is_member(user)[ソース]

指定されたユーザーがこのプロジェクトに参加しているか否か

Project.join(user)[ソース]

指定されたユーザーを参加させる

ユーザーに参加権限がない場合は PermissionDenied を投げる

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

Project.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.

Project.members

Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.

In the example:

class Pizza(Model):
    toppings = ManyToManyField(Topping, related_name='pizzas')

pizza.toppings and topping.pizzas are ManyToManyDescriptor instances.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

Project.objects = <kawaz.apps.projects.models.ProjectManager object>
Project.product

Accessor to the related object on the reverse side of a one-to-one relation.

In the example:

class Restaurant(Model):
    place = OneToOneField(Place, related_name='restaurant')

place.restaurant is a ReverseOneToOneDescriptor instance.

Project.pub_state

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

Project.quit(user)[ソース]

指定されたユーザーを退会させる

ユーザーに退会権限がない場合は PermissionDenied を投げる

Project.repository

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

Project.slug

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

Project.status

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

Project.title

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

Project.tracker

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

Project.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.projects.models.ProjectManager[ソース]

ベースクラス: django.db.models.manager.Manager, kawaz.core.publishments.models.PublishmentManagerMixin

active(user)[ソース]

指定されたユーザーが閲覧可能なプロジェクトのうち、活動中のもののみ を含むクエリを返す

archived(user)[ソース]

指定されたユーザーがー閲覧可能なプロジェクトのうち アーカイブ化されたプロジェクトのクエリを返す 以下のようなプロジェクトがアーカイブである

状態がpaused, eternaled, doneのいずれかである 状態がplanningかつ、created_atから90日以上経過している

author_field_name = 'administrator'
recently_planned(user)[ソース]

指定されたユーザーがー閲覧可能なプロジェクトのうち 最近企画されたプロジェクトのクエリを返す 状態がplanningかつ、created_atが90日未満である

kawaz.apps.projects.models.join_administrator(**kwargs)[ソース]

プロジェクト作成時に自動的に管理者をプロジェクトに参加させるシグナル処理

perms Module

class kawaz.apps.projects.perms.ProjectPermissionLogic[ソース]

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

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

Check if user have a specified project permissions (of obj)

urls Module

views Module

class kawaz.apps.projects.views.ProjectArchiveView(**kwargs)[ソース]

ベースクラス: django.views.generic.list.ListView

アーカイブ化されたプロジェクト閲覧用のビューです

get_queryset()[ソース]
order_by = ('title', 'category', 'status', 'created_at')
paginate_by = 50
template_name_suffix = '_archive'
class kawaz.apps.projects.views.ProjectCreateView(**kwargs)[ソース]

ベースクラス: django.contrib.messages.views.SuccessMessageMixin, django.views.generic.edit.CreateView

dispatch(request, *args, **kwargs)
form_class

ProjectCreateForm のエイリアス

form_valid(form)[ソース]
get_success_message(cleaned_data)[ソース]
model

Project のエイリアス

class kawaz.apps.projects.views.ProjectDeleteView(**kwargs)[ソース]

ベースクラス: kawaz.core.views.delete.DeleteSuccessMessageMixin, django.views.generic.edit.DeleteView

dispatch(request, *args, **kwargs)
get_success_message()[ソース]
model

Project のエイリアス

success_url = <django.utils.functional.lazy.<locals>.__proxy__ object>
class kawaz.apps.projects.views.ProjectDetailView(**kwargs)[ソース]

ベースクラス: django.views.generic.detail.DetailView

dispatch(request, *args, **kwargs)
get_queryset()[ソース]
model

Project のエイリアス

class kawaz.apps.projects.views.ProjectJoinView(**kwargs)[ソース]

ベースクラス: django.views.generic.detail.SingleObjectMixin, django.views.generic.base.RedirectView

メンバーが参加する際に使用するView

dispatch(request, *args, **kwargs)
get_redirect_url(**kwargs)[ソース]
http_method_names = ['post']
model

Project のエイリアス

permanent = False
post(request, *args, **kwargs)[ソース]
class kawaz.apps.projects.views.ProjectListView(**kwargs)[ソース]

ベースクラス: django.views.generic.list.ListView

dispatch(request, *args, **kwargs)
get_queryset()[ソース]
model

Project のエイリアス

class kawaz.apps.projects.views.ProjectPreviewView(**kwargs)[ソース]

ベースクラス: kawaz.core.views.preview.SingleObjectPreviewViewMixin, django.views.generic.detail.DetailView

model

Project のエイリアス

template_name = 'projects/components/project_detail.html'
class kawaz.apps.projects.views.ProjectQuitView(**kwargs)[ソース]

ベースクラス: django.views.generic.detail.SingleObjectMixin, django.views.generic.base.RedirectView

メンバーが退会する際に使用するView

dispatch(request, *args, **kwargs)
get_redirect_url(**kwargs)[ソース]
http_method_names = ['post']
model

Project のエイリアス

permanent = False
post(request, *args, **kwargs)[ソース]
class kawaz.apps.projects.views.ProjectUpdateView(**kwargs)[ソース]

ベースクラス: django.contrib.messages.views.SuccessMessageMixin, django.views.generic.edit.UpdateView

dispatch(request, *args, **kwargs)
form_class

ProjectUpdateForm のエイリアス

form_valid(form)[ソース]
get_success_message(cleaned_data)[ソース]
model

Project のエイリアス