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: 'Staff', USER: '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)