python3: absolute imports in manager.user_views cbv methods
This commit is contained in:
parent
c471f4cedd
commit
872a33d8a1
|
@ -645,7 +645,7 @@ class UserImportsView(MediaMixin, PermissionMixin, FormView):
|
|||
template_name = 'authentic2/manager/user_imports.html'
|
||||
|
||||
def post(self, request, *args, **kwargs):
|
||||
from . import user_import
|
||||
from authentic2.manager import user_import
|
||||
|
||||
if 'delete' in request.POST:
|
||||
uuid = request.POST['delete']
|
||||
|
@ -661,7 +661,7 @@ class UserImportsView(MediaMixin, PermissionMixin, FormView):
|
|||
return redirect(self.request, 'a2-manager-users-import', kwargs={'uuid': user_import.uuid})
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
from . import user_import
|
||||
from authentic2.manager import user_import
|
||||
|
||||
ctx = super(UserImportsView, self).get_context_data(**kwargs)
|
||||
ctx['imports'] = sorted(user_import.UserImport.all(), key=operator.attrgetter('created'), reverse=True)
|
||||
|
@ -710,7 +710,7 @@ class UserImportView(MediaMixin, PermissionMixin, FormView):
|
|||
template_name = 'authentic2/manager/user_import.html'
|
||||
|
||||
def dispatch(self, request, uuid, **kwargs):
|
||||
from user_import import UserImport
|
||||
from authentic2.manager.user_import import UserImport
|
||||
self.user_import = UserImport(uuid)
|
||||
if not self.user_import.exists():
|
||||
raise Http404
|
||||
|
@ -727,7 +727,7 @@ class UserImportView(MediaMixin, PermissionMixin, FormView):
|
|||
return kwargs
|
||||
|
||||
def post(self, request, *args, **kwargs):
|
||||
from . import user_import
|
||||
from authentic2.manager import user_import
|
||||
|
||||
if 'delete' in request.POST:
|
||||
uuid = request.POST['delete']
|
||||
|
@ -770,7 +770,7 @@ class UserImportReportView(MediaMixin, PermissionMixin, TemplateView):
|
|||
template_name = 'authentic2/manager/user_import_report.html'
|
||||
|
||||
def dispatch(self, request, import_uuid, report_uuid):
|
||||
from user_import import UserImport
|
||||
from authentic2.manager.user_import import UserImport
|
||||
self.user_import = UserImport(import_uuid)
|
||||
if not self.user_import.exists():
|
||||
raise Http404
|
||||
|
|
Loading…
Reference in New Issue