1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2025-07-31 12:41:08 +00:00

Added django-login-required-middleware

Thus eliminating need for login_requred decorator on every view
This commit is contained in:
Real-Gecko 2020-05-27 12:43:29 +06:00 committed by catborise
parent d8b0246a78
commit a5bf337052
3 changed files with 8 additions and 9 deletions

View file

@ -16,6 +16,7 @@ from vrtManager.connection import (CONN_SOCKET, CONN_SSH, CONN_TCP, CONN_TLS, co
from vrtManager.hostdetails import wvmHostDetails
@superuser_only
def computes(request):
"""

View file

@ -11,4 +11,4 @@ pytz==2020.1
rwlock==0.0.7
six==1.15.0
sqlparse==0.3.1
websockify==0.9.0
websockify==0.9.0

View file

@ -1,18 +1,16 @@
from secrets.forms import AddSecret
from django.http import HttpResponseRedirect
from django.shortcuts import get_object_or_404, render
from django.urls import reverse
from libvirt import libvirtError
from libvirt import VIR_SECRET_USAGE_TYPE_NONE, \
VIR_SECRET_USAGE_TYPE_CEPH, \
VIR_SECRET_USAGE_TYPE_TLS, \
VIR_SECRET_USAGE_TYPE_VOLUME, \
VIR_SECRET_USAGE_TYPE_ISCSI
from libvirt import (VIR_SECRET_USAGE_TYPE_NONE,
VIR_SECRET_USAGE_TYPE_CEPH,
VIR_SECRET_USAGE_TYPE_TLS,
VIR_SECRET_USAGE_TYPE_VOLUME,
VIR_SECRET_USAGE_TYPE_ISCSI)
from admin.decorators import superuser_only
from computes.models import Compute
from secrets.forms import AddSecret
from vrtManager.secrets import wvmSecrets