products Package

activity Module

class kawaz.apps.products.activity.ProductActivityMediator[ソース]

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

alter(instance, activity, **kwargs)[ソース]
notifiers = ('twitter_kawaz_info', 'twitter_kawaz_official')
prepare_context(activity, context, typename=None)[ソース]
class kawaz.apps.products.activity.ReleaseActivityMediator[ソース]

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

alter(instance, activity, **kwargs)[ソース]
class kawaz.apps.products.activity.ScreenshotActivityMediator[ソース]

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

alter(instance, activity, **kwargs)[ソース]

admin Module

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

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

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

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

list_display = ('label', 'platform', 'version', 'downloads')
media
readonly_fields = ('downloads',)
search_fields = ('title', 'description')
class kawaz.apps.products.admin.PlatformAdmin(model, admin_site)[ソース]

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

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

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

last_modifier_nickname(obj)[ソース]
list_display = ('title', 'last_modifier_nickname', 'get_display_mode_display', 'published_at', 'created_at', 'updated_at')
media
class kawaz.apps.products.admin.ScreenshotAdmin(model, admin_site)[ソース]

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

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

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

list_display = ('label', 'platform', 'version', 'url', 'pageview')
media
readonly_fields = ('pageview',)

filters Module

forms Module

models Module

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

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

リリース形態のアブストラクトモデル

class Meta[ソース]

ベースクラス: object

abstract = False
ordering = ('platform__pk', 'product__pk')
AbstractRelease.created_at

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

AbstractRelease.get_next_by_created_at(*moreargs, **morekwargs)
AbstractRelease.get_next_by_updated_at(*moreargs, **morekwargs)
AbstractRelease.get_previous_by_created_at(*moreargs, **morekwargs)
AbstractRelease.get_previous_by_updated_at(*moreargs, **morekwargs)
AbstractRelease.label

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

AbstractRelease.platform

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.

AbstractRelease.platform_id

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

AbstractRelease.product

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.

AbstractRelease.product_id

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

AbstractRelease.updated_at

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

AbstractRelease.version

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.products.models.Category(*args, **kwargs)[ソース]

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

プロダクトが所属するカテゴリーを表すモデル

e.g. ACT, STG, ADV など

exception DoesNotExist

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

exception Category.MultipleObjectsReturned

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

Category.description

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

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

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

Category.product_set

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.

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

ベースクラス: kawaz.apps.products.models.AbstractRelease

ファイル添付形式でのリリースモデル

exception DoesNotExist

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

exception PackageRelease.MultipleObjectsReturned

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

PackageRelease.downloads

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

PackageRelease.file_content

The descriptor for the file attribute on the model instance. Returns a FieldFile when accessed so you can do stuff like:

>>> from myapp.models import MyModel
>>> instance = MyModel.objects.get(pk=1)
>>> instance.file.size

Assigns a file object on assignment so you can do:

>>> with open('/path/to/hello.world', 'r') as f:
...     instance.file = File(f)
PackageRelease.filename

ファイル名を返します

PackageRelease.get_absolute_url()[ソース]
PackageRelease.get_next_by_created_at(*moreargs, **morekwargs)
PackageRelease.get_next_by_updated_at(*moreargs, **morekwargs)
PackageRelease.get_previous_by_created_at(*moreargs, **morekwargs)
PackageRelease.get_previous_by_updated_at(*moreargs, **morekwargs)
PackageRelease.id

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

PackageRelease.mimetype

Mimetypeを返します

PackageRelease.objects = <django.db.models.manager.Manager object>
PackageRelease.platform

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.

PackageRelease.product

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.

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

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

プロダクトがサポートしているプラットフォームを表すモデル

e.g. Windows, Mac, Browser, iOS, PS Vita など

exception DoesNotExist

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

exception Platform.MultipleObjectsReturned

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

Platform.icon

Just like the FileDescriptor, but for ImageFields. The only difference is assigning the width/height to the width_field/height_field, if appropriate.

Platform.id

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

Platform.label

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

Platform.objects = <django.db.models.manager.Manager object>
Platform.order

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

Platform.packagerelease_set

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.

Platform.products

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.

Platform.urlrelease_set

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.products.models.Product(*args, **kwargs)[ソース]

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

完成したプロダクトを表すモデル

メンバーであれば誰でも作成・管理可能

DISPLAY_MODES = (('featured', 'Fetured: Displayed in the curled cell and the tiled cell on the top page'), ('tiled', 'Tiled: Displayed in the tiled cell on the top page'), ('normal', 'Normal: Displayed only in tiled cell on the detailed page'))
exception DoesNotExist

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

exception Product.MultipleObjectsReturned

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

Product.administrators

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.

Product.advertisement_image

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.

Product.categories

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.

Product.clean()[ソース]
Product.contact_info

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

Product.created_at

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

Product.description

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

Product.display_mode

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

Product.get_absolute_url()[ソース]
Product.get_display_mode_display(*moreargs, **morekwargs)
Product.get_next_by_created_at(*moreargs, **morekwargs)
Product.get_next_by_published_at(*moreargs, **morekwargs)
Product.get_next_by_updated_at(*moreargs, **morekwargs)
Product.get_previous_by_created_at(*moreargs, **morekwargs)
Product.get_previous_by_published_at(*moreargs, **morekwargs)
Product.get_previous_by_updated_at(*moreargs, **morekwargs)
Product.id

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

Product.join(user)[ソース]

指定されたユーザーを管理者にする

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

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

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

Product.objects = <django.db.models.manager.Manager object>
Product.packagereleases

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.

Product.platforms

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.

Product.project

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

In the example:

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

restaurant.place is a ForwardOneToOneDescriptor instance.

Product.project_id

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

Product.published_at

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

Product.quit(user)[ソース]

指定されたユーザーを管理者から外す

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

Product.save(force_insert=False, force_update=False, using=None, update_fields=None)

Saves the current instance. Override this in a subclass if you want to control the saving process.

The ‘force_insert’ and ‘force_update’ parameters can be used to insist that the “save” must be an SQL insert or update (or equivalent for non-SQL backends), respectively. Normally, they should not be set.

Product.screenshots

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.

Product.slug

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

Product.thumbnail

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.

Product.title

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

Product.trailer

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

Product.updated_at

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

Product.urlreleases

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.products.models.Screenshot(*args, **kwargs)[ソース]

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

プロダクトのスクリーンショットモデル

プロダクト管理者は何枚でもプロダクトに関連付けることが出来る

exception DoesNotExist

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

exception Screenshot.MultipleObjectsReturned

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

Screenshot.id

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

Screenshot.image

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.

Screenshot.objects = <django.db.models.manager.Manager object>
Screenshot.product

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.

Screenshot.product_id

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.products.models.URLRelease(*args, **kwargs)[ソース]

ベースクラス: kawaz.apps.products.models.AbstractRelease

URL指定形式でのリリースモデル。主に外部ホスティングでのリリース用

e.g. iTunes App Store, Google Play, Vector など

exception DoesNotExist

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

exception URLRelease.MultipleObjectsReturned

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

URLRelease.PLAY_NOW_PLATFORM_LABELS = ['ブラウザ']
URLRelease.app_id

そのリリースがiOSアプリかAndroidアプリだった場合は、そのアプリのAppIDを取得して返します そうではない場合、空白文字を返します

URLRelease.get_absolute_url()[ソース]
URLRelease.get_next_by_created_at(*moreargs, **morekwargs)
URLRelease.get_next_by_updated_at(*moreargs, **morekwargs)
URLRelease.get_previous_by_created_at(*moreargs, **morekwargs)
URLRelease.get_previous_by_updated_at(*moreargs, **morekwargs)
URLRelease.id

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

URLRelease.is_appstore

App Store の URL か否か

URLRelease.is_googleplay

Google Play の URL か否か

URLRelease.is_play_now()[ソース]
URLRelease.objects = <django.db.models.manager.Manager object>
URLRelease.pageview

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

URLRelease.platform

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.

URLRelease.product

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.

URLRelease.url

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.products.models.UnsavedForeignKey(to, on_delete=None, related_name=None, related_query_name=None, limit_choices_to=None, parent_link=False, to_field=None, db_constraint=True, **kwargs)[ソース]

ベースクラス: django.db.models.fields.related.ForeignKey

allow_unsaved_instance_assignment = True

perms Module

class kawaz.apps.products.perms.ProductPermissionLogic[ソース]

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

allowed_permissions = ('products.add_product', 'products.change_product', 'products.delete_product', 'products.join_product', 'products.quit_product')
has_perm(user_obj, perm, obj=None)[ソース]

urls Module

views Module