mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-10 07:16:15 +01:00
bug fix: creating user via cli
This commit is contained in:
@@ -16,7 +16,6 @@ from django.utils.translation import gettext_lazy as _
|
|||||||
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
|
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
|
||||||
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||||
|
|
||||||
|
|
||||||
# Quick-start development settings - unsuitable for production
|
# Quick-start development settings - unsuitable for production
|
||||||
# See https://docs.djangoproject.com/en/1.11/howto/deployment/checklist/
|
# See https://docs.djangoproject.com/en/1.11/howto/deployment/checklist/
|
||||||
|
|
||||||
@@ -38,6 +37,7 @@ INSTALLED_APPS = [
|
|||||||
'django.contrib.messages',
|
'django.contrib.messages',
|
||||||
'django.contrib.staticfiles',
|
'django.contrib.staticfiles',
|
||||||
'baseTemplate',
|
'baseTemplate',
|
||||||
|
'firewall',
|
||||||
'loginSystem',
|
'loginSystem',
|
||||||
'packages',
|
'packages',
|
||||||
'websiteFunctions',
|
'websiteFunctions',
|
||||||
@@ -49,7 +49,6 @@ INSTALLED_APPS = [
|
|||||||
'databases',
|
'databases',
|
||||||
'mailServer',
|
'mailServer',
|
||||||
'serverLogs',
|
'serverLogs',
|
||||||
'firewall',
|
|
||||||
'backup',
|
'backup',
|
||||||
'managePHP',
|
'managePHP',
|
||||||
'manageSSL',
|
'manageSSL',
|
||||||
@@ -66,7 +65,7 @@ INSTALLED_APPS = [
|
|||||||
'containerization',
|
'containerization',
|
||||||
'CLManager',
|
'CLManager',
|
||||||
'IncBackups',
|
'IncBackups',
|
||||||
# 'WebTerminal'
|
# 'WebTerminal'
|
||||||
]
|
]
|
||||||
|
|
||||||
MIDDLEWARE = [
|
MIDDLEWARE = [
|
||||||
@@ -83,7 +82,6 @@ MIDDLEWARE = [
|
|||||||
|
|
||||||
ROOT_URLCONF = 'CyberCP.urls'
|
ROOT_URLCONF = 'CyberCP.urls'
|
||||||
|
|
||||||
|
|
||||||
TEMPLATES = [
|
TEMPLATES = [
|
||||||
{
|
{
|
||||||
'BACKEND': 'django.template.backends.django.DjangoTemplates',
|
'BACKEND': 'django.template.backends.django.DjangoTemplates',
|
||||||
@@ -103,7 +101,6 @@ TEMPLATES = [
|
|||||||
|
|
||||||
WSGI_APPLICATION = 'CyberCP.wsgi.application'
|
WSGI_APPLICATION = 'CyberCP.wsgi.application'
|
||||||
|
|
||||||
|
|
||||||
# Database
|
# Database
|
||||||
# https://docs.djangoproject.com/en/1.11/ref/settings/#databases
|
# https://docs.djangoproject.com/en/1.11/ref/settings/#databases
|
||||||
|
|
||||||
@@ -146,7 +143,6 @@ AUTH_PASSWORD_VALIDATORS = [
|
|||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
# Internationalization
|
# Internationalization
|
||||||
# https://docs.djangoproject.com/en/1.11/topics/i18n/
|
# https://docs.djangoproject.com/en/1.11/topics/i18n/
|
||||||
|
|
||||||
@@ -193,4 +189,4 @@ LANGUAGES = (
|
|||||||
|
|
||||||
MEDIA_URL = '/usr/local/CyberCP/tmp/'
|
MEDIA_URL = '/usr/local/CyberCP/tmp/'
|
||||||
MEDIA_ROOT = MEDIA_URL
|
MEDIA_ROOT = MEDIA_URL
|
||||||
DATA_UPLOAD_MAX_MEMORY_SIZE = 52428800
|
DATA_UPLOAD_MAX_MEMORY_SIZE = 52428800
|
||||||
|
|||||||
@@ -6,13 +6,11 @@ from .models import Administrator
|
|||||||
from plogical import hashPassword
|
from plogical import hashPassword
|
||||||
import json
|
import json
|
||||||
from packages.models import Package
|
from packages.models import Package
|
||||||
from firewall.models import FirewallRules
|
|
||||||
from baseTemplate.models import version
|
from baseTemplate.models import version
|
||||||
from plogical.getSystemInformation import SystemInformation
|
from plogical.getSystemInformation import SystemInformation
|
||||||
from .models import ACL
|
from .models import ACL
|
||||||
from plogical.acl import ACLManager
|
from plogical.acl import ACLManager
|
||||||
from django.views.decorators.csrf import ensure_csrf_cookie
|
from django.views.decorators.csrf import ensure_csrf_cookie
|
||||||
from plogical.CyberCPLogFileWriter import CyberCPLogFileWriter as logging
|
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from django.http import HttpResponse
|
from django.http import HttpResponse
|
||||||
from django.utils import translation
|
from django.utils import translation
|
||||||
@@ -162,6 +160,7 @@ def loadLoginPage(request):
|
|||||||
|
|
||||||
#return render(request, 'baseTemplate/homePage.html', finaData)
|
#return render(request, 'baseTemplate/homePage.html', finaData)
|
||||||
except KeyError:
|
except KeyError:
|
||||||
|
from firewall.models import FirewallRules
|
||||||
|
|
||||||
numberOfAdministrator = Administrator.objects.count()
|
numberOfAdministrator = Administrator.objects.count()
|
||||||
password = hashPassword.hash_password('1234567')
|
password = hashPassword.hash_password('1234567')
|
||||||
|
|||||||
Reference in New Issue
Block a user