diff --git a/cms/djangoapps/contentstore/admin.py b/cms/djangoapps/contentstore/admin.py index 2578e7368c..013c987f39 100644 --- a/cms/djangoapps/contentstore/admin.py +++ b/cms/djangoapps/contentstore/admin.py @@ -8,6 +8,7 @@ from config_models.admin import ConfigurationModelAdmin from django.contrib import admin from django.contrib.admin.helpers import ACTION_CHECKBOX_NAME from django.utils.translation import ugettext as _ +from edx_django_utils.admin.mixins import ReadOnlyAdminMixin from cms.djangoapps.contentstore.models import VideoUploadConfig from cms.djangoapps.contentstore.outlines_regenerate import CourseOutlineRegenerate @@ -19,37 +20,6 @@ from .tasks import update_outline_from_modulestore_task, update_all_outlines_fro log = logging.getLogger(__name__) -class ReadOnlyAdminMixin(object): - """ - Disables all editing capabilities for the admin's model. - """ - def __init__(self, *args, **kwargs): - super().__init__(*args, **kwargs) - self.list_display_links = None - self.readonly_fields = [f.name for f in self.model._meta.get_fields()] - - def get_actions(self, request): - actions = super().get_actions(request) - if 'delete_selected' in actions: - del actions["delete_selected"] - return actions - - def has_add_permission(self, request): - return False - - def has_delete_permission(self, request, obj=None): # pylint: disable=unused-argument - return False - - def save_model(self, request, obj, form, change): - pass - - def delete_model(self, request, obj): - pass - - def save_related(self, request, form, formsets, change): - pass - - def regenerate_course_outlines_subset(modeladmin, request, queryset): """ Create a celery task to regenerate a single course outline for each passed-in course key. diff --git a/common/djangoapps/student/management/commands/manage_group.py b/common/djangoapps/student/management/commands/manage_group.py index 8a473fb277..06b60d1d28 100644 --- a/common/djangoapps/student/management/commands/manage_group.py +++ b/common/djangoapps/student/management/commands/manage_group.py @@ -103,7 +103,8 @@ class Command(BaseCommand): # lint-amnesty, pylint: disable=missing-class-docst except LookupError as exc: raise CommandError(str(exc)) # lint-amnesty, pylint: disable=raise-missing-from - content_type = ContentType.objects.get_for_model(model_class) + # Fetch content type for model, including proxy models. + content_type = ContentType.objects.get_for_model(model_class, for_concrete_model=False) try: new_permission = Permission.objects.get( content_type=content_type, diff --git a/requirements/edx-sandbox/py35.txt b/requirements/edx-sandbox/py35.txt index 336fc05408..fde0371d3d 100644 --- a/requirements/edx-sandbox/py35.txt +++ b/requirements/edx-sandbox/py35.txt @@ -62,7 +62,6 @@ numpy==1.16.5 # chem # matplotlib # openedx-calc - # scipy openedx-calc==1.0.9 # via -r requirements/edx-sandbox/py35.in pycparser==2.20