list index out of range
Request Method: | GET |
---|---|
Request URL: | http://motobul.com/brand/bp/category/masla-za-dvigateli-na-leki-avtomobili/series/bp-visco-7000-5w-30 |
Django Version: | 1.9.7 |
Exception Type: | IndexError |
Exception Value: | list index out of range |
Exception Location: | /srv/www/motobul/motoenv/local/lib/python2.7/site-packages/django/db/models/query.py in __getitem__, line 297 |
Python Executable: | /srv/www/motobul/motoenv/bin/python |
Python Version: | 2.7.9 |
Python Path: | ['/srv/www/motobul', '/srv/www/motobul/motoenv/bin', '/srv/www/motobul/motoenv/lib/python2.7', '/srv/www/motobul/motoenv/lib/python2.7/plat-x86_64-linux-gnu', '/srv/www/motobul/motoenv/lib/python2.7/lib-tk', '/srv/www/motobul/motoenv/lib/python2.7/lib-old', '/srv/www/motobul/motoenv/lib/python2.7/lib-dynload', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-x86_64-linux-gnu', '/usr/lib/python2.7/lib-tk', '/srv/www/motobul/motoenv/local/lib/python2.7/site-packages', '/srv/www/motobul/motoenv/local/lib/python2.7/site-packages/django_tinymce-2.3.0-py2.7.egg', '/srv/www/motobul/motoenv/lib/python2.7/site-packages', '/srv/www/motobul/motoenv/lib/python2.7/site-packages/django_tinymce-2.3.0-py2.7.egg'] |
Server time: | Пет, 29 Мар 2024 05:33:41 +0000 |
/srv/www/motobul/motoenv/local/lib/python2.7/site-packages/django/core/handlers/base.py
in get_response
break
if response is None:
wrapped_callback = self.make_view_atomic(callback)
try:
response = wrapped_callback(request, *callback_args, **callback_kwargs)
except Exception as e:
response = self.process_exception_by_middleware(e, request)...
# Complain if the view returned None (a common error).
if response is None:
if isinstance(callback, types.FunctionType): # FBV
view_name = callback.__name__
else: # CBV
Variable | Value |
---|---|
e | IndexError('list index out of range',) |
callback_args | (u'bp', u'masla-za-dvigateli-na-leki-avtomobili', u'bp-visco-7000-5w-30') |
resolver_match | ResolverMatch(func=products.views.product_page_no_sub, args=(u'bp', u'masla-za-dvigateli-na-leki-avtomobili', u'bp-visco-7000-5w-30'), kwargs={}, url_name=product_page_no_sub, app_names=[], namespaces=[]) |
response_is_rendered | False |
middleware_method | <bound method CsrfViewMiddleware.process_view of <django.middleware.csrf.CsrfViewMiddleware object at 0x7fa3fa733890>> |
self | <django.core.handlers.wsgi.WSGIHandler object at 0x7fa3fdb21310> |
request | <WSGIRequest: GET '/brand/bp/category/masla-za-dvigateli-na-leki-avtomobili/series/bp-visco-7000-5w-30'> |
callback | <function product_page_no_sub at 0x7fa3fa67ede8> |
wrapped_callback | <function product_page_no_sub at 0x7fa3fa67ede8> |
resolver | <RegexURLResolver 'motobul.urls' (None:None) ^/> |
callback_kwargs | {} |
response | None |
urlconf | 'motobul.urls' |
/srv/www/motobul/motoenv/local/lib/python2.7/site-packages/django/core/handlers/base.py
in get_response
response = middleware_method(request, callback, callback_args, callback_kwargs)
if response:
break
if response is None:
wrapped_callback = self.make_view_atomic(callback)
try:
response = wrapped_callback(request, *callback_args, **callback_kwargs)...
except Exception as e:
response = self.process_exception_by_middleware(e, request)
# Complain if the view returned None (a common error).
if response is None:
if isinstance(callback, types.FunctionType): # FBV
Variable | Value |
---|---|
e | IndexError('list index out of range',) |
callback_args | (u'bp', u'masla-za-dvigateli-na-leki-avtomobili', u'bp-visco-7000-5w-30') |
resolver_match | ResolverMatch(func=products.views.product_page_no_sub, args=(u'bp', u'masla-za-dvigateli-na-leki-avtomobili', u'bp-visco-7000-5w-30'), kwargs={}, url_name=product_page_no_sub, app_names=[], namespaces=[]) |
response_is_rendered | False |
middleware_method | <bound method CsrfViewMiddleware.process_view of <django.middleware.csrf.CsrfViewMiddleware object at 0x7fa3fa733890>> |
self | <django.core.handlers.wsgi.WSGIHandler object at 0x7fa3fdb21310> |
request | <WSGIRequest: GET '/brand/bp/category/masla-za-dvigateli-na-leki-avtomobili/series/bp-visco-7000-5w-30'> |
callback | <function product_page_no_sub at 0x7fa3fa67ede8> |
wrapped_callback | <function product_page_no_sub at 0x7fa3fa67ede8> |
resolver | <RegexURLResolver 'motobul.urls' (None:None) ^/> |
callback_kwargs | {} |
response | None |
urlconf | 'motobul.urls' |
/srv/www/motobul/products/views.py
in product_page_no_sub
}
return render_to_response(template_name, context, RequestContext(request))
def product_page_no_sub(request, slug, slug2, slug3, lang="bg", template_name="products/product_page.html"):
if lang == 'eng':
template_name="products/product_page_en.html"
brand = ProductBrand.objects.filter(slug=slug)[0]...
product = Product.objects.filter(brand = brand.pk).filter(slug=slug3)[0]
context = {
'brand' : brand,
'category' : ProductCategory.objects.filter(slug=slug2)[0],
'product': product,
Variable | Value |
---|---|
lang | 'bg' |
template_name | 'products/product_page.html' |
request | <WSGIRequest: GET '/brand/bp/category/masla-za-dvigateli-na-leki-avtomobili/series/bp-visco-7000-5w-30'> |
slug3 | u'bp-visco-7000-5w-30' |
slug2 | u'masla-za-dvigateli-na-leki-avtomobili' |
slug | u'bp' |
/srv/www/motobul/motoenv/local/lib/python2.7/site-packages/django/db/models/query.py
in __getitem__
else:
stop = None
qs.query.set_limits(start, stop)
return list(qs)[::k.step] if k.step else qs
qs = self._clone()
qs.query.set_limits(k, k + 1)
return list(qs)[0]...
def __and__(self, other):
self._merge_sanity_check(other)
if isinstance(other, EmptyQuerySet):
return other
if isinstance(self, EmptyQuerySet):
Variable | Value |
---|---|
qs | [] |
k | 0 |
self | [] |
No GET data
No POST data
No FILES data
No cookie data
Variable | Value |
---|---|
SERVER_SOFTWARE | 'gunicorn/19.6.0' |
SCRIPT_NAME | u'' |
REQUEST_METHOD | 'GET' |
PATH_INFO | u'/brand/bp/category/masla-za-dvigateli-na-leki-avtomobili/series/bp-visco-7000-5w-30' |
SERVER_PROTOCOL | 'HTTP/1.0' |
QUERY_STRING | '' |
HTTP_X_REAL_IP | '3.239.13.1' |
HTTP_USER_AGENT | 'claudebot' |
HTTP_CONNECTION | 'close' |
SERVER_NAME | 'motobul.com' |
REMOTE_ADDR | '' |
wsgi.url_scheme | 'http' |
SERVER_PORT | '80' |
HTTP_X_FORWARDED_PROTO | 'http' |
wsgi.input | <gunicorn.http.body.Body object at 0x7fa3f9ce5490> |
HTTP_HOST | 'motobul.com' |
wsgi.multithread | False |
HTTP_ACCEPT | '*/*' |
wsgi.version | (1, 0) |
RAW_URI | '/brand/bp/category/masla-za-dvigateli-na-leki-avtomobili/series/bp-visco-7000-5w-30' |
wsgi.run_once | False |
wsgi.errors | <gunicorn.http.wsgi.WSGIErrorsWrapper object at 0x7fa3f9ce5b90> |
wsgi.multiprocess | True |
gunicorn.socket | <socket._socketobject object at 0x7fa3f9b20fa0> |
HTTP_X_FORWARDED_FOR | '3.239.13.1' |
wsgi.file_wrapper | '' |
motobul.settings
Setting | Value |
---|---|
SECURE_BROWSER_XSS_FILTER | False |
USE_X_FORWARDED_PORT | False |
USE_THOUSAND_SEPARATOR | False |
CSRF_COOKIE_SECURE | False |
LANGUAGE_CODE | 'bg' |
ROOT_URLCONF | 'motobul.urls' |
MANAGERS | [] |
BASE_DIR | '/srv/www/motobul' |
SILENCED_SYSTEM_CHECKS | [] |
DEFAULT_CHARSET | 'utf-8' |
SESSION_SERIALIZER | 'django.contrib.sessions.serializers.JSONSerializer' |
STATIC_ROOT | '/srv/www/motobul/motobul/../static' |
ALLOWED_HOSTS | ['localhost', 'motobul.com', '212.36.13.249'] |
MESSAGE_STORAGE | 'django.contrib.messages.storage.fallback.FallbackStorage' |
EMAIL_SUBJECT_PREFIX | '[Django] ' |
SERVER_EMAIL | 'root@localhost' |
SECURE_HSTS_SECONDS | 0 |
STATICFILES_FINDERS | ['django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder'] |
SESSION_CACHE_ALIAS | 'default' |
SESSION_COOKIE_DOMAIN | None |
SESSION_COOKIE_NAME | 'sessionid' |
TIME_INPUT_FORMATS | ['%H:%M:%S', '%H:%M:%S.%f', '%H:%M'] |
SECURE_REDIRECT_EXEMPT | [] |
DATABASES | {'default': {'ATOMIC_REQUESTS': False, 'AUTOCOMMIT': True, 'CONN_MAX_AGE': 0, 'ENGINE': 'django.db.backends.postgresql', 'HOST': 'localhost', 'NAME': 'motobul', 'OPTIONS': {}, 'PASSWORD': u'********************', 'PORT': '', 'TEST': {'CHARSET': None, 'COLLATION': None, 'MIRROR': None, 'NAME': None}, 'TIME_ZONE': None, 'USER': 'postgres'}} |
EMAIL_SSL_KEYFILE | u'********************' |
FILE_UPLOAD_DIRECTORY_PERMISSIONS | None |
FILE_UPLOAD_PERMISSIONS | None |
FILE_UPLOAD_HANDLERS | ['django.core.files.uploadhandler.MemoryFileUploadHandler', 'django.core.files.uploadhandler.TemporaryFileUploadHandler'] |
DEFAULT_CONTENT_TYPE | 'text/html' |
APPEND_SLASH | True |
LOCALE_PATHS | [] |
DATABASE_ROUTERS | [] |
DEFAULT_TABLESPACE | '' |
YEAR_MONTH_FORMAT | 'F Y' |
STATICFILES_STORAGE | 'django.contrib.staticfiles.storage.StaticFilesStorage' |
CACHES | {'default': {'BACKEND': 'django.core.cache.backends.locmem.LocMemCache'}} |
SESSION_COOKIE_PATH | '/' |
EMAIL_HOST_PASSWORD | u'********************' |
SECURE_CONTENT_TYPE_NOSNIFF | False |
MIDDLEWARE_CLASSES | ['django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.auth.middleware.SessionAuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware'] |
USE_I18N | True |
THOUSAND_SEPARATOR | ',' |
SECRET_KEY | u'********************' |
LANGUAGE_COOKIE_NAME | 'django_language' |
DEFAULT_INDEX_TABLESPACE | '' |
LOGGING_CONFIG | 'logging.config.dictConfig' |
TEMPLATE_LOADERS | ['django.template.loaders.filesystem.Loader', 'django.template.loaders.app_directories.Loader'] |
FIRST_DAY_OF_WEEK | 0 |
WSGI_APPLICATION | 'motobul.wsgi.application' |
TEMPLATE_DEBUG | False |
X_FRAME_OPTIONS | 'SAMEORIGIN' |
CSRF_COOKIE_NAME | 'csrftoken' |
FORCE_SCRIPT_NAME | None |
USE_X_FORWARDED_HOST | False |
CSRF_HEADER_NAME | 'HTTP_X_CSRFTOKEN' |
EMAIL_TIMEOUT | None |
SECURE_SSL_HOST | None |
SIGNING_BACKEND | 'django.core.signing.TimestampSigner' |
SESSION_COOKIE_SECURE | False |
ADMIN_LANGUAGE_CODE | 'bg' |
CSRF_COOKIE_DOMAIN | None |
FILE_CHARSET | 'utf-8' |
DEBUG | True |
CSRF_TRUSTED_ORIGINS | [] |
LANGUAGE_COOKIE_DOMAIN | None |
DEFAULT_FILE_STORAGE | 'django.core.files.storage.FileSystemStorage' |
INSTALLED_APPS | ['django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'django_extensions', 'tinymce', 'easy_select2', 'motobul', 'home', 'products', 'dictionary', 'pages', 'orders', 'contacts'] |
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'), ('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'), ('hu', 'Hungarian'), ('ia', 'Interlingua'), ('id', 'Indonesian'), ('io', 'Ido'), ('is', 'Icelandic'), ('it', 'Italian'), ('ja', 'Japanese'), ('ka', 'Georgian'), ('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 Bokmal'), ('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')] |
USE_L10N | True |
SECURE_HSTS_INCLUDE_SUBDOMAINS | False |
STATICFILES_DIRS | [] |
PREPEND_WWW | False |
SECURE_PROXY_SSL_HEADER | None |
LANGUAGE_COOKIE_AGE | None |
SESSION_COOKIE_HTTPONLY | True |
DEBUG_PROPAGATE_EXCEPTIONS | False |
CSRF_COOKIE_AGE | 31449600 |
MONTH_DAY_FORMAT | 'F j' |
LOGIN_URL | '/accounts/login/' |
SESSION_EXPIRE_AT_BROWSER_CLOSE | False |
TIME_FORMAT | 'P' |
AUTH_USER_MODEL | 'auth.User' |
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'] |
AUTHENTICATION_BACKENDS | ['django.contrib.auth.backends.ModelBackend'] |
AUTH_PASSWORD_VALIDATORS | u'********************' |
PASSWORD_RESET_TIMEOUT_DAYS | u'********************' |
SESSION_FILE_PATH | None |
CACHE_MIDDLEWARE_ALIAS | 'default' |
SESSION_SAVE_EVERY_REQUEST | False |
NUMBER_GROUPING | 0 |
SESSION_ENGINE | 'django.contrib.sessions.backends.db' |
CSRF_FAILURE_VIEW | 'django.views.csrf.csrf_failure' |
CSRF_COOKIE_PATH | '/' |
LOGIN_REDIRECT_URL | '/accounts/profile/' |
DECIMAL_SEPARATOR | '.' |
IGNORABLE_404_URLS | [] |
MIGRATION_MODULES | {} |
TEMPLATE_STRING_IF_INVALID | '' |
LOGOUT_URL | '/accounts/logout/' |
EMAIL_USE_TLS | True |
FIXTURE_DIRS | [] |
EMAIL_HOST | 'mail.profonika.com' |
DATE_FORMAT | 'N j, Y' |
MEDIA_ROOT | '/srv/www/motobul/motobul/../media' |
DEFAULT_EXCEPTION_REPORTER_FILTER | 'django.views.debug.SafeExceptionReporterFilter' |
ADMINS | [] |
FORMAT_MODULE_PATH | None |
DEFAULT_FROM_EMAIL | 'goriva@motobul.com' |
MEDIA_URL | '/media/' |
DATETIME_FORMAT | 'N j, Y, P' |
TEMPLATE_DIRS | [] |
DISALLOWED_USER_AGENTS | [] |
ALLOWED_INCLUDE_ROOTS | [] |
LOGGING | {} |
SHORT_DATE_FORMAT | 'm/d/Y' |
TEMPLATES | [{'APP_DIRS': True, 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': [], 'OPTIONS': {'context_processors': ['django.contrib.auth.context_processors.auth', 'django.template.context_processors.debug', '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', 'motobul.context_processors.all_pages_context']}}] |
TEST_RUNNER | 'django.test.runner.DiscoverRunner' |
CACHE_MIDDLEWARE_KEY_PREFIX | u'********************' |
SECURE_SSL_REDIRECT | False |
TIME_ZONE | 'UTC' |
FILE_UPLOAD_MAX_MEMORY_SIZE | 2621440 |
EMAIL_BACKEND | 'django.core.mail.backends.smtp.EmailBackend' |
EMAIL_USE_SSL | False |
TEMPLATE_CONTEXT_PROCESSORS | ['django.contrib.auth.context_processors.auth', 'django.template.context_processors.debug', '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'] |
SESSION_COOKIE_AGE | 1209600 |
SETTINGS_MODULE | 'motobul.settings' |
USE_ETAGS | False |
SITE_ROOT | '/srv/www/motobul/motobul/..' |
LANGUAGES_BIDI | ['he', 'ar', 'fa', 'ur'] |
FILE_UPLOAD_TEMP_DIR | None |
INTERNAL_IPS | [] |
STATIC_URL | '/static/' |
EMAIL_PORT | 25 |
USE_TZ | True |
SHORT_DATETIME_FORMAT | 'm/d/Y P' |
TEST_NON_SERIALIZED_APPS | [] |
PASSWORD_HASHERS | u'********************' |
TINYMCE_DEFAULT_CONFIG | {'height': 200, 'plugins': 'advimage,advlink,fullscreen,paste,searchreplace,table,template', 'theme': 'advanced', 'theme_advanced_blockformats': 'p,h1,h2,h3,h4,pre', 'theme_advanced_buttons1': 'formatselect,|,bold,italic,underline,|,justifyleft, justifycenter, justifyright, justifyfull ,|,bullist,numlist,blockquote,|,undo,redo,|,link,unlink,|,image,', 'theme_advanced_buttons2': 'search,|,pasteword,charmap,|,code,|,table,cleanup,', 'theme_advanced_buttons3': '', 'theme_advanced_resize_horizontal': True, 'theme_advanced_resizing': True, 'theme_advanced_resizing_use_cookie': True, 'theme_advanced_statusbar_location': 'bottom', 'theme_advanced_toolbar_align': 'left', 'theme_advanced_toolbar_location': 'top', 'width': 300} |
ABSOLUTE_URL_OVERRIDES | {} |
LANGUAGE_COOKIE_PATH | '/' |
CACHE_MIDDLEWARE_SECONDS | 600 |
EMAIL_SSL_CERTFILE | None |
CSRF_COOKIE_HTTPONLY | False |
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'] |
EMAIL_HOST_USER | 'goriva@motobul.com' |
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.