Skip to content

Commit f04e4bc

Browse files
authored
Merge pull request #5863 from stsewd/remove-django-guardian
Remove django guardian
2 parents c907f03 + 926515f commit f04e4bc

File tree

5 files changed

+4
-15
lines changed

5 files changed

+4
-15
lines changed

pytest.ini

-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ filterwarnings =
77
ignore::django.utils.deprecation.RemovedInDjango20Warning
88

99
# Ignore external dependencies warning deprecations
10-
# django-guardian
11-
ignore:Shortcut function 'assign'.*:DeprecationWarning
1210
# textclassifier
1311
ignore:The 'warn' method is deprecated, use 'warning' instead:DeprecationWarning
1412
# django-rest-framework

readthedocs/builds/admin.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
"""Django admin interface for `~builds.models.Build` and related models."""
22

33
from django.contrib import admin, messages
4-
from guardian.admin import GuardedModelAdmin
54
from polymorphic.admin import (
65
PolymorphicChildModelAdmin,
76
PolymorphicParentModelAdmin,
@@ -56,7 +55,8 @@ def version_name(self, obj):
5655
return obj.version.verbose_name
5756

5857

59-
class VersionAdmin(GuardedModelAdmin):
58+
class VersionAdmin(admin.ModelAdmin):
59+
6060
list_display = (
6161
'slug',
6262
'type',

readthedocs/projects/admin.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
1-
# -*- coding: utf-8 -*-
2-
31
"""Django administration interface for `projects.models`."""
42

53
from django.contrib import admin, messages
64
from django.contrib.admin.actions import delete_selected
75
from django.utils.translation import ugettext_lazy as _
8-
from guardian.admin import GuardedModelAdmin
96

107
from readthedocs.builds.models import Version
118
from readthedocs.core.models import UserProfile
@@ -127,7 +124,7 @@ def queryset(self, request, queryset):
127124
return queryset
128125

129126

130-
class ProjectAdmin(GuardedModelAdmin):
127+
class ProjectAdmin(admin.ModelAdmin):
131128

132129
"""Project model admin view."""
133130

readthedocs/settings/base.py

+1-6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: utf-8 -*-
21
# pylint: disable=missing-docstring
32

43
import getpass
@@ -107,7 +106,6 @@ def INSTALLED_APPS(self): # noqa
107106
# third party apps
108107
'dj_pagination',
109108
'taggit',
110-
'guardian',
111109
'django_gravatar',
112110
'rest_framework',
113111
'rest_framework.authtoken',
@@ -474,9 +472,6 @@ def USE_PROMOS(self): # noqa
474472

475473
INTERNAL_IPS = ('127.0.0.1',)
476474

477-
# Guardian Settings
478-
GUARDIAN_RAISE_403 = True
479-
480475
# Stripe
481476
STRIPE_SECRET = None
482477
STRIPE_PUBLISHABLE = None
@@ -514,7 +509,7 @@ def USE_PROMOS(self): # noqa
514509
'PAGE_SIZE': 10,
515510
}
516511

517-
SILENCED_SYSTEM_CHECKS = ['fields.W342', 'guardian.W001']
512+
SILENCED_SYSTEM_CHECKS = ['fields.W342']
518513

519514
# Logging
520515
LOG_FORMAT = '%(name)s:%(lineno)s[%(process)d]: %(levelname)s %(message)s'

requirements/pip.txt

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ appdirs==1.4.3
44
virtualenv==16.6.1
55

66
django==1.11.21 # pyup: <1.12
7-
django-guardian==1.5.1 # pyup: <2.0.0
87
django-extensions==2.1.9
98
django_polymorphic==2.0.3
109

0 commit comments

Comments
 (0)