~netlandish/django-wiki

b6bf63ad958f44102979ead7ceb16cfe26b64585 — Benjamin Bach 6 years ago f7bab18 + c737f0d
Merge pull request #798 from atombrella/merge_view_cbv

Don't inherit from object. It's default in Python 3.
M src/wiki/core/compat.py => src/wiki/core/compat.py +1 -1
@@ 11,7 11,7 @@ USER_MODEL = getattr(django_settings, 'AUTH_USER_MODEL', 'auth.User')
# so we restore that version.
# When support for Django < 1.11 is dropped, we should look at using the
# new template based rendering, at which point this probably won't be needed at all.
class BuildAttrsCompat(object):
class BuildAttrsCompat:
    def build_attrs_compat(self, extra_attrs=None, **kwargs):
        "Helper function for building an attribute dictionary."
        attrs = self.attrs.copy()

M src/wiki/core/plugins/base.py => src/wiki/core/plugins/base.py +2 -2
@@ 13,7 13,7 @@ plugin's models.
"""


class BasePlugin(object):
class BasePlugin:

    """Plugins should inherit from this"""
    # Must fill in!


@@ 59,7 59,7 @@ class PluginSidebarFormMixin(forms.ModelForm):
        pass


class PluginSettingsFormMixin(object):
class PluginSettingsFormMixin:
    settings_form_headline = _('Settings for plugin')
    settings_order = 1
    settings_write_access = False

M src/wiki/editors/base.py => src/wiki/editors/base.py +1 -1
@@ 1,7 1,7 @@
from django import forms


class BaseEditor(object):
class BaseEditor:

    """Editors should inherit from this. See wiki.editors for examples."""


M src/wiki/forms.py => src/wiki/forms.py +1 -1
@@ 100,7 100,7 @@ User = get_user_model()
Group = apps.get_model(settings.GROUP_MODEL)


class SpamProtectionMixin(object):
class SpamProtectionMixin:

    """Check a form for spam. Only works if properties 'request' and 'revision_model' are set."""


M src/wiki/managers.py => src/wiki/managers.py +2 -2
@@ 50,7 50,7 @@ class ArticleEmptyQuerySet(EmptyQuerySet):
        return self


class ArticleFkQuerySetMixin(object):
class ArticleFkQuerySetMixin:

    def can_read(self, user):
        """Filter objects so only the ones with a user's reading access


@@ 86,7 86,7 @@ class ArticleFkQuerySetMixin(object):
        return self.filter(article__current_revision__deleted=False)


class ArticleFkEmptyQuerySetMixin(object):
class ArticleFkEmptyQuerySetMixin:

    def can_read(self, user):
        return self

M src/wiki/urls.py => src/wiki/urls.py +1 -1
@@ 6,7 6,7 @@ from wiki.core.utils import get_class_from_str
from wiki.views import accounts, article, deleted_list


class WikiURLPatterns(object):
class WikiURLPatterns:

    """
    configurator for wiki urls.

M tests/base.py => tests/base.py +3 -3
@@ 13,7 13,7 @@ SUPERUSER1_USERNAME = 'admin'
SUPERUSER1_PASSWORD = 'secret'


class RequireSuperuserMixin(object):
class RequireSuperuserMixin:

    def setUp(self):
        super().setUp()


@@ 39,7 39,7 @@ class TestBase(RequireBasicData, TestCase):
    pass


class RequireRootArticleMixin(object):
class RequireRootArticleMixin:

    def setUp(self):
        super().setUp()


@@ 100,7 100,7 @@ class SeleniumBase(WebTestCommonMixin, django_functest.FuncSeleniumMixin, Static
            pass


class ArticleWebTestUtils(object):
class ArticleWebTestUtils:

    def get_by_path(self, path):
        """