M src/wiki/plugins/attachments/views.py => src/wiki/plugins/attachments/views.py +1 -3
@@ 5,9 5,7 @@ from django.http import Http404, HttpResponseRedirect
from django.shortcuts import get_object_or_404, redirect
from django.utils.decorators import method_decorator
from django.utils.translation import gettext as _
-from django.views.generic.base import TemplateView, View
-from django.views.generic.edit import FormView
-from django.views.generic.list import ListView
+from django.views.generic import FormView, ListView, TemplateView, View
from wiki.core.http import send_file
from wiki.core.paginator import WikiPaginator
from wiki.decorators import get_article, response_forbidden
M src/wiki/plugins/images/views.py => src/wiki/plugins/images/views.py +1 -3
@@ 5,9 5,7 @@ from django.shortcuts import get_object_or_404, redirect
from django.urls import reverse
from django.utils.decorators import method_decorator
from django.utils.translation import gettext as _
-from django.views.generic.base import RedirectView
-from django.views.generic.edit import FormView
-from django.views.generic.list import ListView
+from django.views.generic import FormView, ListView, RedirectView
from wiki.conf import settings as wiki_settings
from wiki.core.paginator import WikiPaginator
from wiki.decorators import get_article
M src/wiki/plugins/links/views.py => src/wiki/plugins/links/views.py +1 -1
@@ 1,5 1,5 @@
from django.utils.decorators import method_decorator
-from django.views.generic.base import View
+from django.views.generic import View
from wiki import models
from wiki.core.utils import object_to_json_response
from wiki.decorators import get_article
M src/wiki/plugins/notifications/views.py => src/wiki/plugins/notifications/views.py +3 -3
@@ 3,7 3,7 @@ from django.contrib.auth.decorators import login_required
from django.shortcuts import redirect
from django.utils.decorators import method_decorator
from django.utils.translation import gettext as _
-from django.views.generic.edit import FormView
+from django.views.generic import FormView
from . import forms, models
@@ 40,12 40,12 @@ class NotificationSettings(FormView):
).distinct()
def get_form_kwargs(self):
- kwargs = FormView.get_form_kwargs(self)
+ kwargs = super().get_form_kwargs(self)
kwargs['user'] = self.request.user
return kwargs
def get_context_data(self, **kwargs):
- context = FormView.get_context_data(self, **kwargs)
+ context = super().get_context_data(self, **kwargs)
if 'form' not in context:
context['form'] = self.get_form()
context['formset'] = context['form']
M src/wiki/views/accounts.py => src/wiki/views/accounts.py +1 -2
@@ 16,8 16,7 @@ from django.contrib.auth.forms import AuthenticationForm
from django.shortcuts import get_object_or_404, redirect, render
from django.urls import reverse
from django.utils.translation import gettext as _
-from django.views.generic.base import View
-from django.views.generic.edit import CreateView, FormView, UpdateView
+from django.views.generic import CreateView, FormView, UpdateView, View
from wiki import forms
from wiki.conf import settings
M src/wiki/views/article.py => src/wiki/views/article.py +1 -4
@@ 11,11 11,8 @@ from django.shortcuts import get_object_or_404, redirect, render
from django.urls import reverse
from django.utils.decorators import method_decorator
from django.utils.translation import gettext as _, ngettext
-from django.views.generic import DetailView
-from django.views.generic.base import RedirectView, TemplateView, View
-from django.views.generic.edit import FormView
-from django.views.generic.list import ListView
from django.views.decorators.clickjacking import xframe_options_sameorigin
+from django.views.generic import DetailView, FormView, ListView, RedirectView, TemplateView, View
from wiki import editors, forms, models
from wiki.conf import settings
from wiki.core import permissions