46 is not in list
Request Method: | GET |
---|---|
Request URL: | http://lepolyptyque.com/g/n/46/?t=1&o=d_asc&s=n |
Django Version: | 3.1.6 |
Exception Type: | ValueError |
Exception Value: | 46 is not in list |
Exception Location: | /code/artworks/views.py, line 85, in notice |
Python Executable: | /usr/local/bin/python |
Python Version: | 3.9.1 |
Python Path: | ['/code', '/usr/local/lib/python39.zip', '/usr/local/lib/python3.9', '/usr/local/lib/python3.9/lib-dynload', '/usr/local/lib/python3.9/site-packages'] |
Server time: | Thu, 28 Mar 2024 22:05:22 +0100 |
/usr/local/lib/python3.9/site-packages/django/core/handlers/exception.py
, line 47, in inner
response = await sync_to_async(response_for_exception, thread_sensitive=False)(request, exc)
return response
return inner
else:
@wraps(get_response)
def inner(request):
try:
response = get_response(request)…
except Exception as exc:
response = response_for_exception(request, exc)
return response
return inner
Variable | Value |
---|---|
exc | ValueError('46 is not in list') |
get_response | <bound method BaseHandler._get_response of <django.core.handlers.wsgi.WSGIHandler object at 0x7f133c21bd30>> |
request | <WSGIRequest: GET '/g/n/46/?t=1&o=d_asc&s=n'> |
/usr/local/lib/python3.9/site-packages/django/core/handlers/base.py
, line 181, in _get_response
if response is None:
wrapped_callback = self.make_view_atomic(callback)
# If it is an asynchronous view, run it in a subthread.
if asyncio.iscoroutinefunction(wrapped_callback):
wrapped_callback = async_to_sync(wrapped_callback)
try:
response = wrapped_callback(request, *callback_args, **callback_kwargs)…
except Exception as e:
response = self.process_exception_by_middleware(e, request)
if response is None:
raise
# Complain if the view returned None (a common error).
Variable | Value |
---|---|
callback | <function notice at 0x7f1337560f70> |
callback_args | () |
callback_kwargs | {'apk': 46} |
middleware_method | <bound method CsrfViewMiddleware.process_view of <django.middleware.csrf.CsrfViewMiddleware object at 0x7f13373a71c0>> |
request | <WSGIRequest: GET '/g/n/46/?t=1&o=d_asc&s=n'> |
response | None |
self | <django.core.handlers.wsgi.WSGIHandler object at 0x7f133c21bd30> |
wrapped_callback | <function notice at 0x7f1337560f70> |
/code/artworks/views.py
, line 85, in notice
return HttpResponse(template.render(context, request))
def notice(request, apk=None):
artwork_list = sort_and_filter(Artwork, request)
pk_list = []
for i in artwork_list:
pk_list += [i.pk]
cur_artwork = pk_list.index(apk)…
next_artwork = pk_list[(cur_artwork+1)%len(pk_list)]
prev_artwork = pk_list[(cur_artwork-1)%len(pk_list)]
_obj = Artwork.objects.get(pk=apk)
images = Artwork.objects.get(pk=apk).images.all()
template = loader.get_template('artworks/notice.html')
Variable | Value |
---|---|
apk | 46 |
artwork_list | <MultilingualQuerySet [<Artwork: Calvaire - Ugolino di Nerio>, <Artwork: Saint Antoine Abbé et saint Paul Ermite - Maître du Retable de saint Antoine de Kempen>, <Artwork: Diane et ses suivantes au bain - Cornelis van Poelenburch>, <Artwork: Paysage fluvial avec château et tour en ruine - Jan van Goyen>, <Artwork: Le Repos pendant la fuite en Égypte - Francesco Solimena>, <Artwork: La Rochelle - Carriers près de l'entrée du port - Jean-Baptiste Camille Corot>, <Artwork: Fontainebleau, sommet de carrière boisée - Jean-Baptiste Camille Corot>, <Artwork: Rivière au Bois de Boulogne - Berthe Morisot>, <Artwork: Bord de Meuse à Wépion (?) - Henri Evenepoel>, <Artwork: Nature morte au pichet bleu - André Derain>, <Artwork: Le ruisseau, Maintenon - Henri Matisse>, <Artwork: Saint Jean-Baptiste - Georges Rouault>, <Artwork: L'Anxiété voluptueuse - Victor Brauner>]> |
i | <Artwork: L'Anxiété voluptueuse - Victor Brauner> |
pk_list | [3, 6, 20, 22, 26, 34, 35, 41, 45, 50, 59, 61, 71] |
request | <WSGIRequest: GET '/g/n/46/?t=1&o=d_asc&s=n'> |
AnonymousUser
Variable | Value |
---|---|
t | '1' |
o | 'd_asc' |
s | 'n' |
No POST data
No FILES data
No cookie data
Variable | Value |
---|---|
CONTENT_LENGTH | '' |
CONTENT_TYPE | 'text/plain' |
DJANGO_SETTINGS_MODULE | 'lepolyptyque.settings' |
GATEWAY_INTERFACE | 'CGI/1.1' |
GPG_KEY | '********************' |
HOME | '/root' |
HOSTNAME | '8c3b1701da22' |
HTTP_ACCEPT | '*/*' |
HTTP_CONNECTION | 'close' |
HTTP_HOST | 'lepolyptyque.com' |
HTTP_REFERER | 'https://lepolyptyque.com/g/n/46?t=1&o=d_asc&s=n' |
HTTP_USER_AGENT | 'claudebot' |
HTTP_X_FORWARDED_FOR | '54.87.17.177' |
HTTP_X_FORWARDED_PORT | '443' |
HTTP_X_FORWARDED_PROTO | 'https' |
HTTP_X_FORWARDED_SSL | 'on' |
HTTP_X_REAL_IP | '54.87.17.177' |
LANG | 'C.UTF-8' |
LETSENCRYPT_EMAIL | 'letsencrypt@geekadomicile.com' |
LETSENCRYPT_HOST | 'www.lepolyptyque.com,lepolyptyque.com,lepolyptyque.fr,www.lepolyptyque.fr' |
PATH | '/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' |
PATH_INFO | '/g/n/46/' |
PYTHONUNBUFFERED | '1' |
PYTHON_GET_PIP_SHA256 | '6a0b13826862f33c13b614a921d36253bfa1ae779c5fbf569876f3585057e9d2' |
PYTHON_GET_PIP_URL | 'https://github.com/pypa/get-pip/raw/5f38681f7f5872e4032860b54e9cc11cf0374932/get-pip.py' |
PYTHON_PIP_VERSION | '20.3.3' |
PYTHON_VERSION | '3.9.1' |
QUERY_STRING | 't=1&o=d_asc&s=n' |
REMOTE_ADDR | '192.168.0.26' |
REMOTE_HOST | '' |
REQUEST_METHOD | 'GET' |
RUN_MAIN | 'true' |
SCRIPT_NAME | '' |
SERVER_NAME | '8c3b1701da22' |
SERVER_PORT | '443' |
SERVER_PROTOCOL | 'HTTP/1.1' |
SERVER_SOFTWARE | 'WSGIServer/0.2' |
TZ | 'CET' |
VIRTUAL_HOST | 'www.lepolyptyque.com,lepolyptyque.com,lepolyptyque.fr,www.lepolyptyque.fr' |
VIRTUAL_PORT | '443' |
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 0x7f1336245e80> |
wsgi.multiprocess | False |
wsgi.multithread | True |
wsgi.run_once | False |
wsgi.url_scheme | 'http' |
wsgi.version | (1, 0) |
lepolyptyque.settings
Setting | Value |
---|---|
ABSOLUTE_URL_OVERRIDES | {} |
ADMINS | [] |
ALLOWED_HOSTS | ['www.lepolyptyque.com', 'lepolyptyque.com', 'www.lepolyptyque.fr', 'lepolyptyque.fr'] |
APPEND_SLASH | True |
AUTHENTICATION_BACKENDS | ['django.contrib.auth.backends.ModelBackend'] |
AUTH_PASSWORD_VALIDATORS | '********************' |
AUTH_USER_MODEL | 'auth.User' |
BASE_DIR | PosixPath('/code') |
CACHES | {'default': {'BACKEND': 'django.core.cache.backends.locmem.LocMemCache'}} |
CACHE_MIDDLEWARE_ALIAS | 'default' |
CACHE_MIDDLEWARE_KEY_PREFIX | '********************' |
CACHE_MIDDLEWARE_SECONDS | 600 |
CKEDITOR_CONFIGS | {'default': {'toolbar': 'Custom', 'toolbar_Custom': [['Bold', 'Italic', 'RemoveFormat'], ['NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'], ['Link', 'Unlink'], ['Source'], ['-'], ['About']]}} |
CRISPY_TEMPLATE_PACK | 'bootstrap4' |
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': 'comlepolyptyquewww_wwwlepolyptyquecom_db_1', 'NAME': 'postgres', 'OPTIONS': {}, 'PASSWORD': '********************', 'PORT': 5432, 'TEST': {'CHARSET': None, 'COLLATION': None, 'MIGRATE': True, 'MIRROR': None, 'NAME': None}, 'TIME_ZONE': None, 'USER': 'postgres'}} |
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 | True |
DEBUG_PROPAGATE_EXCEPTIONS | False |
DECIMAL_SEPARATOR | '.' |
DEEPZOOM_PARAMS | {'image_quality': 0.85, 'resize_filter': 'antialias', 'tile_format': 'jpg', 'tile_overlap': 1, 'tile_size': 256} |
DEEPZOOM_ROOT | 'deepzoom_root' |
DEFAULT_CHARSET | 'utf-8' |
DEFAULT_CREATE_DEEPZOOM_OPTION | True |
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 | 'lepolyptyque.com@lepolyptyque.com' |
DEFAULT_HASHING_ALGORITHM | 'sha256' |
DEFAULT_INDEX_TABLESPACE | '' |
DEFAULT_TABLESPACE | '' |
DEFAULT_TO_EMAIL | 'contact@lepolyptyque.com' |
DISALLOWED_USER_AGENTS | [] |
EMAIL_BACKEND | 'django.core.mail.backends.smtp.EmailBackend' |
EMAIL_HOST | 'mail.geekadomicile.com' |
EMAIL_HOST_PASSWORD | '********************' |
EMAIL_HOST_USER | 'lepolyptyque.com@lepolyptyque.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 | False |
EMAIL_USE_TLS | True |
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 | ['modeltranslation', 'translation_manager', 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'django_filters', 'ckeditor', 'crispy_forms', 'django_extensions', 'deepzoom.apps.DeepZoomAppConfig', 'footer.apps.FooterConfig', 'homepage.apps.HomepageConfig', 'images.apps.ImagesConfig', 'events.apps.EventsConfig', 'blog.apps.BlogConfig', 'contact.apps.ContactConfig', 'artworks.apps.ArtworksConfig', 'fr_en', 'sortedm2m_filter_horizontal_widget'] |
INTERNAL_IPS | [] |
LANGUAGES | (('fr', 'Français'), ('en', 'Anglais')) |
LANGUAGES_BIDI | ['he', 'ar', 'ar-dz', 'fa', 'ur'] |
LANGUAGE_CODE | 'fr' |
LANGUAGE_COOKIE_AGE | '3600' |
LANGUAGE_COOKIE_DOMAIN | '' |
LANGUAGE_COOKIE_HTTPONLY | False |
LANGUAGE_COOKIE_NAME | 'locale' |
LANGUAGE_COOKIE_PATH | '/' |
LANGUAGE_COOKIE_SAMESITE | None |
LANGUAGE_COOKIE_SECURE | False |
LOCALE_PATHS | ('/code/locale', '/code/artworks/locale', '/code/lepolyptyque/locale') |
LOGGING | {} |
LOGGING_CONFIG | 'logging.config.dictConfig' |
LOGIN_REDIRECT_URL | '/accounts/profile/' |
LOGIN_URL | '/accounts/login/' |
LOGOUT_REDIRECT_URL | None |
MANAGERS | [] |
MEDIA_ROOT | '/code/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.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', 'django.middleware.locale.LocaleMiddleware', 'django.middleware.common.CommonMiddleware'] |
MIGRATION_MODULES | {} |
MONTH_DAY_FORMAT | 'F j' |
NUMBER_GROUPING | 0 |
PASSWORD_HASHERS | '********************' |
PASSWORD_RESET_TIMEOUT | '********************' |
PASSWORD_RESET_TIMEOUT_DAYS | '********************' |
PREPEND_WWW | False |
REST_FRAMEWORK | {'DEFAULT_FILTER_BACKENDS': ['django_filters.rest_framework.DjangoFilterBackend']} |
ROOT_URLCONF | 'lepolyptyque.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 | '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 | 'lepolyptyque.settings' |
SHORT_DATETIME_FORMAT | 'm/d/Y P' |
SHORT_DATE_FORMAT | 'm/d/Y' |
SIGNING_BACKEND | 'django.core.signing.TimestampSigner' |
SILENCED_SYSTEM_CHECKS | [] |
SITE_ROOT | '/code/lepolyptyque' |
STATICFILES_DIRS | ('/code/lepolyptyque/static',) |
STATICFILES_FINDERS | ['django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder'] |
STATICFILES_STORAGE | 'django.contrib.staticfiles.storage.StaticFilesStorage' |
STATIC_ROOT | '/var/www/public/static_root' |
STATIC_URL | '/static/' |
TEMPLATES | [{'APP_DIRS': True, 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': ['/code/lepolyptyque/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', 'fr_en.context_processors.get_posts']}}] |
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 | 'CET' |
TRANSLATIONS_BASE_DIR | PosixPath('/code') |
TRANSLATIONS_HINT_LANGUAGE | PosixPath('/code') |
UPLOADEDIMAGE_ROOT | 'deepzoom_image_root' |
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 | 'lepolyptyque.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.