Skip to content

Models

hypha.apply.flags.models

Flag

Bases: Model

STAFF class-attribute instance-attribute

STAFF = 'staff'

USER class-attribute instance-attribute

USER = 'user'

FLAG_TYPES class-attribute instance-attribute

FLAG_TYPES = {STAFF: gettext_lazy('Staff'), USER: gettext_lazy('User')}

target_content_type class-attribute instance-attribute

target_content_type = ForeignKey(ContentType, on_delete=CASCADE)

target_object_id class-attribute instance-attribute

target_object_id = PositiveIntegerField()

target class-attribute instance-attribute

target = GenericForeignKey('target_content_type', 'target_object_id')

timestamp class-attribute instance-attribute

timestamp = DateTimeField(auto_now_add=True)

type class-attribute instance-attribute

type = CharField(choices=items(), default='user', max_length=15)

user class-attribute instance-attribute

user = ForeignKey(AUTH_USER_MODEL, on_delete=PROTECT)

Meta

verbose_name class-attribute instance-attribute
verbose_name = pgettext_lazy('computing', 'flag')
verbose_name_plural class-attribute instance-attribute
verbose_name_plural = pgettext_lazy('computing', 'flags')