diff --git a/pytest.ini b/pytest.ini index ad73d65a6ff..f0ff1692ab5 100644 --- a/pytest.ini +++ b/pytest.ini @@ -7,8 +7,6 @@ filterwarnings = ignore::django.utils.deprecation.RemovedInDjango20Warning # Ignore external dependencies warning deprecations - # django-guardian - ignore:Shortcut function 'assign'.*:DeprecationWarning # textclassifier ignore:The 'warn' method is deprecated, use 'warning' instead:DeprecationWarning # django-rest-framework diff --git a/readthedocs/builds/admin.py b/readthedocs/builds/admin.py index 8972d02629b..d5c9c40ae0e 100644 --- a/readthedocs/builds/admin.py +++ b/readthedocs/builds/admin.py @@ -1,7 +1,6 @@ """Django admin interface for `~builds.models.Build` and related models.""" from django.contrib import admin, messages -from guardian.admin import GuardedModelAdmin from polymorphic.admin import ( PolymorphicChildModelAdmin, PolymorphicParentModelAdmin, @@ -56,7 +55,8 @@ def version_name(self, obj): return obj.version.verbose_name -class VersionAdmin(GuardedModelAdmin): +class VersionAdmin(admin.ModelAdmin): + list_display = ( 'slug', 'type', diff --git a/readthedocs/projects/admin.py b/readthedocs/projects/admin.py index f84b9fb31ec..cf97ca5f73f 100644 --- a/readthedocs/projects/admin.py +++ b/readthedocs/projects/admin.py @@ -1,11 +1,8 @@ -# -*- coding: utf-8 -*- - """Django administration interface for `projects.models`.""" from django.contrib import admin, messages from django.contrib.admin.actions import delete_selected from django.utils.translation import ugettext_lazy as _ -from guardian.admin import GuardedModelAdmin from readthedocs.builds.models import Version from readthedocs.core.models import UserProfile @@ -127,7 +124,7 @@ def queryset(self, request, queryset): return queryset -class ProjectAdmin(GuardedModelAdmin): +class ProjectAdmin(admin.ModelAdmin): """Project model admin view.""" diff --git a/readthedocs/settings/base.py b/readthedocs/settings/base.py index 7c4ae9ececa..adb17effefd 100644 --- a/readthedocs/settings/base.py +++ b/readthedocs/settings/base.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # pylint: disable=missing-docstring import getpass @@ -107,7 +106,6 @@ def INSTALLED_APPS(self): # noqa # third party apps 'dj_pagination', 'taggit', - 'guardian', 'django_gravatar', 'rest_framework', 'rest_framework.authtoken', @@ -474,9 +472,6 @@ def USE_PROMOS(self): # noqa INTERNAL_IPS = ('127.0.0.1',) - # Guardian Settings - GUARDIAN_RAISE_403 = True - # Stripe STRIPE_SECRET = None STRIPE_PUBLISHABLE = None @@ -514,7 +509,7 @@ def USE_PROMOS(self): # noqa 'PAGE_SIZE': 10, } - SILENCED_SYSTEM_CHECKS = ['fields.W342', 'guardian.W001'] + SILENCED_SYSTEM_CHECKS = ['fields.W342'] # Logging LOG_FORMAT = '%(name)s:%(lineno)s[%(process)d]: %(levelname)s %(message)s' diff --git a/requirements/pip.txt b/requirements/pip.txt index 294a64802f5..91fb0a72acc 100644 --- a/requirements/pip.txt +++ b/requirements/pip.txt @@ -4,7 +4,6 @@ appdirs==1.4.3 virtualenv==16.6.1 django==1.11.21 # pyup: <1.12 -django-guardian==1.5.1 # pyup: <2.0.0 django-extensions==2.1.9 django_polymorphic==2.0.3