Models

class memopolis.models.Content(id, user, team, image, type, created_at, special)[source]
Parameters:

Relationship fields:

Parameters:
  • user (ForeignKey to User) – User (related name: files)

  • team (ForeignKey to Team) – Team (related name: files)

  • tags (TaggableManager to Tag) – Tags. A comma-separated list of tags. (related name: content)

  • tagged_items (GenericRelation to TaggedItem) – Tagged items (related name: +)

class ContentType(value)[source]

An enumeration.

AUDIO = 'AU'
IMAGE = 'IM'
VIDEO = 'VI'
exception DoesNotExist
exception MultipleObjectsReturned
cleaned_name()[source]
content_type()[source]
created_at

Type: DateTimeField

Created at

filename()[source]
get_next_by_created_at(*, field=<django.db.models.DateTimeField: created_at>, is_next=True, **kwargs)

Finds next instance based on created_at. See get_next_by_FOO() for more information.

get_previous_by_created_at(*, field=<django.db.models.DateTimeField: created_at>, is_next=False, **kwargs)

Finds previous instance based on created_at. See get_previous_by_FOO() for more information.

get_type_display(*, field=<django.db.models.CharField: type>)

Shows the label of the type. See get_FOO_display() for more information.

id

Type: AutoField

Primary key: ID

image

Type: FileField

Image

objects = <django.db.models.Manager object>
save(*args, **kwargs)[source]

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

special

Type: CharField

Special

tagged_items

Type: Reverse GenericRelation from Content

All + of this tagged item (related name of tagged_items)

tags = <taggit.managers._TaggableManager object>
team

Type: ForeignKey to Team

Team (related name: files)

team_id

Internal field, use team instead.

type

Type: CharField

Type

Choices:

  • IM

  • AU

  • VI

user

Type: ForeignKey to User

User (related name: files)

user_id

Internal field, use user instead.

class memopolis.models.FeedbackTicket(id, text, emotion, category, timestamp, git_hash, uuid, screenshot, os, session_data, user)[source]
Parameters:

Relationship fields:

Parameters:

user (ForeignKey to User) – User (related name: feedbackticket)

class Category(value)[source]

An enumeration.

BUG = 'BU'
FEEDBACK = 'FE'
GENERAL = 'GE'
HELP = 'HE'
SUGGESTION = 'SU'
exception DoesNotExist
class Emotion(value)[source]

An enumeration.

ANGRY = 'AN'
HAPPY = 'HA'
OK = 'OK'
UNHAPPY = 'UN'
exception MultipleObjectsReturned
category

Type: CharField

Category

Choices:

  • GE

  • BU

  • FE

  • SU

  • HE

emotion

Type: CharField

Emotion

Choices:

  • HA

  • OK

  • UN

  • AN

get_category_display(*, field=<django.db.models.CharField: category>)

Shows the label of the category. See get_FOO_display() for more information.

get_emotion_display(*, field=<django.db.models.CharField: emotion>)

Shows the label of the emotion. See get_FOO_display() for more information.

get_next_by_timestamp(*, field=<django.db.models.DateTimeField: timestamp>, is_next=True, **kwargs)

Finds next instance based on timestamp. See get_next_by_FOO() for more information.

get_previous_by_timestamp(*, field=<django.db.models.DateTimeField: timestamp>, is_next=False, **kwargs)

Finds previous instance based on timestamp. See get_previous_by_FOO() for more information.

git_hash

Type: CharField

Git hash

id

Type: AutoField

Primary key: ID

objects = <django.db.models.Manager object>
os

Type: CharField

Os

screenshot

Type: ImageField

Screenshot

session_data

Type: JSONField

Session data

text

Type: TextField

Text

timestamp

Type: DateTimeField

Timestamp

user

Type: ForeignKey to User

User (related name: feedbackticket)

user_id

Internal field, use user instead.

uuid

Type: UUIDField

Uuid

class memopolis.models.Map(id, name, user, parent_map, quest, json, mark_for_deletion)[source]
Parameters:

Relationship fields:

Parameters:

Reverse relationships:

Parameters:
exception DoesNotExist
exception MultipleObjectsReturned
get_default_map_json()[source]
id

Type: AutoField

Primary key: ID

json

Type: JSONField

Json

map_set

Type: Reverse ForeignKey from Map

All maps of this map (related name of parent_map)

mark_for_deletion

Type: BooleanField

Mark for deletion

name

Type: CharField

Name

objects = <django.db.models.Manager object>
parent_map

Type: ForeignKey to Map

Parent map (related name: map)

parent_map_id

Internal field, use parent_map instead.

quest

Type: ForeignKey to Quest

Quest (related name: maps)

quest_id

Internal field, use quest instead.

siteconfiguration_set

Type: Reverse ForeignKey from SiteConfiguration

All Site Configurations of this map (related name of home_map)

user

Type: ForeignKey to User

User (related name: maps)

user_id

Internal field, use user instead.

users

Type: Reverse ForeignKey from WorldObject

All users of this map (related name of map)

class memopolis.models.Organization(id, name, language)[source]
Parameters:

Relationship fields:

Parameters:

admins (ManyToManyField to User) – Admins (related name: admin_organizations)

Reverse relationships:

Parameters:
exception DoesNotExist
exception MultipleObjectsReturned
admins

Type: ManyToManyField to User

Admins (related name: admin_organizations)

id

Type: AutoField

Primary key: ID

language

Type: CharField

Language

name

Type: CharField

Name

objects = <django.db.models.Manager object>
quests

Type: Reverse ForeignKey from Quest

All quests of this organization (related name of organization)

teams

Type: Reverse ForeignKey from Team

All teams of this organization (related name of organization)

users

Type: Reverse ForeignKey from User

All users of this organization (related name of organization)

class memopolis.models.Quest(id, name, organization, team, json)[source]
Parameters:

Relationship fields:

Parameters:

Reverse relationships:

Parameters:

maps (Reverse ForeignKey from Map) – All maps of this quest (related name of quest)

exception DoesNotExist
exception MultipleObjectsReturned
get_default_quest_json()[source]
id

Type: AutoField

Primary key: ID

json

Type: JSONField

Json

maps

Type: Reverse ForeignKey from Map

All maps of this quest (related name of quest)

name

Type: CharField

Name

objects = <django.db.models.Manager object>
organization

Type: ForeignKey to Organization

Organization (related name: quests)

organization_id

Internal field, use organization instead.

team

Type: ForeignKey to Team

Team (related name: quests)

team_id

Internal field, use team instead.

class memopolis.models.SiteConfiguration(id, home_map, default_organization_language, tos_url, privacy_url)[source]
Parameters:
  • id (AutoField) – Primary key: ID

  • default_organization_language (CharField) – Default organization language

  • tos_url (URLField) – Tos url

  • privacy_url (URLField) – Privacy url

Relationship fields:

Parameters:

home_map (ForeignKey to Map) – Home map (related name: siteconfiguration)

exception DoesNotExist
exception MultipleObjectsReturned
default_organization_language

Type: CharField

Default organization language

home_map

Type: ForeignKey to Map

Home map (related name: siteconfiguration)

home_map_id

Internal field, use home_map instead.

id

Type: AutoField

Primary key: ID

objects = <django.db.models.Manager object>
privacy_url

Type: URLField

Privacy url

tos_url

Type: URLField

Tos url

class memopolis.models.Team(id, name, organization)[source]
Parameters:

Relationship fields:

Parameters:

Reverse relationships:

Parameters:
exception DoesNotExist
exception MultipleObjectsReturned
admins

Type: ManyToManyField to User

Admins (related name: admin_teams)

files

Type: Reverse ForeignKey from Content

All files of this team (related name of team)

id

Type: AutoField

Primary key: ID

name

Type: CharField

Name

objects = <django.db.models.Manager object>
organization

Type: ForeignKey to Organization

Organization (related name: teams)

organization_id

Internal field, use organization instead.

quests

Type: Reverse ForeignKey from Quest

All quests of this team (related name of team)

user_set

Type: Reverse ForeignKey from User

All users of this team (related name of active_team)

users

Type: ManyToManyField to User

Users (related name: teams)

class memopolis.models.User(id, password, last_login, is_superuser, username, first_name, last_name, email, is_staff, is_active, date_joined, language, organization, json, invite_token, active_team)[source]
Parameters:
  • id (AutoField) – Primary key: ID

  • password (CharField) – Password

  • last_login (DateTimeField) – Last login

  • is_superuser (BooleanField) – Superuser status. Designates that this user has all permissions without explicitly assigning them.

  • username (CharField) – Username. Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.

  • first_name (CharField) – First name

  • last_name (CharField) – Last name

  • email (EmailField) – Email address

  • is_staff (BooleanField) – Staff status. Designates whether the user can log into this admin site.

  • is_active (BooleanField) – Active. Designates whether this user should be treated as active. Unselect this instead of deleting accounts.

  • date_joined (DateTimeField) – Date joined

  • language (CharField) – Language

  • json (JSONField) – Json

  • invite_token (UUIDField) – Invite token

Relationship fields:

Parameters:
  • organization (ForeignKey to Organization) – Organization (related name: users)

  • active_team (ForeignKey to Team) – Active team (related name: user)

  • groups (ManyToManyField to Group) – Groups. The groups this user belongs to. A user will get all permissions granted to each of their groups. (related name: user_set)

  • user_permissions (ManyToManyField to Permission) – User permissions. Specific permissions for this user. (related name: user_set)

Reverse relationships:

Parameters:
exception DoesNotExist
exception MultipleObjectsReturned
active_team

Type: ForeignKey to Team

Active team (related name: user)

active_team_id

Internal field, use active_team instead.

admin_organizations

Type: Reverse ManyToManyField from Organization

All admin organizations of this user (related name of admins)

admin_teams

Type: Reverse ManyToManyField from Team

All admin teams of this user (related name of admins)

auth_token_set

Type: Reverse ForeignKey from AuthToken

All auth token set of this user (related name of user)

date_joined

Type: DateTimeField

Date joined

email

Type: EmailField

Email address

feedbackticket_set

Type: Reverse ForeignKey from FeedbackTicket

All feedback tickets of this user (related name of user)

files

Type: Reverse ForeignKey from Content

All files of this user (related name of user)

first_name

Type: CharField

First name

get_default_user_json()[source]
get_language_display(*, field=<django.db.models.CharField: language>)

Shows the label of the language. See get_FOO_display() for more information.

get_next_by_date_joined(*, field=<django.db.models.DateTimeField: date_joined>, is_next=True, **kwargs)

Finds next instance based on date_joined. See get_next_by_FOO() for more information.

get_previous_by_date_joined(*, field=<django.db.models.DateTimeField: date_joined>, is_next=False, **kwargs)

Finds previous instance based on date_joined. See get_previous_by_FOO() for more information.

groups

Type: ManyToManyField to Group

Groups. The groups this user belongs to. A user will get all permissions granted to each of their groups. (related name: user_set)

id

Type: AutoField

Primary key: ID

invite_token

Type: UUIDField

Invite token

is_active

Type: BooleanField

Active. Designates whether this user should be treated as active. Unselect this instead of deleting accounts.

is_staff

Type: BooleanField

Staff status. Designates whether the user can log into this admin site.

is_superuser

Type: BooleanField

Superuser status. Designates that this user has all permissions without explicitly assigning them.

json

Type: JSONField

Json

language

Type: CharField

Language

Choices:

  • en

  • de

  • fi

  • pt-PT

  • el

last_login

Type: DateTimeField

Last login

last_name

Type: CharField

Last name

logentry_set

Type: Reverse ForeignKey from LogEntry

All log entries of this user (related name of user)

maps

Type: Reverse ForeignKey from Map

All maps of this user (related name of user)

organization

Type: ForeignKey to Organization

Organization (related name: users)

organization_id

Internal field, use organization instead.

password

Type: CharField

Password

teams

Type: Reverse ManyToManyField from Team

All teams of this user (related name of users)

user_permissions

Type: ManyToManyField to Permission

User permissions. Specific permissions for this user. (related name: user_set)

username

Type: CharField

Username. Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.

class memopolis.models.WorldObject(id, uuid, map, json)[source]
Parameters:

Relationship fields:

Parameters:

map (ForeignKey to Map) – Map (related name: users)

exception DoesNotExist
exception MultipleObjectsReturned
get_default_worldobject_json()[source]
id

Type: AutoField

Primary key: ID

json

Type: JSONField

Json

map

Type: ForeignKey to Map

Map (related name: users)

map_id

Internal field, use map instead.

objects = <django.db.models.Manager object>
uuid

Type: UUIDField

Uuid

memopolis.models.content_filepath(instance, filename)[source]
memopolis.models.get_default_language()[source]
memopolis.models.validate_is_acceptable_content_file(file)[source]