1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2024-10-31 19:44:16 +00:00

Django 3.2.4 LTS upgrade

This commit is contained in:
catborise 2021-06-15 09:42:55 +03:00 committed by catborise
parent d7c0f9445d
commit 5aa22ac042
28 changed files with 58 additions and 28 deletions

View file

@ -1,6 +1,6 @@
{% extends "base.html" %}
{% load i18n %}
{% load staticfiles %}
{% load static %}
{% load icons %}
{% block title %}{% trans "Instances" %} - {{ compute.name }}{% endblock %}
{% block style %}

View file

@ -1,6 +1,6 @@
{% extends "base.html" %}
{% load i18n %}
{% load staticfiles %}
{% load static %}
{% load icons %}
{% block title %}{% trans "Overview" %} - {{ compute.name }}{% endblock %}

View file

@ -1,4 +1,4 @@
from secrets.views import secrets
from virtsecrets.views import secrets
from django.urls import include, path
# from instances.views import create_instance, create_instance_select_type

View file

@ -1,4 +1,4 @@
Django==2.2.22
Django==3.2.4
django-bootstrap4==3.0.1
django-icons==4.0.0
django-login-required-middleware==0.6.1

View file

@ -1,4 +1,4 @@
{% load staticfiles %}
{% load static %}
{% load i18n %}
<html>

View file

@ -24,7 +24,7 @@
-->
{% extends "console-base.html" %}
{% load i18n %}
{% load staticfiles %}
{% load static %}
{% block head %}
<title>WebVirtCloud - Spice Client - Full</title>

View file

@ -24,7 +24,7 @@
-->
{% extends "console-base.html" %}
{% load i18n %}
{% load staticfiles %}
{% load static %}
{% block head %}
<title>WebVirtCloud - Spice - Lite</title>

View file

@ -1,6 +1,6 @@
{% extends "console-base.html" %}
{% load i18n %}
{% load staticfiles %}
{% load static %}
{% block head %}
<!--

View file

@ -1,6 +1,6 @@
{% extends "console-base.html" %}
{% load i18n %}
{% load staticfiles %}
{% load static %}
{% block head %}
<!--

View file

@ -1,7 +1,7 @@
{% extends "base.html" %}
{% load i18n %}
{% load icons %}
{% load staticfiles %}
{% load static %}
{% block title %}{% trans "Instances" %}{% endblock %}
{% block style %}
<link rel="stylesheet" href="{% static 'css/sortable-theme-bootstrap.css' %}" />

View file

@ -1,6 +1,6 @@
{% extends "base.html" %}
{% load i18n %}
{% load staticfiles %}
{% load static %}
{% block title %}{% trans "Create new instance" %} - {% trans "Select Type" %}{% endblock %}

View file

@ -1,6 +1,6 @@
{% extends "base.html" %}
{% load i18n %}
{% load staticfiles %}
{% load static %}
{% load icons %}
{% block title %}{% trans "Create new instance" %}{% endblock %}

View file

@ -1,5 +1,5 @@
{% extends "base.html" %}
{% load staticfiles %}
{% load static %}
{% load i18n %}
{% block title %}{% trans "Instance" %} - {{ instance.name }}{% endblock %}

View file

@ -1,6 +1,6 @@
{% extends "base.html" %}
{% load i18n %}
{% load staticfiles %}
{% load static %}
{% block title %}{% trans "Interfaces" %} - {{ compute.name }}{% endblock %}

View file

@ -1,6 +1,6 @@
{% extends "base.html" %}
{% load i18n %}
{% load staticfiles %}
{% load static %}
{% block title %}{% trans "Network" %} - {{ pool }}{% endblock %}

View file

@ -1,6 +1,6 @@
{% extends "base.html" %}
{% load i18n %}
{% load staticfiles %}
{% load static %}
{% block title %}{% trans "NWFilter" %}: {{ name }}{% endblock %}

View file

@ -1,6 +1,6 @@
{% extends "base.html" %}
{% load i18n %}
{% load staticfiles %}
{% load static %}
{% block title %}{% trans "NWFilters" %} - {{ compute.name }}{% endblock %}

View file

@ -1,6 +1,6 @@
{% extends "base.html" %}
{% load i18n %}
{% load staticfiles %}
{% load static %}
{% block title %}{{ compute }} - {% trans "Storage" %}: {{ pool }}{% endblock %}
{% block style %}
<link rel="stylesheet" href="{% static "css/sortable-theme-bootstrap.css" %}"/>

View file

@ -1,6 +1,6 @@
{% extends "base.html" %}
{% load i18n %}
{% load staticfiles %}
{% load static %}
{% block title %}{% trans "Secrets" %} - {{ compute.name }}{% endblock %}
{% block style %}

View file

@ -1,4 +1,4 @@
from secrets.forms import AddSecret
from virtsecrets.forms import AddSecret
from admin.decorators import superuser_only
from computes.models import Compute
@ -13,7 +13,7 @@ from libvirt import (
VIR_SECRET_USAGE_TYPE_VOLUME,
libvirtError,
)
from vrtManager.secrets import wvmSecrets
from vrtManager.virtsecrets import wvmSecrets
@superuser_only

View file

@ -3,10 +3,10 @@ Django settings for webvirtcloud project.
"""
import os
from pathlib import Path
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent
SECRET_KEY = ""
@ -63,7 +63,7 @@ TEMPLATES = [
{
"BACKEND": "django.template.backends.django.DjangoTemplates",
"DIRS": [
os.path.join(BASE_DIR, "templates"),
Path.joinpath(BASE_DIR, "templates"),
],
"APP_DIRS": True,
"OPTIONS": {
@ -83,6 +83,7 @@ TEMPLATES = [
WSGI_APPLICATION = "webvirtcloud.wsgi.application"
# Settings for django-icons
DJANGO_ICONS = {
@ -96,19 +97,20 @@ DJANGO_ICONS = {
},
}
# Database
# https://docs.djangoproject.com/en/3.0/ref/settings/#databases
DATABASES = {
"default": {
"ENGINE": "django.db.backends.sqlite3",
"NAME": os.path.join(BASE_DIR, "db.sqlite3"),
"NAME": Path.joinpath(BASE_DIR, "db.sqlite3"),
}
}
AUTHENTICATION_BACKENDS = [
"django.contrib.auth.backends.ModelBackend",
"webvirtcloud.ldapbackend.LdapAuthenticationBackend",
#"webvirtcloud.ldapbackend.LdapAuthenticationBackend",
]
LOGIN_URL = "/accounts/login/"
@ -128,13 +130,35 @@ USE_TZ = True
STATIC_URL = "/static/"
STATICFILES_DIRS = [
os.path.join(BASE_DIR, "static"),
Path.joinpath(BASE_DIR, "static"),
]
# Default primary key field type
# https://docs.djangoproject.com/en/3.2/ref/settings/#default-auto-field
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
LOCALE_PATHS = [
"locale/",
]
# Settings for django-icons
DJANGO_ICONS = {
'DEFAULTS': {
'renderer': 'fontawesome4',
},
'RENDERERS': {
'fontawesome4': 'FontAwesome4Renderer',
'bootstrap3': 'Bootstrap3Renderer',
},
}
LOGGING = {
"version": 1,
"disable_existing_loggers": False,
@ -150,6 +174,7 @@ LOGGING = {
},
}
#
# WebVirtCloud settings
#
@ -223,10 +248,15 @@ ALLOW_EMPTY_PASSWORD = False
NEW_USER_DEFAULT_INSTANCES = []
SHOW_PROFILE_EDIT_PASSWORD = True
# OTP Config
OTP_ENABLED = False
LOGIN_REQUIRED_IGNORE_VIEW_NAMES = ["accounts:login", "accounts:email_otp"]
# LDAP Config
#
LDAP_ENABLED = False
LDAP_URL = ''
LDAP_PORT = 389