drdavidknott / betterstart

Betterstart app
0 stars 0 forks source link

Problem - can't overwrite or delete postcodes (Feb 22) #99

Closed greymalkin3 closed 2 years ago

greymalkin3 commented 3 years ago

I am trying to update the postcodes on test (the other projects use all the wards in Southend so I need to change 'Out of Area' to the correct ward.

I tried loading a corrected file but where the post codes already exist, it would not let me change them.

I then tried to delete all the postcodes to re-install them (not a happy idea as it would have a knock on effect) and got this error

Can I please amend postcodes en masse?

IntegrityError at /admin/people/post_code/

(1451, 'Cannot delete or update a parent row: a foreign key constraint fails (`betterstart_test_v2`.`people_street`, CONSTRAINT `people_street_post_code_id_4496b743_fk_people_post_code_id` FOREIGN KEY (`post_code_id`) REFERENCES `people_post_code` (`id`))')
Request Method: | POST -- | -- https://betterstart-236907.appspot.com/admin/people/post_code/ 3.0.14 IntegrityError (1451, 'Cannot delete or update a parent row: a foreign key constraint fails (`betterstart_test_v2`.`people_street`, CONSTRAINT `people_street_post_code_id_4496b743_fk_people_post_code_id` FOREIGN KEY (`post_code_id`) REFERENCES `people_post_code` (`id`))') /layers/google.python.pip/pip/lib/python3.7/site-packages/MySQLdb/connections.py in query, line 224 /layers/google.python.pip/pip/bin/python3 3.7.10 ['/srv', '/workspace', '/layers/google.python.pip/pip/bin', '/opt/python3.7/lib/python37.zip', '/opt/python3.7/lib/python3.7', '/opt/python3.7/lib/python3.7/lib-dynload', '/layers/google.python.pip/pip/lib/python3.7/site-packages', '/opt/python3.7/lib/python3.7/site-packages'] Tue, 25 May 2021 14:04:28 +0100

Traceback Switch to copy-and-paste view

  • /layers/google.python.pip/pip/lib/python3.7/site-packages/django/db/backends/utils.py in _execute
    1.                 return self.cursor.execute(sql, params)
  • /layers/google.python.pip/pip/lib/python3.7/site-packages/django/db/backends/mysql/base.py in execute
    1.             return self.cursor.execute(query, args)
  • /layers/google.python.pip/pip/lib/python3.7/site-packages/MySQLdb/cursors.py in execute
    1.         res = self._query(query)
  • /layers/google.python.pip/pip/lib/python3.7/site-packages/MySQLdb/cursors.py in _query
    1.         db.query(q)
  • /layers/google.python.pip/pip/lib/python3.7/site-packages/MySQLdb/connections.py in query
    1.         _mysql.connection.query(self, query)
  • The above exception ((1451, 'Cannot delete or update a parent row: a foreign key constraint fails (`betterstart_test_v2`.`people_street`, CONSTRAINT `people_street_post_code_id_4496b743_fk_people_post_code_id` FOREIGN KEY (`post_code_id`) REFERENCES `people_post_code` (`id`))')) was the direct cause of the following exception:

  • /layers/google.python.pip/pip/lib/python3.7/site-packages/django/core/handlers/exception.py in inner
    1.             response = get_response(request)
  • /layers/google.python.pip/pip/lib/python3.7/site-packages/django/core/handlers/base.py in _get_response
    1.                 response = self.process_exception_by_middleware(e, request)
  • /layers/google.python.pip/pip/lib/python3.7/site-packages/django/core/handlers/base.py in _get_response
    1.                 response = wrapped_callback(request, *callback_args, **callback_kwargs)
  • /layers/google.python.pip/pip/lib/python3.7/site-packages/django/contrib/admin/options.py in wrapper
    1.                 return self.admin_site.admin_view(view)(*args, **kwargs)
  • /layers/google.python.pip/pip/lib/python3.7/site-packages/django/utils/decorators.py in _wrapped_view
    1.                     response = view_func(request, *args, **kwargs)
  • /layers/google.python.pip/pip/lib/python3.7/site-packages/django/views/decorators/cache.py in _wrapped_view_func
    1.         response = view_func(request, *args, **kwargs)
  • /layers/google.python.pip/pip/lib/python3.7/site-packages/django/contrib/admin/sites.py in inner
    1.             return view(request, *args, **kwargs)
  • /layers/google.python.pip/pip/lib/python3.7/site-packages/django/utils/decorators.py in _wrapper
    1.         return bound_method(*args, **kwargs)
  • /layers/google.python.pip/pip/lib/python3.7/site-packages/django/utils/decorators.py in _wrapped_view
    1.                     response = view_func(request, *args, **kwargs)
  • /layers/google.python.pip/pip/lib/python3.7/site-packages/django/contrib/admin/options.py in changelist_view
    1.                 response = self.response_action(request, queryset=cl.get_queryset(request))
  • /layers/google.python.pip/pip/lib/python3.7/site-packages/django/contrib/admin/options.py in response_action
    1.             response = func(self, request, queryset)
  • /layers/google.python.pip/pip/lib/python3.7/site-packages/django/contrib/admin/actions.py in delete_selected
    1.             modeladmin.delete_queryset(request, queryset)
  • /layers/google.python.pip/pip/lib/python3.7/site-packages/django/contrib/admin/options.py in delete_queryset
    1.         queryset.delete()
  • /layers/google.python.pip/pip/lib/python3.7/site-packages/django/db/models/query.py in delete
    1.         deleted, _rows_count = collector.delete()
  • /layers/google.python.pip/pip/lib/python3.7/site-packages/django/db/models/deletion.py in delete
    1.                 count = query.delete_batch(pk_list, self.using)
  • /layers/google.python.pip/pip/lib/python3.7/site-packages/django/db/models/sql/subqueries.py in delete_batch
    1.             num_deleted += self.do_query(self.get_meta().db_table, self.where, using=using)
  • /layers/google.python.pip/pip/lib/python3.7/site-packages/django/db/models/sql/subqueries.py in do_query
    1.         cursor = self.get_compiler(using).execute_sql(CURSOR)
  • /layers/google.python.pip/pip/lib/python3.7/site-packages/django/db/models/sql/compiler.py in execute_sql
    1.             cursor.execute(sql, params)
  • /layers/google.python.pip/pip/lib/python3.7/site-packages/django/db/backends/utils.py in execute
    1.             return super().execute(sql, params)
  • /layers/google.python.pip/pip/lib/python3.7/site-packages/django/db/backends/utils.py in execute
    1.         return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
  • /layers/google.python.pip/pip/lib/python3.7/site-packages/django/db/backends/utils.py in _execute_with_wrappers
    1.         return executor(sql, params, many, context)
  • /layers/google.python.pip/pip/lib/python3.7/site-packages/django/db/backends/utils.py in _execute
    1.                 return self.cursor.execute(sql, params)
  • /layers/google.python.pip/pip/lib/python3.7/site-packages/django/db/utils.py in __exit__
    1.                 raise dj_exc_value.with_traceback(traceback) from exc_value
  • /layers/google.python.pip/pip/lib/python3.7/site-packages/django/db/backends/utils.py in _execute
    1.                 return self.cursor.execute(sql, params)
  • /layers/google.python.pip/pip/lib/python3.7/site-packages/django/db/backends/mysql/base.py in execute
    1.             return self.cursor.execute(query, args)
  • /layers/google.python.pip/pip/lib/python3.7/site-packages/MySQLdb/cursors.py in execute
    1.         res = self._query(query)
  • /layers/google.python.pip/pip/lib/python3.7/site-packages/MySQLdb/cursors.py in _query
    1.         db.query(q)
  • /layers/google.python.pip/pip/lib/python3.7/site-packages/MySQLdb/connections.py in query
    1.         _mysql.connection.query(self, query)

Request information

USER

tracey@test.com

GET

No GET data

POST

Variable | Value -- | -- csrfmiddlewaretoken | 'LgRgCCT1ccAYocWib9EogN8pq1i1YCUiWhapZl5u6qPPRsDBS3Dufgn8hSXvCAK3' _selected_action | '98' action | 'delete_selected' post | 'yes'

FILES

No FILES data

Variable | Value -- | -- csrftoken | 'vtfs4lW0kNkPZXquwQMLAkZZwzG9YC8kGuyBr48te1zGsd7NdKLRzNeInqlDCAY5' sessionid | '7gllri2uld2lncym8iug3rdlwalf9v55'

META

Variable | Value -- | -- CONTENT_LENGTH | '2111' CONTENT_TYPE | 'application/x-www-form-urlencoded' CSRF_COOKIE | 'vtfs4lW0kNkPZXquwQMLAkZZwzG9YC8kGuyBr48te1zGsd7NdKLRzNeInqlDCAY5' 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.9' HTTP_ACCEPT_ENCODING | 'gzip, deflate, br' HTTP_ACCEPT_LANGUAGE | 'en-GB,en-US;q=0.9,en;q=0.8' HTTP_CACHE_CONTROL | 'max-age=0' HTTP_COOKIE | ('csrftoken=vtfs4lW0kNkPZXquwQMLAkZZwzG9YC8kGuyBr48te1zGsd7NdKLRzNeInqlDCAY5; ' 'sessionid=7gllri2uld2lncym8iug3rdlwalf9v55') HTTP_FORWARDED | 'for="2a00:23c5:d400:8f00:917d:2430:2696:29d";proto=https' HTTP_HOST | 'betterstart-236907.appspot.com' HTTP_ORIGIN | 'https://betterstart-236907.appspot.com' HTTP_REFERER | 'https://betterstart-236907.appspot.com/admin/people/post_code/' HTTP_SEC_CH_UA | '" Not A;Brand";v="99", "Chromium";v="90", "Google Chrome";v="90"' HTTP_SEC_CH_UA_MOBILE | '?0' HTTP_SEC_FETCH_DEST | 'document' HTTP_SEC_FETCH_MODE | 'navigate' HTTP_SEC_FETCH_SITE | 'same-origin' HTTP_SEC_FETCH_USER | '?1' HTTP_TRACEPARENT | '00-065b106f845a8b05b06c429a58dee306-c6838fa64a764220-00' HTTP_UPGRADE_INSECURE_REQUESTS | '1' HTTP_USER_AGENT | ('Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like ' 'Gecko) Chrome/90.0.4430.212 Safari/537.36') HTTP_X_APPENGINE_API_TICKET | 'ChA5ZTdhZTM4NjgyNTc2ODY3GhMIzqfR0vLk8AIVwk/oCh2uewV4' HTTP_X_APPENGINE_CITY | 'southend-on-sea' HTTP_X_APPENGINE_CITYLATLONG | '51.545927,0.707712' HTTP_X_APPENGINE_COUNTRY | 'GB' HTTP_X_APPENGINE_DEFAULT_VERSION_HOSTNAME | 'betterstart-236907.appspot.com' HTTP_X_APPENGINE_HTTPS | 'on' HTTP_X_APPENGINE_REGION | 'eng' HTTP_X_APPENGINE_REQUEST_LOG_ID | '60acf5d800ff0d2dce6986a24c0001657e62657474657273746172742d323336393037000173746167696e67000100' HTTP_X_APPENGINE_TIMEOUT_MS | '599999' HTTP_X_APPENGINE_USER_IP | '2a00:23c5:d400:8f00:917d:2430:2696:29d' HTTP_X_CLOUD_TRACE_CONTEXT | '065b106f845a8b05b06c429a58dee306/14304434785835434528' HTTP_X_FORWARDED_FOR | '2a00:23c5:d400:8f00:917d:2430:2696:29d, 169.254.1.1' HTTP_X_FORWARDED_PROTO | 'https' PATH_INFO | '/admin/people/post_code/' QUERY_STRING | '' RAW_URI | '/admin/people/post_code/' REMOTE_ADDR | '127.0.0.1' REMOTE_PORT | '54681' REQUEST_METHOD | 'POST' SCRIPT_NAME | '' SERVER_NAME | '0.0.0.0' SERVER_PORT | '8081' SERVER_PROTOCOL | 'HTTP/1.1' SERVER_SOFTWARE | 'gunicorn/20.0.4' gunicorn.socket | <socket.socket fd=10, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('127.0.0.1', 8081), raddr=('127.0.0.1', 54681)> wsgi.errors | <gunicorn.http.wsgi.WSGIErrorsWrapper object at 0x3e4b977fda90> wsgi.file_wrapper | '' wsgi.input | <gunicorn.http.body.Body object at 0x3e4b977fdad0> wsgi.input_terminated | True wsgi.multiprocess | True wsgi.multithread | True wsgi.run_once | False wsgi.url_scheme | 'https' wsgi.version | (1, 0)

Settings

Using settings module betterstart.settings

Setting | Value -- | -- ABSOLUTE_URL_OVERRIDES | {} ADMINS | [] ALLOWED_HOSTS | ['betterstart-236907.appspot.com', '127.0.0.1', 'oysta.org', 'www.oysta.org', 'betterstart.oysta.org', 'betterstart-uat.appspot.com'] APPEND_SLASH | True AUTHENTICATION_BACKENDS | ['django.contrib.auth.backends.ModelBackend'] AUTH_PASSWORD_VALIDATORS | '********************' AUTH_USER_MODEL | 'auth.User' BASE_DIR | '/srv' CACHES | {'default': {'BACKEND': 'django.core.cache.backends.locmem.LocMemCache'}} CACHE_MIDDLEWARE_ALIAS | 'default' CACHE_MIDDLEWARE_KEY_PREFIX | '********************' CACHE_MIDDLEWARE_SECONDS | 600 CRISPY_TEMPLATE_PACK | 'bootstrap3' CSRF_COOKIE_AGE | 31449600 CSRF_COOKIE_DOMAIN | None CSRF_COOKIE_HTTPONLY | 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_MAX_AGE': 0, 'ENGINE': 'django.db.backends.mysql', 'HOST': '/cloudsql/betterstart-236907:europe-west1:betterstart', 'NAME': 'betterstart_test_v2', 'OPTIONS': {}, 'PASSWORD': '********************', 'PORT': '', 'TEST': {'CHARSET': None, 'COLLATION': None, 'MIRROR': None, 'NAME': None}, 'TIME_ZONE': None, 'USER': 'betterstart-test'}} DATABASE_ROUTERS | [] DATA_UPLOAD_MAX_MEMORY_SIZE | 2621440 DATA_UPLOAD_MAX_NUMBER_FIELDS | 1000 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', '%Y-%m-%d', '%m/%d/%Y %H:%M:%S', '%m/%d/%Y %H:%M:%S.%f', '%m/%d/%Y %H:%M', '%m/%d/%Y', '%m/%d/%y %H:%M:%S', '%m/%d/%y %H:%M:%S.%f', '%m/%d/%y %H:%M', '%m/%d/%y'] 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_CHARSET | 'utf-8' 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 | 'smtp.sendgrid.net' EMAIL_HOST_PASSWORD | '********************' EMAIL_HOST_USER | 'apikey' EMAIL_PORT | 587 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 | True FILE_CHARSET | 'utf-8' 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 | ['django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'people.apps.PeopleConfig', 'crispy_forms', 'django_otp', 'django_otp.plugins.otp_totp', 'django_otp.plugins.otp_hotp', 'django_otp.plugins.otp_static', 'zxcvbn_password', 'jsignature'] INTERNAL_IPS | [] LANGUAGES | [('af', 'Afrikaans'), ('ar', 'Arabic'), ('ast', 'Asturian'), ('az', 'Azerbaijani'), ('bg', 'Bulgarian'), ('be', 'Belarusian'), ('bn', 'Bengali'), ('br', 'Breton'), ('bs', 'Bosnian'), ('ca', 'Catalan'), ('cs', 'Czech'), ('cy', 'Welsh'), ('da', 'Danish'), ('de', 'German'), ('dsb', 'Lower Sorbian'), ('el', 'Greek'), ('en', 'English'), ('en-au', 'Australian English'), ('en-gb', 'British English'), ('eo', 'Esperanto'), ('es', 'Spanish'), ('es-ar', 'Argentinian Spanish'), ('es-co', 'Colombian Spanish'), ('es-mx', 'Mexican Spanish'), ('es-ni', 'Nicaraguan Spanish'), ('es-ve', 'Venezuelan Spanish'), ('et', 'Estonian'), ('eu', 'Basque'), ('fa', 'Persian'), ('fi', 'Finnish'), ('fr', 'French'), ('fy', 'Frisian'), ('ga', 'Irish'), ('gd', 'Scottish Gaelic'), ('gl', 'Galician'), ('he', 'Hebrew'), ('hi', 'Hindi'), ('hr', 'Croatian'), ('hsb', 'Upper Sorbian'), ('hu', 'Hungarian'), ('hy', 'Armenian'), ('ia', 'Interlingua'), ('id', 'Indonesian'), ('io', 'Ido'), ('is', 'Icelandic'), ('it', 'Italian'), ('ja', 'Japanese'), ('ka', 'Georgian'), ('kab', 'Kabyle'), ('kk', 'Kazakh'), ('km', 'Khmer'), ('kn', 'Kannada'), ('ko', 'Korean'), ('lb', 'Luxembourgish'), ('lt', 'Lithuanian'), ('lv', 'Latvian'), ('mk', 'Macedonian'), ('ml', 'Malayalam'), ('mn', 'Mongolian'), ('mr', 'Marathi'), ('my', 'Burmese'), ('nb', 'Norwegian Bokmål'), ('ne', 'Nepali'), ('nl', 'Dutch'), ('nn', 'Norwegian Nynorsk'), ('os', 'Ossetic'), ('pa', 'Punjabi'), ('pl', 'Polish'), ('pt', 'Portuguese'), ('pt-br', 'Brazilian Portuguese'), ('ro', 'Romanian'), ('ru', 'Russian'), ('sk', 'Slovak'), ('sl', 'Slovenian'), ('sq', 'Albanian'), ('sr', 'Serbian'), ('sr-latn', 'Serbian Latin'), ('sv', 'Swedish'), ('sw', 'Swahili'), ('ta', 'Tamil'), ('te', 'Telugu'), ('th', 'Thai'), ('tr', 'Turkish'), ('tt', 'Tatar'), ('udm', 'Udmurt'), ('uk', 'Ukrainian'), ('ur', 'Urdu'), ('uz', 'Uzbek'), ('vi', 'Vietnamese'), ('zh-hans', 'Simplified Chinese'), ('zh-hant', 'Traditional Chinese')] LANGUAGES_BIDI | ['he', 'ar', 'fa', 'ur'] LANGUAGE_CODE | 'en-us' 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 | '/accounts/profile/' LOGIN_URL | '/people/login' LOGOUT_REDIRECT_URL | None MANAGERS | [] MEDIA_ROOT | 'media' MEDIA_URL | '/media/' 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_otp.middleware.OTPMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware'] MIGRATION_MODULES | {} MONTH_DAY_FORMAT | 'F j' NUMBER_GROUPING | 0 OTP_TOTP_ISSUER | 'Betterstart System Test' PASSWORD_HASHERS | '********************' PASSWORD_RESET_TIMEOUT_DAYS | '********************' PREPEND_WWW | False ROOT_URLCONF | 'betterstart.urls' SECRET_KEY | '********************' SECURE_BROWSER_XSS_FILTER | False SECURE_CONTENT_TYPE_NOSNIFF | True SECURE_HSTS_INCLUDE_SUBDOMAINS | False SECURE_HSTS_PRELOAD | False SECURE_HSTS_SECONDS | 0 SECURE_PROXY_SSL_HEADER | None SECURE_REDIRECT_EXEMPT | [] SECURE_REFERRER_POLICY | None SECURE_SSL_HOST | None SECURE_SSL_REDIRECT | False SENDGRID_API_KEY | '********************' 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 | 'betterstart.settings' SHORT_DATETIME_FORMAT | 'm/d/Y P' SHORT_DATE_FORMAT | 'm/d/Y' SIGNING_BACKEND | 'django.core.signing.TimestampSigner' SILENCED_SYSTEM_CHECKS | [] STATICFILES_DIRS | [] STATICFILES_FINDERS | ['django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder'] STATICFILES_STORAGE | 'django.contrib.staticfiles.storage.StaticFilesStorage' STATIC_ROOT | 'static' STATIC_URL | '/static/' TEMPLATES | [{'APP_DIRS': True, 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': [], 'OPTIONS': {'context_processors': ['django.template.context_processors.debug', 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages']}}] 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 | 'Europe/London' USE_I18N | True USE_L10N | True USE_THOUSAND_SEPARATOR | False USE_TZ | True USE_X_FORWARDED_HOST | False USE_X_FORWARDED_PORT | False WSGI_APPLICATION | 'betterstart.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.

greymalkin3 commented 2 years ago

Still a problem Feb 2022

greymalkin3 commented 2 years ago

Thank you. This works perfectly