Bevarte busser

MultipleObjectsReturned at /firma/chassisprodusent/Nash Motors

MultipleObjectsReturned at /firma/chassisprodusent/Nash Motors

get() returned more than one Chassisprodusent -- it returned 4!
Request Method: GET
Request URL: https://db.bussdatabasen.no/firma/chassisprodusent/Nash%20Motors
Django Version: 2.1.1
Exception Type: MultipleObjectsReturned
Exception Value:
get() returned more than one Chassisprodusent -- it returned 4!
Exception Location: /usr/local/lib/python3.5/dist-packages/django/db/models/query.py in get, line 403
Python Executable: /usr/bin/python3
Python Version: 3.5.3
Python Path:
['/home/bussdatabasen',
 '/usr/lib/python35.zip',
 '/usr/lib/python3.5',
 '/usr/lib/python3.5/plat-i386-linux-gnu',
 '/usr/lib/python3.5/lib-dynload',
 '/usr/local/lib/python3.5/dist-packages',
 '/usr/lib/python3/dist-packages']
Server time: søn, 20 Jan 2019 19:19:23 +0100

Traceback Switch to copy-and-paste view

  • /usr/local/lib/python3.5/dist-packages/django/core/handlers/exception.py in inner
    1.     This decorator is automatically applied to all middleware to ensure that
    2.     no middleware leaks an exception and that the next middleware in the stack
    3.     can rely on getting a response instead of an exception.
    4.     """
    5.     @wraps(get_response)
    6.     def inner(request):
    7.         try:
    1.             response = get_response(request)
      ...
    1.         except Exception as exc:
    2.             response = response_for_exception(request, exc)
    3.         return response
    4.     return inner
    Variable Value
    exc
    MultipleObjectsReturned('get() returned more than one Chassisprodusent -- it returned 4!',)
    get_response
    <bound method BaseHandler._get_response of <django.core.handlers.wsgi.WSGIHandler object at 0x9390c98c>>
    request
    <WSGIRequest: GET '/firma/chassisprodusent/Nash%20Motors'>
  • /usr/local/lib/python3.5/dist-packages/django/core/handlers/base.py in _get_response
    1.                 break
    2.         if response is None:
    3.             wrapped_callback = self.make_view_atomic(callback)
    4.             try:
    5.                 response = wrapped_callback(request, *callback_args, **callback_kwargs)
    6.             except Exception as e:
    1.                 response = self.process_exception_by_middleware(e, request)
      ...
    1.         # Complain if the view returned None (a common error).
    2.         if response is None:
    3.             if isinstance(callback, types.FunctionType):    # FBV
    4.                 view_name = callback.__name__
    5.             else:                                           # CBV
    Variable Value
    callback
    <function list_topic at 0x932f1d1c>
    callback_args
    ()
    callback_kwargs
    {'navn': 'Nash Motors', 'topic': 'chassisprodusent'}
    middleware_method
    <bound method CsrfViewMiddleware.process_view of <django.middleware.csrf.CsrfViewMiddleware object at 0x932cfd8c>>
    request
    <WSGIRequest: GET '/firma/chassisprodusent/Nash%20Motors'>
    resolver
    <URLResolver 'bussdatabasen.urls' (None:None) '^/'>
    resolver_match
    ResolverMatch(func=bussdatabase.views.generic.list_topic, args=(), kwargs={'navn': 'Nash Motors', 'topic': 'chassisprodusent'}, url_name=generic_list, app_names=['bussdatabase'], namespaces=['bussdatabase'])
    response
    None
    self
    <django.core.handlers.wsgi.WSGIHandler object at 0x9390c98c>
    wrapped_callback
    <function list_topic at 0x932f1d1c>
  • /usr/local/lib/python3.5/dist-packages/django/core/handlers/base.py in _get_response
    1.             response = middleware_method(request, callback, callback_args, callback_kwargs)
    2.             if response:
    3.                 break
    4.         if response is None:
    5.             wrapped_callback = self.make_view_atomic(callback)
    6.             try:
    1.                 response = wrapped_callback(request, *callback_args, **callback_kwargs)
      ...
    1.             except Exception as e:
    2.                 response = self.process_exception_by_middleware(e, request)
    3.         # Complain if the view returned None (a common error).
    4.         if response is None:
    5.             if isinstance(callback, types.FunctionType):    # FBV
    Variable Value
    callback
    <function list_topic at 0x932f1d1c>
    callback_args
    ()
    callback_kwargs
    {'navn': 'Nash Motors', 'topic': 'chassisprodusent'}
    middleware_method
    <bound method CsrfViewMiddleware.process_view of <django.middleware.csrf.CsrfViewMiddleware object at 0x932cfd8c>>
    request
    <WSGIRequest: GET '/firma/chassisprodusent/Nash%20Motors'>
    resolver
    <URLResolver 'bussdatabasen.urls' (None:None) '^/'>
    resolver_match
    ResolverMatch(func=bussdatabase.views.generic.list_topic, args=(), kwargs={'navn': 'Nash Motors', 'topic': 'chassisprodusent'}, url_name=generic_list, app_names=['bussdatabase'], namespaces=['bussdatabase'])
    response
    None
    self
    <django.core.handlers.wsgi.WSGIHandler object at 0x9390c98c>
    wrapped_callback
    <function list_topic at 0x932f1d1c>
  • /home/bussdatabasen/bussdatabase/views/generic.py in list_topic
    1.     print('List topic')
    2.     # info = select_topic(topic)
    3.     if topic == 'karosserifabrikk':
    4.         import bussdatabase.views.karosserifabrikk as karosserifabrikk
    5.         return karosserifabrikk.karosserifabrikk(request, navn)
    6.     elif topic == 'chassisprodusent':
    7.         from bussdatabase.views import chassisprodusent
    1.         return chassisprodusent.chassisprodusent(request, navn)
      ...
    1.     elif topic == 'selskap':
    2.         from bussdatabase.views import selskap
    3.         return selskap.selskap(request, navn)
    4.     elif topic == 'buss':
    5.         from bussdatabase.views import buss
    6.         return buss.index(request, navn=navn)
    Variable Value
    chassisprodusent
    <module 'bussdatabase.views.chassisprodusent' from '/home/bussdatabasen/bussdatabase/views/chassisprodusent.py'>
    navn
    'Nash Motors'
    request
    <WSGIRequest: GET '/firma/chassisprodusent/Nash%20Motors'>
    topic
    'chassisprodusent'
  • /home/bussdatabasen/bussdatabase/views/chassisprodusent.py in chassisprodusent
    1. import bussdatabase.views.generic
    2. from bussdatabase.models import Chassisprodusent, Buss
    3. def chassisprodusent(request, navn):
    4.     print('Chassisprodusent')
    1.     chassis_object = get_object_or_404(Chassisprodusent, navn=navn)
      ...
    1.     busser = Buss.objects.filter(chassisprodusent=chassis_object)
    2.     title = 'Busser fra %s' % chassis_object
    3.     context = {'chassisprodusent': chassis_object, 'busser': busser, 'title': title,
    4.                'kan_endre': chassis_object.kan_endre(request.user)}
    5.     return render(request, 'bussdatabase/chassisprodusent.html', context)
    Variable Value
    navn
    'Nash Motors'
    request
    <WSGIRequest: GET '/firma/chassisprodusent/Nash%20Motors'>
  • /usr/local/lib/python3.5/dist-packages/django/shortcuts.py in get_object_or_404
    1.     if not hasattr(queryset, 'get'):
    2.         klass__name = klass.__name__ if isinstance(klass, type) else klass.__class__.__name__
    3.         raise ValueError(
    4.             "First argument to get_object_or_404() must be a Model, Manager, "
    5.             "or QuerySet, not '%s'." % klass__name
    6.         )
    7.     try:
    1.         return queryset.get(*args, **kwargs)
      ...
    1.     except queryset.model.DoesNotExist:
    2.         raise Http404('No %s matches the given query.' % queryset.model._meta.object_name)
    3. def get_list_or_404(klass, *args, **kwargs):
    4.     """
    Variable Value
    args
    ()
    klass
    <class 'bussdatabase.models.models.Chassisprodusent'>
    kwargs
    {'navn': 'Nash Motors'}
    queryset
    <QuerySet [<Chassisprodusent: AEC>, <Chassisprodusent: Bedford>, <Chassisprodusent: Buick>, <Chassisprodusent: Büssing>, <Chassisprodusent: Chevrolet>, <Chassisprodusent: DAF>, <Chassisprodusent: Diamond T Motor Car Company>, <Chassisprodusent: Federal>, <Chassisprodusent: Ford>, <Chassisprodusent: GMC>, <Chassisprodusent: Hall-Scott Motor Car Company>, <Chassisprodusent: International>, <Chassisprodusent: Leyland>, <Chassisprodusent: MAN>, <Chassisprodusent: Mercedes>, <Chassisprodusent: Nash>, <Chassisprodusent: Nash Motors>, <Chassisprodusent: Nash Motors>, <Chassisprodusent: Nash Motors>, <Chassisprodusent: Nash Motors>, '...(remaining elements truncated)...']>
  • /usr/local/lib/python3.5/dist-packages/django/db/models/query.py in get
    1.         if not num:
    2.             raise self.model.DoesNotExist(
    3.                 "%s matching query does not exist." %
    4.                 self.model._meta.object_name
    5.             )
    6.         raise self.model.MultipleObjectsReturned(
    7.             "get() returned more than one %s -- it returned %s!" %
    1.             (self.model._meta.object_name, num)
      ...
    1.         )
    2.     def create(self, **kwargs):
    3.         """
    4.         Create a new object with the given kwargs, saving it to the database
    5.         and returning the created object.
    Variable Value
    args
    ()
    clone
    <QuerySet [<Chassisprodusent: Nash Motors>, <Chassisprodusent: Nash Motors>, <Chassisprodusent: Nash Motors>, <Chassisprodusent: Nash Motors>]>
    kwargs
    {'navn': 'Nash Motors'}
    num
    4
    self
    <QuerySet [<Chassisprodusent: AEC>, <Chassisprodusent: Bedford>, <Chassisprodusent: Buick>, <Chassisprodusent: Büssing>, <Chassisprodusent: Chevrolet>, <Chassisprodusent: DAF>, <Chassisprodusent: Diamond T Motor Car Company>, <Chassisprodusent: Federal>, <Chassisprodusent: Ford>, <Chassisprodusent: GMC>, <Chassisprodusent: Hall-Scott Motor Car Company>, <Chassisprodusent: International>, <Chassisprodusent: Leyland>, <Chassisprodusent: MAN>, <Chassisprodusent: Mercedes>, <Chassisprodusent: Nash>, <Chassisprodusent: Nash Motors>, <Chassisprodusent: Nash Motors>, <Chassisprodusent: Nash Motors>, <Chassisprodusent: Nash Motors>, '...(remaining elements truncated)...']>




Request information

USER

AnonymousUser

GET

No GET data

POST

No POST data

FILES

No FILES data

No cookie data

META

Variable Value
CONTEXT_DOCUMENT_ROOT
'/var/www/html'
CONTEXT_PREFIX
''
DOCUMENT_ROOT
'/var/www/html'
GATEWAY_INTERFACE
'CGI/1.1'
HTTP_ACCEPT
'*/*'
HTTP_ACCEPT_ENCODING
'deflate, gzip'
HTTP_CONNECTION
'close'
HTTP_HOST
'db.bussdatabasen.no'
HTTP_REFERER
'https://db.bussdatabasen.no/firma/chassisprodusent/Nash%20Motors'
HTTP_USER_AGENT
'WordPress/5.0.3; https://www.bussdatabasen.no'
PATH_INFO
'/firma/chassisprodusent/Nash Motors'
PATH_TRANSLATED
'/home/bussdatabasen/wsgi.py/firma/chassisprodusent/Nash Motors'
QUERY_STRING
''
REMOTE_ADDR
'127.0.0.1'
REMOTE_PORT
'50834'
REQUEST_METHOD
'GET'
REQUEST_SCHEME
'https'
REQUEST_URI
'/firma/chassisprodusent/Nash%20Motors'
SCRIPT_FILENAME
'/home/bussdatabasen/wsgi.py'
SCRIPT_NAME
''
SERVER_ADDR
'127.0.0.1'
SERVER_ADMIN
'[no address given]'
SERVER_NAME
'db.bussdatabasen.no'
SERVER_PORT
'443'
SERVER_PROTOCOL
'HTTP/1.1'
SERVER_SIGNATURE
('<address>Apache/2.4.25 (Debian) Server at db.bussdatabasen.no Port '
 '443</address>\n')
SERVER_SOFTWARE
'Apache/2.4.25 (Debian)'
SSL_TLS_SNI
'db.bussdatabasen.no'
apache.version
(2, 4, 25)
mod_wsgi.application_group
'db.bussdatabasen.no|'
mod_wsgi.callable_object
'application'
mod_wsgi.daemon_connects
'1'
mod_wsgi.daemon_restarts
'0'
mod_wsgi.daemon_start
'1548008363261539'
mod_wsgi.enable_sendfile
'0'
mod_wsgi.handler_script
''
mod_wsgi.ignore_activity
'0'
mod_wsgi.listener_host
''
mod_wsgi.listener_port
'443'
mod_wsgi.path_info
'/firma/chassisprodusent/Nash Motors'
mod_wsgi.process_group
'bussdatabasen'
mod_wsgi.queue_start
'1548008363261440'
mod_wsgi.request_handler
'wsgi-script'
mod_wsgi.request_id
'kv2ZyL+9+LY'
mod_wsgi.request_start
'1548008363261330'
mod_wsgi.script_name
''
mod_wsgi.script_reloading
'1'
mod_wsgi.script_start
'1548008363261637'
mod_wsgi.thread_id
1
mod_wsgi.thread_requests
416
mod_wsgi.total_requests
1280
mod_wsgi.version
(4, 5, 11)
wsgi.errors
<_io.TextIOWrapper encoding='utf-8'>
wsgi.file_wrapper
''
wsgi.input
<mod_wsgi.Input object at 0x925bd440>
wsgi.multiprocess
False
wsgi.multithread
True
wsgi.run_once
False
wsgi.url_scheme
'https'
wsgi.version
(1, 0)

Settings

Using settings module bussdatabasen.settings

Setting Value
ABSOLUTE_URL_OVERRIDES
{}
ACCOUNT_ACTIVATION_DAYS
7
ACCOUNT_EMAIL_REQUIRED
True
ACCOUNT_EMAIL_VERIFICATION
'mandatory'
ACCOUNT_LOGIN_ON_EMAIL_CONFIRMATION
True
ACCOUNT_LOGIN_ON_PASSWORD_RESET
'********************'
ACCOUNT_UNIQUE_EMAIL
True
ADMINS
[]
ALLOWED_HOSTS
['www.bussdatabasen.no', 'db.bussdatabasen.no', 'test.bussdatabasen.no']
APPEND_SLASH
True
AUTHENTICATION_BACKENDS
('django.contrib.auth.backends.ModelBackend',
 'allauth.account.auth_backends.AuthenticationBackend')
AUTH_PASSWORD_VALIDATORS
'********************'
AUTH_USER_MODEL
'auth.User'
BASE_DIR
'/home/bussdatabasen'
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
'bussdatabasen.no'
CSRF_COOKIE_HTTPONLY
False
CSRF_COOKIE_NAME
'bussdatabasen_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
['db.bussdatabasen.no', 'www.bussdatabasen.no']
CSRF_USE_SESSIONS
False
DATABASES
{'default': {'ATOMIC_REQUESTS': False,
             'AUTOCOMMIT': True,
             'CONN_MAX_AGE': 0,
             'ENGINE': 'django.db.backends.mysql',
             'HOST': 'db.busselektro.no',
             'NAME': 'bussdatabasen',
             'OPTIONS': {},
             'PASSWORD': '********************',
             'PORT': '',
             'TEST': {'CHARSET': None,
                      'COLLATION': None,
                      'MIRROR': None,
                      'NAME': None},
             'TIME_ZONE': None,
             'USER': 'bussdatabasen'}}
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_CONTENT_TYPE
'text/html'
DEFAULT_EXCEPTION_REPORTER_FILTER
'django.views.debug.SafeExceptionReporterFilter'
DEFAULT_FILE_STORAGE
'django.core.files.storage.FileSystemStorage'
DEFAULT_FROM_EMAIL
'anders@jordbarsletta.no'
DEFAULT_INDEX_TABLESPACE
''
DEFAULT_TABLESPACE
''
DISALLOWED_USER_AGENTS
[]
EMAIL_BACKEND
'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST
'smtp.domeneshop.no'
EMAIL_HOST_PASSWORD
'********************'
EMAIL_HOST_USER
'jordbarsletta1'
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
False
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
['bussdatabase.apps.BussdatabaseConfig',
 'django.contrib.admin',
 'django.contrib.auth',
 'django.contrib.sites',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'allauth',
 'allauth.account',
 'allauth.socialaccount',
 'allauth.socialaccount.providers.facebook',
 'allauth.socialaccount.providers.google',
 'allauth.socialaccount.providers.windowslive',
 'allauth.socialaccount.providers.github']
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'),
 ('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'),
 ('vi', 'Vietnamese'),
 ('zh-hans', 'Simplified Chinese'),
 ('zh-hant', 'Traditional Chinese')]
LANGUAGES_BIDI
['he', 'ar', 'fa', 'ur']
LANGUAGE_CODE
'nb-no'
LANGUAGE_COOKIE_AGE
None
LANGUAGE_COOKIE_DOMAIN
None
LANGUAGE_COOKIE_NAME
'django_language'
LANGUAGE_COOKIE_PATH
'/'
LOCALE_PATHS
['/home/bussdatabasen/locale']
LOGGING
{}
LOGGING_CONFIG
'logging.config.dictConfig'
LOGIN_REDIRECT_URL
'https://www.bussdatabasen.no/bevarte-busser/?page=%2Faccounts%2Fprofile'
LOGIN_URL
'/accounts/login/'
LOGOUT_REDIRECT_URL
None
MANAGERS
[]
MEDIA_ROOT
'/home/bussdatabasen'
MEDIA_URL
'/'
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_DAYS
'********************'
PREPEND_WWW
False
ROOT_URLCONF
'bussdatabasen.urls'
SECRET_KEY
'********************'
SECURE_BROWSER_XSS_FILTER
False
SECURE_CONTENT_TYPE_NOSNIFF
False
SECURE_HSTS_INCLUDE_SUBDOMAINS
False
SECURE_HSTS_PRELOAD
False
SECURE_HSTS_SECONDS
0
SECURE_PROXY_SSL_HEADER
None
SECURE_REDIRECT_EXEMPT
[]
SECURE_SSL_HOST
None
SECURE_SSL_REDIRECT
False
SERVER_EMAIL
'root@localhost'
SESSION_CACHE_ALIAS
'default'
SESSION_COOKIE_AGE
1209600
SESSION_COOKIE_DOMAIN
'bussdatabasen.no'
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
'bussdatabasen.settings'
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
[]
STATICFILES_FINDERS
['django.contrib.staticfiles.finders.FileSystemFinder',
 'django.contrib.staticfiles.finders.AppDirectoriesFinder']
STATICFILES_STORAGE
'django.contrib.staticfiles.storage.StaticFilesStorage'
STATIC_ROOT
'/home/bussdatabasen/static'
STATIC_URL
'/static/'
TEMPLATES
[{'APP_DIRS': True,
  'BACKEND': 'django.template.backends.django.DjangoTemplates',
  'DIRS': ['/home/bussdatabasen/templates'],
  '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/Oslo'
USE_I18N
True
USE_L10N
True
USE_THOUSAND_SEPARATOR
False
USE_TZ
False
USE_X_FORWARDED_HOST
False
USE_X_FORWARDED_PORT
False
WSGI_APPLICATION
'bussdatabasen.wsgi.application'
X_FRAME_OPTIONS
'SAMEORIGIN'
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.