Files
edx-platform/openedx/core/djangoapps/demographics/models.py
Albert St. Aubin 4db9a6aa8d [MICROBA-485] Added support API and model for hiding the demographics CTA
The Demographics CTA is used to ask users to respond to the optional
questions. This API and model support the API being dismissed by the
user so they are not bothered by it.
2020-07-24 15:08:28 -04:00

25 lines
767 B
Python

from django.contrib.auth import get_user_model
from django.db import models
from model_utils.models import TimeStampedModel
from simple_history.models import HistoricalRecords
User = get_user_model()
class UserDemographics(TimeStampedModel):
"""
A Users Demographics platform related data in support of the Demographics
IDA and features
"""
user = models.ForeignKey(User, on_delete=models.CASCADE)
show_call_to_action = models.BooleanField(default=True)
history = HistoricalRecords(app='demographics')
class Meta(object):
app_label = "demographics"
verbose_name = "user demographic"
verbose_name_plural = "user demographic"
def __str__(self):
return 'UserDemographics for {}'.format(self.user)