mirror of
https://github.com/retspen/webvirtcloud
synced 2026-03-22 10:34:49 +00:00
Added django-login-required-middleware
Thus eliminating need for login_requred decorator on every view
This commit is contained in:
parent
d8b0246a78
commit
a5bf337052
3 changed files with 8 additions and 9 deletions
|
|
@ -16,6 +16,7 @@ from vrtManager.connection import (CONN_SOCKET, CONN_SSH, CONN_TCP, CONN_TLS, co
|
||||||
from vrtManager.hostdetails import wvmHostDetails
|
from vrtManager.hostdetails import wvmHostDetails
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@superuser_only
|
@superuser_only
|
||||||
def computes(request):
|
def computes(request):
|
||||||
"""
|
"""
|
||||||
|
|
|
||||||
|
|
@ -1,18 +1,16 @@
|
||||||
from secrets.forms import AddSecret
|
|
||||||
|
|
||||||
from django.http import HttpResponseRedirect
|
from django.http import HttpResponseRedirect
|
||||||
from django.shortcuts import get_object_or_404, render
|
from django.shortcuts import get_object_or_404, render
|
||||||
from django.urls import reverse
|
from django.urls import reverse
|
||||||
from libvirt import libvirtError
|
from libvirt import libvirtError
|
||||||
from libvirt import VIR_SECRET_USAGE_TYPE_NONE, \
|
from libvirt import (VIR_SECRET_USAGE_TYPE_NONE,
|
||||||
VIR_SECRET_USAGE_TYPE_CEPH, \
|
VIR_SECRET_USAGE_TYPE_CEPH,
|
||||||
VIR_SECRET_USAGE_TYPE_TLS, \
|
VIR_SECRET_USAGE_TYPE_TLS,
|
||||||
VIR_SECRET_USAGE_TYPE_VOLUME, \
|
VIR_SECRET_USAGE_TYPE_VOLUME,
|
||||||
VIR_SECRET_USAGE_TYPE_ISCSI
|
VIR_SECRET_USAGE_TYPE_ISCSI)
|
||||||
|
|
||||||
from admin.decorators import superuser_only
|
from admin.decorators import superuser_only
|
||||||
|
|
||||||
from computes.models import Compute
|
from computes.models import Compute
|
||||||
|
from secrets.forms import AddSecret
|
||||||
from vrtManager.secrets import wvmSecrets
|
from vrtManager.secrets import wvmSecrets
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue