Skip to content

Commit d59a40c

Browse files
committed
bug fix: creating user via cli
1 parent 966c472 commit d59a40c

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

CyberCP/settings.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
1717
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
1818

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

@@ -38,6 +37,7 @@
3837
'django.contrib.messages',
3938
'django.contrib.staticfiles',
4039
'baseTemplate',
40+
'firewall',
4141
'loginSystem',
4242
'packages',
4343
'websiteFunctions',
@@ -49,7 +49,6 @@
4949
'databases',
5050
'mailServer',
5151
'serverLogs',
52-
'firewall',
5352
'backup',
5453
'managePHP',
5554
'manageSSL',
@@ -66,7 +65,7 @@
6665
'containerization',
6766
'CLManager',
6867
'IncBackups',
69-
# 'WebTerminal'
68+
# 'WebTerminal'
7069
]
7170

7271
MIDDLEWARE = [
@@ -83,7 +82,6 @@
8382

8483
ROOT_URLCONF = 'CyberCP.urls'
8584

86-
8785
TEMPLATES = [
8886
{
8987
'BACKEND': 'django.template.backends.django.DjangoTemplates',
@@ -103,7 +101,6 @@
103101

104102
WSGI_APPLICATION = 'CyberCP.wsgi.application'
105103

106-
107104
# Database
108105
# https://docs.djangoproject.com/en/1.11/ref/settings/#databases
109106

@@ -146,7 +143,6 @@
146143
},
147144
]
148145

149-
150146
# Internationalization
151147
# https://docs.djangoproject.com/en/1.11/topics/i18n/
152148

@@ -193,4 +189,4 @@
193189

194190
MEDIA_URL = '/usr/local/CyberCP/tmp/'
195191
MEDIA_ROOT = MEDIA_URL
196-
DATA_UPLOAD_MAX_MEMORY_SIZE = 52428800
192+
DATA_UPLOAD_MAX_MEMORY_SIZE = 52428800

loginSystem/views.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,11 @@
66
from plogical import hashPassword
77
import json
88
from packages.models import Package
9-
from firewall.models import FirewallRules
109
from baseTemplate.models import version
1110
from plogical.getSystemInformation import SystemInformation
1211
from .models import ACL
1312
from plogical.acl import ACLManager
1413
from django.views.decorators.csrf import ensure_csrf_cookie
15-
from plogical.CyberCPLogFileWriter import CyberCPLogFileWriter as logging
1614
from django.conf import settings
1715
from django.http import HttpResponse
1816
from django.utils import translation
@@ -162,6 +160,7 @@ def loadLoginPage(request):
162160

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

166165
numberOfAdministrator = Administrator.objects.count()
167166
password = hashPassword.hash_password('1234567')

0 commit comments

Comments
 (0)