* For all files, from __future__ import unicode_literals. * Add @python_2_unicode_compatible to both models. * Test six.string_type(obj) for both models. Also, fix some new pylint warnings and improve model repr methods. MST-24
16 lines
367 B
Python
16 lines
367 B
Python
"""
|
|
Defines common methods shared by Teams classes
|
|
"""
|
|
from __future__ import absolute_import, unicode_literals
|
|
|
|
from django.conf import settings
|
|
|
|
TEAM_DISCUSSION_CONTEXT = 'standalone'
|
|
|
|
|
|
def is_feature_enabled(course):
|
|
"""
|
|
Returns True if the teams feature is enabled.
|
|
"""
|
|
return settings.FEATURES.get('ENABLE_TEAMS', False) and course.teams_enabled
|