Files
edx-platform/lms/djangoapps/course_home_api/models.py

26 lines
842 B
Python

"""
Course home api models file
"""
from django.db import models
from django.utils.translation import ugettext_lazy as _
from openedx.core.djangoapps.config_model_utils.models import StackedConfigurationModel
class DisableProgressPageStackedConfig(StackedConfigurationModel):
"""
Stacked Config Model for disabling the frontend-app-learning progress page
"""
STACKABLE_FIELDS = ('disabled',)
# Since this config disables the progress page,
# it seemed it would be clearer to use a disabled flag instead of an enabled flag.
# The enabled field still exists but is not used or shown in the admin.
disabled = models.NullBooleanField(default=None, verbose_name=_("Disabled"))
def __str__(self):
return "DisableProgressPageStackedConfig(disabled={!r})".format(
self.disabled
)