module: acounts.models

class accounts.models.UserProfile(*args, **kwargs)

Bases: django.db.models.base.Model

Additional data on top of Django User model

always_approve = None

if true, all HITs always get approved for this user (but the user still has to wait for consensus to get the feedback about their quality)

block(reason='', save=True)

Block a user from performing all MTurk tasks. Note that Amazon is not contacted and the worker’s account is not flagged.

blocked = None

block user (only locally; not on mturk)

blocked_reason = None

reason for blocking – this will be displayed to the user

exclude_from_aggregation = None

randomly exclude some users to measure their test error

mturk_worker_id = None

Mechanical Turk Worker ID

unblock(save=True)

Unblock a user (undo the self.block() operation).

user

Django user instance (contains username, hashed password, etc). This also forms the primary key, so User and UserProfile instances have the same primary key.

accounts.models.create_user_profile(sender, instance, created, **kwargs)