Files
edx-platform/cms/djangoapps/xblock_config/forms.py
Feanil Patel 9cf2f9f298 Run 2to3 -f future . -w
This will remove imports from __future__ that are no longer needed.

https://docs.python.org/3.5/library/2to3.html#2to3fixer-future
2019-12-30 10:35:30 -05:00

30 lines
673 B
Python

"""
Defines a form for providing validation of LTI consumer course-specific configuration.
"""
import logging
from django import forms
from openedx.core.lib.courses import clean_course_id
from xblock_config.models import CourseEditLTIFieldsEnabledFlag
log = logging.getLogger(__name__)
class CourseEditLTIFieldsEnabledAdminForm(forms.ModelForm):
"""
Form for LTI consumer course-specific configuration to verify the course id.
"""
class Meta(object):
model = CourseEditLTIFieldsEnabledFlag
fields = '__all__'
def clean_course_id(self):
"""
Validate the course id
"""
return clean_course_id(self)