Skip to content

Commit

Permalink
bug fix: creating user via cli
Browse files Browse the repository at this point in the history
  • Loading branch information
usmannasir committed Aug 19, 2024
1 parent 966c472 commit d59a40c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
10 changes: 3 additions & 7 deletions CyberCP/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))


# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/1.11/howto/deployment/checklist/

Expand All @@ -38,6 +37,7 @@
'django.contrib.messages',
'django.contrib.staticfiles',
'baseTemplate',
'firewall',
'loginSystem',
'packages',
'websiteFunctions',
Expand All @@ -49,7 +49,6 @@
'databases',
'mailServer',
'serverLogs',
'firewall',
'backup',
'managePHP',
'manageSSL',
Expand All @@ -66,7 +65,7 @@
'containerization',
'CLManager',
'IncBackups',
# 'WebTerminal'
# 'WebTerminal'
]

MIDDLEWARE = [
Expand All @@ -83,7 +82,6 @@

ROOT_URLCONF = 'CyberCP.urls'


TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
Expand All @@ -103,7 +101,6 @@

WSGI_APPLICATION = 'CyberCP.wsgi.application'


# Database
# https://docs.djangoproject.com/en/1.11/ref/settings/#databases

Expand Down Expand Up @@ -146,7 +143,6 @@
},
]


# Internationalization
# https://docs.djangoproject.com/en/1.11/topics/i18n/

Expand Down Expand Up @@ -193,4 +189,4 @@

MEDIA_URL = '/usr/local/CyberCP/tmp/'
MEDIA_ROOT = MEDIA_URL
DATA_UPLOAD_MAX_MEMORY_SIZE = 52428800
DATA_UPLOAD_MAX_MEMORY_SIZE = 52428800
3 changes: 1 addition & 2 deletions loginSystem/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,11 @@
from plogical import hashPassword
import json
from packages.models import Package
from firewall.models import FirewallRules
from baseTemplate.models import version
from plogical.getSystemInformation import SystemInformation
from .models import ACL
from plogical.acl import ACLManager
from django.views.decorators.csrf import ensure_csrf_cookie
from plogical.CyberCPLogFileWriter import CyberCPLogFileWriter as logging
from django.conf import settings
from django.http import HttpResponse
from django.utils import translation
Expand Down Expand Up @@ -162,6 +160,7 @@ def loadLoginPage(request):

#return render(request, 'baseTemplate/homePage.html', finaData)
except KeyError:
from firewall.models import FirewallRules

numberOfAdministrator = Administrator.objects.count()
password = hashPassword.hash_password('1234567')
Expand Down

0 comments on commit d59a40c

Please sign in to comment.