Hi Ken,
i remove the import settings-global
i get this
raise AppRegistryNotReady("Apps aren't loaded yet.")
django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet.
Hi Ken,
i remove the import settings-global
i get this
raise AppRegistryNotReady("Apps aren't loaded yet.")
django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet.
That implies you have something in one of your settings files doing what it should be doing.
Superficially, I’m going to guess it’s caused by this line:
You can’t access your models from within the settings.
wow you are spot on: this is an old python code i trying to run it on new python 3 what do you suggest ?
encountering too many error
from django.conf.urls import patterns, url
ImportError: cannot import name 'patterns' from 'django.conf.urls' (/home/nt1506/NOC-Central/noc-central/noc-central/venv/lib/python3.9/site-packages/django/conf/urls/__init__.py)```
Do it incrementally. Start with the original environment in which it worked, then work your way through the upgrades step-by-step.
At each step, run with all warnings enabled to see all the deprecation notices and fix them.
You don’t mention what the original target system was, but if it was (example) 1.11, then you should work your way through 2.0, 2.1, 2.2, 3.0, 3.1, 3.2, 4.0, 4.1, and 4.2 to get you up to 5.0. You’ll need to read the release notes as well.
You’ll probably end up needing to work with three or four different versions of Python along the way, too.
Again, depending upon the age of the code, you could try GitHub - adamchainz/django-upgrade: Automatically upgrade your Django projects.. It handles the common cases quite well.
Or, depending upon the size and value of the code, rewrite.
wow thanks moving great, now I encountered using with urls.py i changed the import statement but init.py package still using the old setting how to just update the change to take effect i tried resource to the path of urls.py and reboot still same error:
from django.conf.urls import patterns, url
ImportError: cannot import name 'patterns' from 'django.conf.urls' (/home/nt1506/NOC-Central/noc-central/noc-central/venv/lib/python3.9/site-packages/django/conf/urls/__init__.py)
Hi Ken, I have manage to workout that, could youd guide me what should be in patterns path in urls.py?
views.py content
from django.template import Context, loader
from django import forms
from django.shortcuts import get_object_or_404, render
#from django.core.urlresolvers import reverse
from django.views import generic
import os, sys, time, re
from stat import *
from datetime import datetime
from .models import *
def input(request):
app_root = os.path.abspath(os.path.dirname(__file__))
oui_file = app_root + "/static/oui.txt"
statinfo = os.stat(oui_file)
age = time.time() - statinfo.st_mtime
context = Context( {
'last_update': datetime.fromtimestamp(statinfo.st_mtime)
} )
return render(request, 'oui/input.html', context)
def output(request):
inputdata = request.POST['inputdata']
app_root = os.path.abspath(os.path.dirname(__file__))
oui_file = app_root + "/static/oui.txt"
oui = open(oui_file,"r")
ouis = {}
ouis['ffffff'] = "BROADCAST"
for line in oui:
if (re.search('\(hex\)',line)):
parts = line.split()
o = parts.pop(0).lower()
parts.pop(0)
o = o.replace("-","")
ouis[o] = " ".join(parts)
outputdata = ""
for line in inputdata.splitlines():
original = ""
r = ""
m = re.search(r'([0-9a-f]{4}\.[0-9a-f]{4}\.[0-9a-f]{4})', line, re.I )
if ( m ):
original = m.group(1)
r = m.group(1).lower()
m = re.search(r'([0-9a-f]{4}\-[0-9a-f]{4}\-[0-9a-f]{4})', line, re.I )
if ( m ):
original = m.group(1)
r = m.group(1).lower()
m = re.search(r'([0-9a-f]{1,2}:[0-9a-f]{1,2}:[0-9a-f]{1,2}:[0-9a-f]{1,2}:[0-9a-f]{1,2}:[0-9a-f]{1,2})', line, re.I )
if ( m ):
original = m.group(1)
r = m.group(1).lower()
m = re.search(r'([0-9a-f]{2}\-[0-9a-f]{2}\-[0-9a-f]{2}\-[0-9a-f]{2}\-[0-9a-f]{2}\-[0-9a-f]{2})', line, re.I )
if ( m ):
original = m.group(1)
r = m.group(1).lower()
m = re.search(r'\b([0-9a-f]{12})\b', line, re.I )
if ( m ):
original = m.group(1)
r = m.group(1).lower()
# Cisco DHCP pools
m = re.search(r'01([0-9a-f]{2}\.[0-9a-f]{4}\.[0-9a-f]{4}\.[0-9a-f]{2})', line, re.I )
if ( m ):
original = m.group(1)
r = m.group(1).lower()
# HP
m = re.search(r'([0-9a-f]{6}\-[0-9a-f]{6})', line, re.I )
if ( m ):
original = m.group(1)
r = m.group(1).lower()
if (r != ""):
r = r.replace(":","")
r = r.replace("-","")
r = r.replace(".","")
o = r[0:6]
company = ouis[o]
if (company=="CADMUS COMPUTER SYSTEMS"):
company = company + " (VirtualBox)"
line = line.replace(original, "<b>" + original + "</b>")
outputdata = outputdata + line
if (company ):
outputdata = outputdata + " \t<b>" + company + "</b>"
else:
outputdata = outputdata + line
outputdata = outputdata + "\n"
context = Context( {
'result': outputdata
} )
return render(request, 'oui/output.html', context)
# we will add an auto-update method in here
def update(request):
pass
urls.py
from django.urls import path
from import views
urlpatterns = [
path( '',views.frontpage, name='frontpage'),
path(r'^frontpage/p/(\S+)$', views.page, name='front_page_page'),
path(r'^frontpage/dump_urls$', views.dump_urls, name='front_page_dump_urls'),
]
See the docs at URL dispatcher | Django documentation | Django and django.urls functions for use in URLconfs | Django documentation | Django, and if necessary, Writing your first Django app, part 1 | Django documentation | Django
Hi Ken, thanks. kindly advised at least point to the right direction if you can check my settings.py and urs.py and views.py at least one patternpath, the challenge is it is an old app developped by another django dev i am new to django. I havemanaged to start and run the app by your fantastic guidance. here is the last part error from the IP : port on my browser
'inputdata'
Request Method: GET
Request URL: http://xxxxxxxxxx:xxx/
Django Version: 4.2.11
Exception Type: MultiValueDictKeyError
Exception Value:
'inputdata'
Exception Location: /home/nt1506/NOC-Central/noc-central/noc-central/venv/lib/python3.9/site-packages/django/utils/datastructures.py, line 86, in __getitem__
Raised during: noc.apps.oui.views.output
Python Executable: /home/nt1506/NOC-Central/noc-central/noc-central/venv/bin/python
Python Version: 3.9.7
Python Path:
['/home/nt1506/NOC-Central/noc-central/noc-central',
'/home/nt1506/.pyenv/versions/3.9.7/lib/python39.zip',
'/home/nt1506/.pyenv/versions/3.9.7/lib/python3.9',
'/home/nt1506/.pyenv/versions/3.9.7/lib/python3.9/lib-dynload',
'/home/nt1506/NOC-Central/noc-central/noc-central/venv/lib/python3.9/site-packages']
Server time: Mon, 11 Mar 2024 14:18:13 +0000
Traceback Switch to copy-and-paste view
/home/nt1506/NOC-Central/noc-central/noc-central/venv/lib/python3.9/site-packages/django/utils/datastructures.py, line 84, in __getitem__
list_ = super().__getitem__(key) …
Local vars
During handling of the above exception ('inputdata'), another exception occurred:
/home/nt1506/NOC-Central/noc-central/noc-central/venv/lib/python3.9/site-packages/django/core/handlers/exception.py, line 55, in inner
response = get_response(request) …
Local vars
/home/nt1506/NOC-Central/noc-central/noc-central/venv/lib/python3.9/site-packages/django/core/handlers/base.py, line 197, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs) …
Local vars
/home/nt1506/NOC-Central/noc-central/noc-central/noc/apps/oui/views.py, line 31, in output
inputdata = request.POST['inputdata'] …
Local vars
/home/nt1506/NOC-Central/noc-central/noc-central/venv/lib/python3.9/site-packages/django/utils/datastructures.py, line 86, in __getitem__
raise MultiValueDictKeyError(key) …
Local vars
Request information
USER
AnonymousUser
GET
No GET data
POST
No POST data
FILES
No FILES data
COOKIES
No cookie data
META
Variable Value
CONTENT_LENGTH
''
CONTENT_TYPE
'text/plain'
DBUS_SESSION_BUS_ADDRESS
'unix:path=/run/user/1000/bus'
DJANGO_SETTINGS_MODULE
'noc.settings.local'
GATEWAY_INTERFACE
'CGI/1.1'
HOME
'/home/nt1506'
HTTP_ACCEPT
'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7'
HTTP_ACCEPT_ENCODING
'gzip, deflate'
HTTP_ACCEPT_LANGUAGE
'en-US,en;q=0.9,en-ZA;q=0.8'
HTTP_CACHE_CONTROL
'max-age=0'
HTTP_CONNECTION
'keep-alive'
HTTP_HOST
'80.64.217.211:8000'
HTTP_UPGRADE_INSECURE_REQUESTS
'1'
HTTP_USER_AGENT
('Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like '
'Gecko) Chrome/122.0.0.0 Safari/537.36 Edg/122.0.0.0')
LANG
'en_GB.UTF-8'
LANGUAGE
'en_GB:en'
LOGNAME
'nt1506'
LS_COLORS
'rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=00:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.avif=01;35:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.webp=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:*~=00;90:*#=00;90:*.bak=00;90:*.old=00;90:*.orig=00;90:*.part=00;90:*.rej=00;90:*.swp=00;90:*.tmp=00;90:*.dpkg-dist=00;90:*.dpkg-old=00;90:*.ucf-dist=00;90:*.ucf-new=00;90:*.ucf-old=00;90:*.rpmnew=00;90:*.rpmorig=00;90:*.rpmsave=00;90:'
MOTD_SHOWN
'pam'
OLDPWD
'/home/nt1506'
PATH
'/home/nt1506/NOC-Central/noc-central/noc-central/venv/bin:/usr/bin/locate:/home/nt1506/.pyenv/plugins/pyenv-virtualenv/shims:/home/nt1506/.pyenv/shims:/home/nt1506/.pyenv/bin:/home/nt1506/.pyenv/plugins/pyenv-virtualenv/shims:/home/nt1506/.pyenv/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/usr/local/bin'
PATH_INFO
'/'
PS1
('(venv) \\[\\e]0;\\u@\\h: '
'\\w\\a\\]${debian_chroot:+($debian_chroot)}\\u@\\h:\\w\\$ ')
PWD
'/home/nt1506/NOC-Central/noc-central/noc-central'
PYENV_VIRTUALENV_INIT
'1'
QUERY_STRING
''
REMOTE_ADDR
'102.212.192.16'
REMOTE_HOST
''
REQUEST_METHOD
'GET'
RUN_MAIN
'true'
SCRIPT_NAME
''
SERVER_NAME
'ISOLUK014NOC001.ironorbit.io'
SERVER_PORT
'8000'
SERVER_PROTOCOL
'HTTP/1.1'
SERVER_SOFTWARE
'WSGIServer/0.2'
SHELL
'/bin/bash'
SHLVL
'1'
SSH_CLIENT
'102.212.192.16 51090 22'
SSH_CONNECTION
'102.212.192.16 51090 172.16.202.10 22'
SSH_TTY
'/dev/pts/11'
TERM
'xterm'
TZ
'UTC'
USER
'nt1506'
VIRTUAL_ENV
'/home/nt1506/NOC-Central/noc-central/noc-central/venv'
XDG_RUNTIME_DIR
'/run/user/1000'
XDG_SESSION_CLASS
'user'
XDG_SESSION_ID
'583'
XDG_SESSION_TYPE
'tty'
_
'/home/nt1506/NOC-Central/noc-central/noc-central/venv/bin/python'
wsgi.errors
<_io.TextIOWrapper name='<stderr>' mode='w' encoding='utf-8'>
wsgi.file_wrapper
<class 'wsgiref.util.FileWrapper'>
wsgi.input
<django.core.handlers.wsgi.LimitedStream object at 0x7fe1328de7c0>
wsgi.multiprocess
False
wsgi.multithread
True
wsgi.run_once
False
wsgi.url_scheme
'http'
wsgi.version
(1, 0)
Settings
Using settings module noc.settings.local
Setting Value
ABSOLUTE_URL_OVERRIDES
{}
ADMINS
(('Nivel Tolela', 'nivel.tolela@ironorbit.com'),)
ALLOWED_HOSTS
['*']
APPEND_SLASH
True
AUTHENTICATION_BACKENDS
['django.contrib.auth.backends.ModelBackend']
AUTH_PASSWORD_VALIDATORS
'********************'
AUTH_USER_MODEL
'auth.User'
CACHES
{'default': {'BACKEND': 'django.core.cache.backends.locmem.LocMemCache'}}
CACHE_MIDDLEWARE_ALIAS
'default'
CACHE_MIDDLEWARE_KEY_PREFIX
'********************'
CACHE_MIDDLEWARE_SECONDS
600
CSRF_COOKIE_AGE
31449600
CSRF_COOKIE_DOMAIN
None
CSRF_COOKIE_HTTPONLY
False
CSRF_COOKIE_MASKED
False
CSRF_COOKIE_NAME
'csrftoken'
CSRF_COOKIE_PATH
'/'
CSRF_COOKIE_SAMESITE
'Lax'
CSRF_COOKIE_SECURE
False
CSRF_FAILURE_VIEW
'django.views.csrf.csrf_failure'
CSRF_HEADER_NAME
'HTTP_X_CSRFTOKEN'
CSRF_TRUSTED_ORIGINS
[]
CSRF_USE_SESSIONS
False
DATABASES
{'default': {'ATOMIC_REQUESTS': False,
'AUTOCOMMIT': True,
'CONN_HEALTH_CHECKS': False,
'CONN_MAX_AGE': 0,
'ENGINE': 'django.db.backends.mysql',
'HOST': '',
'NAME': 'test',
'OPTIONS': {'read_default_file': '/etc/systemd/system/mariadb.service.d/migrated-from-my.cnf-settings.conf'},
'PASSWORD': '********************',
'PORT': '',
'TEST': {'CHARSET': None,
'COLLATION': None,
'MIGRATE': True,
'MIRROR': None,
'NAME': None},
'TIME_ZONE': None,
'USER': 'noc'}}
DATABASE_ROUTERS
[]
DATA_UPLOAD_MAX_MEMORY_SIZE
2621440
DATA_UPLOAD_MAX_NUMBER_FIELDS
1000
DATA_UPLOAD_MAX_NUMBER_FILES
100
DATETIME_FORMAT
'N j, Y, P'
DATETIME_INPUT_FORMATS
['%Y-%m-%d %H:%M:%S',
'%Y-%m-%d %H:%M:%S.%f',
'%Y-%m-%d %H:%M',
'%m/%d/%Y %H:%M:%S',
'%m/%d/%Y %H:%M:%S.%f',
'%m/%d/%Y %H:%M',
'%m/%d/%y %H:%M:%S',
'%m/%d/%y %H:%M:%S.%f',
'%m/%d/%y %H:%M']
DATE_FORMAT
'N j, Y'
DATE_INPUT_FORMATS
['%Y-%m-%d',
'%m/%d/%Y',
'%m/%d/%y',
'%b %d %Y',
'%b %d, %Y',
'%d %b %Y',
'%d %b, %Y',
'%B %d %Y',
'%B %d, %Y',
'%d %B %Y',
'%d %B, %Y']
DEBUG
True
DEBUG_PROPAGATE_EXCEPTIONS
False
DECIMAL_SEPARATOR
'.'
DEFAULT_AUTO_FIELD
'django.db.models.AutoField'
DEFAULT_CHARSET
'utf-8'
DEFAULT_EXCEPTION_REPORTER
'django.views.debug.ExceptionReporter'
DEFAULT_EXCEPTION_REPORTER_FILTER
'django.views.debug.SafeExceptionReporterFilter'
DEFAULT_FILE_STORAGE
'django.core.files.storage.FileSystemStorage'
DEFAULT_FROM_EMAIL
'webmaster@localhost'
DEFAULT_INDEX_TABLESPACE
''
DEFAULT_TABLESPACE
''
DISALLOWED_USER_AGENTS
[]
EMAIL_BACKEND
'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST
'localhost'
EMAIL_HOST_PASSWORD
'********************'
EMAIL_HOST_USER
''
EMAIL_PORT
25
EMAIL_SSL_CERTFILE
None
EMAIL_SSL_KEYFILE
'********************'
EMAIL_SUBJECT_PREFIX
'[Django] '
EMAIL_TIMEOUT
None
EMAIL_USE_LOCALTIME
False
EMAIL_USE_SSL
False
EMAIL_USE_TLS
False
FILE_UPLOAD_DIRECTORY_PERMISSIONS
None
FILE_UPLOAD_HANDLERS
['django.core.files.uploadhandler.MemoryFileUploadHandler',
'django.core.files.uploadhandler.TemporaryFileUploadHandler']
FILE_UPLOAD_MAX_MEMORY_SIZE
2621440
FILE_UPLOAD_PERMISSIONS
420
FILE_UPLOAD_TEMP_DIR
None
FIRST_DAY_OF_WEEK
0
FIXTURE_DIRS
[]
FORCE_SCRIPT_NAME
None
FORMAT_MODULE_PATH
None
FORM_RENDERER
'django.forms.renderers.DjangoTemplates'
IGNORABLE_404_URLS
[]
INSTALLED_APPS
('noc.apps.frontpage',
'noc.apps.oui',
'noc.apps.routehole',
'noc.apps.nocdisplay',
'noc.apps.platformprovisioningtool',
'noc.apps.rancidmanager',
'noc.apps.autodoc',
'noc.apps.passwordstore',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.humanize',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.admin',
'django.contrib.admindocs')
INTERNAL_IPS
[]
LANGUAGES
(('en', 'English'),)
LANGUAGES_BIDI
['he', 'ar', 'ar-dz', 'ckb', 'fa', 'ur']
LANGUAGE_CODE
'en'
LANGUAGE_COOKIE_AGE
None
LANGUAGE_COOKIE_DOMAIN
None
LANGUAGE_COOKIE_HTTPONLY
False
LANGUAGE_COOKIE_NAME
'django_language'
LANGUAGE_COOKIE_PATH
'/'
LANGUAGE_COOKIE_SAMESITE
None
LANGUAGE_COOKIE_SECURE
False
LOCALE_PATHS
[]
LOGGING
{}
LOGGING_CONFIG
'logging.config.dictConfig'
LOGIN_REDIRECT_URL
'/'
LOGIN_URL
'/login/'
LOGOUT_REDIRECT_URL
None
LOGOUT_URL
'/logout/'
MANAGERS
(('Nivel Tolela', 'nivel.tolela@ironorbit.com'),)
MEDIA_ROOT
'/home/nt1506/NOC-Central/noc-central/noc-central/noc/var/uploads'
MEDIA_URL
'/uploads/'
MESSAGE_STORAGE
'django.contrib.messages.storage.fallback.FallbackStorage'
MIDDLEWARE
['django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware']
MIGRATION_MODULES
{}
MONTH_DAY_FORMAT
'F j'
NUMBER_GROUPING
0
PASSWORD_HASHERS
'********************'
PASSWORD_RESET_TIMEOUT
'********************'
PREPEND_WWW
False
PROJECT_DIR
'/home/nt1506/NOC-Central/noc-central/noc-central/noc'
PYTHON_BIN
'/home/nt1506/NOC-Central/noc-central/noc-central/venv/bin'
ROOT_URLCONF
'noc.urls'
SECRET_KEY
'********************'
SECRET_KEY_FALLBACKS
'********************'
SECURE_CONTENT_TYPE_NOSNIFF
True
SECURE_CROSS_ORIGIN_OPENER_POLICY
'same-origin'
SECURE_HSTS_INCLUDE_SUBDOMAINS
False
SECURE_HSTS_PRELOAD
False
SECURE_HSTS_SECONDS
0
SECURE_PROXY_SSL_HEADER
None
SECURE_REDIRECT_EXEMPT
[]
SECURE_REFERRER_POLICY
'same-origin'
SECURE_SSL_HOST
None
SECURE_SSL_REDIRECT
False
SERVER_EMAIL
'root@localhost'
SESSION_CACHE_ALIAS
'default'
SESSION_COOKIE_AGE
1209600
SESSION_COOKIE_DOMAIN
None
SESSION_COOKIE_HTTPONLY
True
SESSION_COOKIE_NAME
'sessionid'
SESSION_COOKIE_PATH
'/'
SESSION_COOKIE_SAMESITE
'Lax'
SESSION_COOKIE_SECURE
False
SESSION_ENGINE
'django.contrib.sessions.backends.db'
SESSION_EXPIRE_AT_BROWSER_CLOSE
False
SESSION_FILE_PATH
None
SESSION_SAVE_EVERY_REQUEST
False
SESSION_SERIALIZER
'django.contrib.sessions.serializers.JSONSerializer'
SETTINGS_MODULE
'noc.settings.local'
SHORT_DATETIME_FORMAT
'm/d/Y P'
SHORT_DATE_FORMAT
'm/d/Y'
SIGNING_BACKEND
'django.core.signing.TimestampSigner'
SILENCED_SYSTEM_CHECKS
[]
SITE_ID
1
STATICFILES_DIRS
('/home/nt1506/NOC-Central/noc-central/noc-central/noc/static',)
STATICFILES_FINDERS
('django.contrib.staticfiles.finders.AppDirectoriesFinder',
'django.contrib.staticfiles.finders.FileSystemFinder')
STATICFILES_STORAGE
None
STATIC_ROOT
'/home/nt1506/NOC-Central/noc-central/noc-central/noc/var/static'
STATIC_URL
'/static/'
STORAGES
{'default': {'BACKEND': 'django.core.files.storage.FileSystemStorage'}}
TEMPLATES
[{'APP_DIRS': True,
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': ['/home/nt1506/NOC-Central/noc-central/noc-central/noc/templates'],
'OPTIONS': {'context_processors': ['django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.template.context_processors.i18n',
'django.template.context_processors.media',
'django.template.context_processors.static',
'django.template.context_processors.tz',
'django.contrib.messages.context_processors.messages']}}]
TEMPLATE_DEBUG
True
TEST_NON_SERIALIZED_APPS
[]
TEST_RUNNER
'django.test.runner.DiscoverRunner'
THOUSAND_SEPARATOR
','
TIME_FORMAT
'P'
TIME_INPUT_FORMATS
['%H:%M:%S', '%H:%M:%S.%f', '%H:%M']
TIME_ZONE
'UTC'
USE_DEPRECATED_PYTZ
False
USE_I18N
True
USE_L10N
True
USE_THOUSAND_SEPARATOR
False
USE_TZ
True
USE_X_FORWARDED_HOST
False
USE_X_FORWARDED_PORT
False
VAR_ROOT
'/home/nt1506/NOC-Central/noc-central/noc-central/noc/var'
WSGI_APPLICATION
'noc.wsgi.application'
X_FRAME_OPTIONS
'DENY'
YEAR_MONTH_FORMAT
'F Y'
You’re seeing this error because you have DEBUG = True in your Django settings file. Change that to False, and Django will display a standard page generated by the handler for this status code.```
what can I check?
The error message shows this:
But your request shows this:
There is no request.POST
data on a GET request.
If this is important, then I suggest you consider hiring someone to help you with this. Otherwise, you’ve got a very steep learning curve to climb.