AttributeError at /id/baloti/contest/detail/ab81bc0b-d8fc-4035-80ae-e820ed8eb6be

'NoneType' object has no attribute 'parent_contest_id'
Request Method: GET
Request URL: http://baloti.org/id/baloti/contest/detail/ab81bc0b-d8fc-4035-80ae-e820ed8eb6be
Django Version: 3.2.7
Exception Type: AttributeError
Exception Value:
'NoneType' object has no attribute 'parent_contest_id'
Exception Location: /home/baloti/baloti/baloti_djelectionguard/views.py, line 246, in get
Python Executable: /home/baloti/baloti/venv/bin/python
Python Version: 3.9.5
Python Path:
['/home/baloti/baloti',
 '/usr/lib/python39.zip',
 '/usr/lib/python3.9',
 '/usr/lib/python3.9/lib-dynload',
 '/home/baloti/baloti/venv/lib/python3.9/site-packages']
Server time: Tue, 19 Mar 2024 07:01:54 +0000

Traceback Switch to copy-and-paste view



Request information

USER

AnonymousUser

GET

No GET data

POST

No POST data

FILES

No FILES data

No cookie data

META

Variable Value
HTTP_ACCEPT
'*/*'
HTTP_CONNECTION
'close'
HTTP_HOST
'baloti'
HTTP_USER_AGENT
'claudebot'
HTTP_X_FORWARDED_FOR
'54.205.179.155'
HTTP_X_FORWARDED_HOST
'baloti.org'
HTTP_X_FORWARDED_PROTO
'https'
HTTP_X_FORWARDED_SSL
'on'
HTTP_X_REAL_IP
'54.205.179.155'
PATH_INFO
'/id/baloti/contest/detail/ab81bc0b-d8fc-4035-80ae-e820ed8eb6be'
QUERY_STRING
''
REMOTE_ADDR
'127.0.0.1'
REMOTE_HOST
'127.0.0.1'
REMOTE_PORT
33566
REQUEST_METHOD
'GET'
SCRIPT_NAME
''
SERVER_NAME
'127.0.0.1'
SERVER_PORT
'8000'
wsgi.multiprocess
True
wsgi.multithread
True

Settings

Using settings module electis.settings

Setting Value
ABSOLUTE_URL_OVERRIDES
{}
ACCOUNT_ACTIVATION_DAYS
7
ADMINS
[]
ADMINS_EMAIL
[]
ALLOWED_HOSTS
['*']
APPEND_SLASH
True
ASGI_APPLICATION
'electeez_common.asgi.application'
AUTHENTICATION_BACKENDS
['social_core.backends.google.GoogleOAuth2',
 'social_core.backends.facebook.FacebookOAuth2',
 'django.contrib.auth.backends.ModelBackend']
AUTH_PASSWORD_VALIDATORS
'********************'
AUTH_USER_MODEL
'electeez_auth.User'
BASE_DIR
PosixPath('/home/baloti/baloti')
BASE_URL
'https://baloti.org:8000'
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_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.postgresql',
             'HOST': None,
             'NAME': 'electeez_live',
             'OPTIONS': {},
             'PASSWORD': '********************',
             'PORT': None,
             'TEST': {'CHARSET': None,
                      'COLLATION': None,
                      'MIGRATE': True,
                      'MIRROR': None,
                      'NAME': None},
             'TIME_ZONE': None,
             'USER': None}}
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',
 '%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
'baloti.org'
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
'pitsbalotitest@gmail.com'
DEFAULT_HASHING_ALGORITHM
'sha256'
DEFAULT_INDEX_TABLESPACE
''
DEFAULT_TABLESPACE
''
DISALLOWED_USER_AGENTS
[]
DJBLOCKCHAIN
{'TEZOS_CONTRACTS': 'djelectionguard_tezos/tezos'}
EMAIL_BACKEND
'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST
'smtp.gmail.com'
EMAIL_HOST_PASSWORD
'********************'
EMAIL_HOST_USER
'pitsbalotitest@gmail.com'
EMAIL_PORT
'587'
EMAIL_SSL_CERTFILE
None
EMAIL_SSL_KEYFILE
'********************'
EMAIL_SUBJECT_PREFIX
'[Django] '
EMAIL_TIMEOUT
None
EMAIL_USE_LOCALTIME
False
EMAIL_USE_SSL
None
EMAIL_USE_TLS
'True'
ENVIRONMENT
'baloti.org'
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.TemplatesSetting'
HOST
'baloti.org:8000'
IGNORABLE_404_URLS
[]
INSTALLED_APPS
['sass_processor',
 'electeez_common',
 'electeez_auth',
 'django.contrib.admin',
 'django.contrib.sites',
 'electeez_sites',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'djtezos',
 'djcall',
 'djlang',
 'djelectionguard',
 'djelectionguard_tezos',
 'djelectionguard_tracker',
 'django_registration',
 'django_extensions',
 'django_jinja',
 'channels',
 'django.forms',
 'ryzom',
 'py2js',
 'ryzom_django',
 'ryzom_django_mdc',
 'social_django',
 'ckeditor',
 'baloti_auth',
 'baloti_djelectionguard',
 'electis']
INTERNAL_IPS
[]
IPFS_ENABLED
True
IPFS_URL
'localhost:5001'
LANGUAGES
(('en', 'Inggris'),
 ('de', 'Jerman'),
 ('fr', 'Perancis'),
 ('es', 'Spanyol'),
 ('zh', 'Chinese'),
 ('uk', 'Ukrainia'),
 ('ja', 'Jepang'),
 ('ru', 'Rusia'),
 ('id', 'Indonesia'),
 ('pl', 'Polandia'))
LANGUAGES_BIDI
['he', 'ar', 'ar-dz', '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
('/home/baloti/baloti/locale',)
LOGGERS
('django.request', 'djcall', 'daphne', 'electionguard')
LOGGING
{'disable_existing_loggers': False,
 'formatters': {'timestamp': {'format': '%(asctime)s %(message)s'}},
 'handlers': {'console': {'class': 'logging.StreamHandler', 'level': 'DEBUG'},
              'daphne.debug': {'class': 'logging.handlers.WatchedFileHandler',
                               'filename': '/home/baloti/baloti/log/daphne.debug.log',
                               'formatter': 'timestamp',
                               'level': 'DEBUG'},
              'daphne.error': {'class': 'logging.handlers.WatchedFileHandler',
                               'filename': '/home/baloti/baloti/log/daphne.error.log',
                               'formatter': 'timestamp',
                               'level': 'ERROR'},
              'daphne.info': {'class': 'logging.handlers.WatchedFileHandler',
                              'filename': '/home/baloti/baloti/log/daphne.info.log',
                              'formatter': 'timestamp',
                              'level': 'INFO'},
              'django.request.debug': {'class': 'logging.handlers.WatchedFileHandler',
                                       'filename': '/home/baloti/baloti/log/django.request.debug.log',
                                       'formatter': 'timestamp',
                                       'level': 'DEBUG'},
              'django.request.error': {'class': 'logging.handlers.WatchedFileHandler',
                                       'filename': '/home/baloti/baloti/log/django.request.error.log',
                                       'formatter': 'timestamp',
                                       'level': 'ERROR'},
              'django.request.info': {'class': 'logging.handlers.WatchedFileHandler',
                                      'filename': '/home/baloti/baloti/log/django.request.info.log',
                                      'formatter': 'timestamp',
                                      'level': 'INFO'},
              'djcall.debug': {'class': 'logging.handlers.WatchedFileHandler',
                               'filename': '/home/baloti/baloti/log/djcall.debug.log',
                               'formatter': 'timestamp',
                               'level': 'DEBUG'},
              'djcall.error': {'class': 'logging.handlers.WatchedFileHandler',
                               'filename': '/home/baloti/baloti/log/djcall.error.log',
                               'formatter': 'timestamp',
                               'level': 'ERROR'},
              'djcall.info': {'class': 'logging.handlers.WatchedFileHandler',
                              'filename': '/home/baloti/baloti/log/djcall.info.log',
                              'formatter': 'timestamp',
                              'level': 'INFO'},
              'electionguard.debug': {'class': 'logging.handlers.WatchedFileHandler',
                                      'filename': '/home/baloti/baloti/log/electionguard.debug.log',
                                      'formatter': 'timestamp',
                                      'level': 'DEBUG'},
              'electionguard.error': {'class': 'logging.handlers.WatchedFileHandler',
                                      'filename': '/home/baloti/baloti/log/electionguard.error.log',
                                      'formatter': 'timestamp',
                                      'level': 'ERROR'},
              'electionguard.info': {'class': 'logging.handlers.WatchedFileHandler',
                                     'filename': '/home/baloti/baloti/log/electionguard.info.log',
                                     'formatter': 'timestamp',
                                     'level': 'INFO'}},
 'loggers': {'daphne': {'handlers': ['console',
                                     'daphne.debug',
                                     'daphne.info',
                                     'daphne.error'],
                        'level': 'DEBUG'},
             'django.request': {'handlers': ['console',
                                             'django.request.debug',
                                             'django.request.info',
                                             'django.request.error'],
                                'level': 'DEBUG'},
             'djcall': {'handlers': ['console',
                                     'djcall.debug',
                                     'djcall.info',
                                     'djcall.error'],
                        'level': 'DEBUG'},
             'electionguard': {'handlers': ['console',
                                            'electionguard.debug',
                                            'electionguard.info',
                                            'electionguard.error'],
                               'level': 'DEBUG'}},
 'version': 1}
LOGGING_CONFIG
'logging.config.dictConfig'
LOGIN_REDIRECT_URL
'/electis'
LOGIN_URL
'/accounts/login/'
LOGOUT_REDIRECT_URL
None
LOG_DIR
'/home/baloti/baloti/log'
MANAGERS
[]
MEDIA_ROOT
PosixPath('/home/baloti/baloti/media')
MEDIA_URL
'/media/'
MEMCACHED_HOST
'127.0.0.1:11211'
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',
 'django.middleware.locale.LocaleMiddleware']
MIGRATION_MODULES
{}
MONTH_DAY_FORMAT
'F j'
NUMBER_GROUPING
0
PASSWORD_HASHERS
'********************'
PASSWORD_RESET_TIMEOUT
'********************'
PASSWORD_RESET_TIMEOUT_DAYS
'********************'
PREPEND_WWW
False
PROTO
'https'
REGISTRATION_OPEN
True
ROOT_URLCONF
'electeez_common.urls'
RYZOM_TEMPLATE_BACKEND
{'BACKEND': 'ryzom_django.template_backend.Ryzom',
 'OPTIONS': {'app_dirname': 'components',
             'components_module': 'ryzom.components.muicss',
             'components_prefix': 'Mui',
             'context_processors': ['django.template.context_processors.debug',
                                    'django.template.context_processors.request',
                                    'django.contrib.auth.context_processors.auth',
                                    'django.contrib.messages.context_processors.messages',
                                    'django.template.context_processors.i18n']}}
SASS_PROCESSOR_ROOT
PosixPath('/home/baloti/baloti/public/baloti_djelectionguard')
SECRET_KEY
'********************'
SECURE
False
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
'same-origin'
SECURE_SSL_HOST
None
SECURE_SSL_REDIRECT
False
SENTRY_DSN
None
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
'electis.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
SITE_NAME
'baloti_djelectionguard'
SOCIAL_AUTH_FACEBOOK_AUTH_EXTRA_ARGUMENTS
{}
SOCIAL_AUTH_FACEBOOK_KEY
'********************'
SOCIAL_AUTH_FACEBOOK_PROFILE_EXTRA_PARAMS
{'fields': 'id, name, email, age_range'}
SOCIAL_AUTH_FACEBOOK_SCOPE
['email']
SOCIAL_AUTH_FACEBOOK_SECRET
'********************'
SOCIAL_AUTH_GOOGLE_OAUTH2_AUTH_EXTRA_ARGUMENTS
{}
SOCIAL_AUTH_GOOGLE_OAUTH2_KEY
'********************'
SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET
'********************'
SOCIAL_AUTH_PIPELINE
('social_core.pipeline.social_auth.social_details',
 'social_core.pipeline.social_auth.social_uid',
 'social_core.pipeline.social_auth.auth_allowed',
 'social_core.pipeline.social_auth.social_user',
 'baloti_auth.pipeline.user.get_username',
 'social_core.pipeline.social_auth.associate_by_email',
 'social_core.pipeline.user.create_user',
 'social_core.pipeline.social_auth.associate_user',
 'social_core.pipeline.social_auth.load_extra_data',
 'social_core.pipeline.user.user_details')
SOCIAL_AUTH_REDIRECT_IS_HTTPS
'True'
SOCIAL_AUTH_USERNAME_IS_FULL_EMAIL
True
SOCIAL_AUTH_USER_FIELDS
['email']
SOCIAL_AUTH_USER_MODEL
'electeez_auth.User'
STATICFILES_DIRS
[PosixPath('/home/baloti/baloti/electis/static'),
 PosixPath('/home/baloti/baloti/static'),
 PosixPath('/home/baloti/baloti/baloti_djelectionguard/static')]
STATICFILES_FINDERS
['django.contrib.staticfiles.finders.FileSystemFinder',
 'django.contrib.staticfiles.finders.AppDirectoriesFinder',
 'sass_processor.finders.CssFinder',
 'electeez_common.finders.StaticRootFinder']
STATICFILES_STORAGE
'django.contrib.staticfiles.storage.StaticFilesStorage'
STATIC_HOME_PAGE
'landing/index.html'
STATIC_ROOT
PosixPath('/home/baloti/baloti/public/baloti_djelectionguard')
STATIC_URL
'/static/baloti_djelectionguard/'
TEMPLATES
[{'BACKEND': 'ryzom_django.template_backend.Ryzom',
  'OPTIONS': {'app_dirname': 'components',
              'components_module': 'ryzom.components.muicss',
              'components_prefix': 'Mui',
              'context_processors': ['django.template.context_processors.debug',
                                     'django.template.context_processors.request',
                                     'django.contrib.auth.context_processors.auth',
                                     'django.contrib.messages.context_processors.messages',
                                     'django.template.context_processors.i18n']}},
 {'BACKEND': 'django.template.backends.jinja2.Jinja2',
  'DIRS': [PosixPath('/home/baloti/baloti/templates')],
  'OPTIONS': {'context_processors': ['django.template.context_processors.debug',
                                     'django.template.context_processors.request',
                                     'django.template.context_processors.i18n',
                                     'django.contrib.auth.context_processors.auth',
                                     'django.contrib.messages.context_processors.messages'],
              'environment': 'electeez_common.settings.jinja2'}},
 {'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']}}]
TEMPLATE_CONTEXT_PROCESSORS
['django.core.context_processors.request']
TEMPLATE_LOADERS
('django.template.loaders.app_directories.load_template_source',)
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_I18N
True
USE_L10N
True
USE_THOUSAND_SEPARATOR
False
USE_TZ
True
USE_X_FORWARDED_HOST
True
USE_X_FORWARDED_PORT
False
WSGI_APPLICATION
'electeez_common.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.