Skip to content

Remove django guardian #5863

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 1, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions pytest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions readthedocs/builds/admin.py
Original file line number Diff line number Diff line change
@@ -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,
Expand Down Expand Up @@ -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',
Expand Down
5 changes: 1 addition & 4 deletions readthedocs/projects/admin.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -127,7 +124,7 @@ def queryset(self, request, queryset):
return queryset


class ProjectAdmin(GuardedModelAdmin):
class ProjectAdmin(admin.ModelAdmin):

"""Project model admin view."""

Expand Down
7 changes: 1 addition & 6 deletions readthedocs/settings/base.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# pylint: disable=missing-docstring

import getpass
Expand Down Expand Up @@ -107,7 +106,6 @@ def INSTALLED_APPS(self): # noqa
# third party apps
'dj_pagination',
'taggit',
'guardian',
'django_gravatar',
'rest_framework',
'rest_framework.authtoken',
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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'
Expand Down
1 change: 0 additions & 1 deletion requirements/pip.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down