title: Django oscar Failed lookup for key [basket] in <WSGIRequest GET >
body: <p>I am new to django-oscar and this is the first time I tried launching a website with it. I am facing the following stack trace when trying to load a webpage (localhost:8000). I tried to search a lot on the internet but I couldn't find any solution.<br><br>
  <a href="https://i.stack.imgur.com/Adi7S.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Adi7S.png" alt="Image"></a>
      Environment:
      Request Method: GET
      Request URL: <a href="http://localhost:8000/" rel="nofollow noreferrer">http://localhost:8000/</a></p>
  
  <pre><code>Django Version: 1.9
  Python Version: 3.5.2
  Installed Applications:
  ['django.contrib.admin',
   'django.contrib.auth',
   'django.contrib.contenttypes',
   'django.contrib.sessions',
   'django.contrib.messages',
   'django.contrib.staticfiles',
   'django.contrib.sites',
   'django.contrib.flatpages',
   'compressor',
   'widget_tweaks',
   'oscar',
   'oscar.apps.analytics',
   'oscar.apps.checkout',
   'oscar.apps.address',
   'oscar.apps.shipping',
   'oscar.apps.catalogue',
   'oscar.apps.catalogue.reviews',
   'oscar.apps.partner',
   'oscar.apps.basket',
   'oscar.apps.payment',
   'oscar.apps.offer',
   'oscar.apps.order',
   'oscar.apps.customer',
   'oscar.apps.promotions',
   'oscar.apps.search',
   'oscar.apps.voucher',
   'oscar.apps.wishlists',
   'oscar.apps.dashboard',
   'oscar.apps.dashboard.reports',
   'oscar.apps.dashboard.users',
   'oscar.apps.dashboard.orders',
   'oscar.apps.dashboard.promotions',
   'oscar.apps.dashboard.catalogue',
   'oscar.apps.dashboard.offers',
   'oscar.apps.dashboard.partners',
   'oscar.apps.dashboard.pages',
   'oscar.apps.dashboard.ranges',
   'oscar.apps.dashboard.reviews',
   'oscar.apps.dashboard.vouchers',
   'oscar.apps.dashboard.communications',
   'oscar.apps.dashboard.shipping',
   'haystack',
   'treebeard',
   'sorl.thumbnail',
   'django_tables2']
  
  Installed Middleware:&lt;br&gt;
  ['django.middleware.common.CommonMiddleware',
   'django.middleware.csrf.CsrfViewMiddleware']
  
  
  Template error:
  In template
  /Users/rohit.rawat/.virtualenvs/env/lib/python3.5/site-packages/oscar/templates/oscar/promotions/home.html, error at line 0
     Failed lookup for key [%s] in %r   1 : {% extends "layout_2_col.html" %}
     2 : {% load i18n %}
     3 : 
     4 : {% block navigation %}
     5 :     {% include "partials/nav_primary.html" with expand_dropdown=1 %}
     6 : {% endblock %}
     7 : 
     8 : {% block header %}{% endblock %}
     9 : 
     10 : {% block column_left %}
  
  
  Traceback:
  
  File "/Users/rohit.rawat/.virtualenvs/env/lib/python3.5/site-packages/django/template/base.py" in _resolve_lookup
    879.                     current = current[bit]
  
  During handling of the above exception ('WSGIRequest' object is not subscriptable), another exception occurred:
  
  File "/Users/rohit.rawat/.virtualenvs/env/lib/python3.5/site-packages/django/template/base.py" in _resolve_lookup
    887.                         current = getattr(current, bit)
  
  During handling of the above exception ('WSGIRequest' object has no attribute 'basket'), another exception occurred:
  
  File "/Users/rohit.rawat/.virtualenvs/env/lib/python3.5/site-packages/django/template/base.py" in _resolve_lookup
    894.                             current = current[int(bit)]
  
  During handling of the above exception (invalid literal for int() with base 10: 'basket'), another exception occurred:
  
  File "/Users/rohit.rawat/.virtualenvs/env/lib/python3.5/site-packages/django/core/handlers/base.py" in get_response
    174.                     response = self.process_exception_by_middleware(e, request)
  
  File "/Users/rohit.rawat/.virtualenvs/env/lib/python3.5/site-packages/django/core/handlers/base.py" in get_response
    172.                     response = response.render()
  
  File "/Users/rohit.rawat/.virtualenvs/env/lib/python3.5/site-packages/django/template/response.py" in render
    160.             self.content = self.rendered_content
  
  File "/Users/rohit.rawat/.virtualenvs/env/lib/python3.5/site-packages/django/template/response.py" in rendered_content
    137.         content = template.render(context, self._request)
  
  File "/Users/rohit.rawat/.virtualenvs/env/lib/python3.5/site-packages/django/template/backends/django.py" in render
    95.             return self.template.render(context)
  
  File "/Users/rohit.rawat/.virtualenvs/env/lib/python3.5/site-packages/django/template/base.py" in render
    206.                     return self._render(context)
  
  File "/Users/rohit.rawat/.virtualenvs/env/lib/python3.5/site-packages/django/template/base.py" in _render
    197.         return self.nodelist.render(context)
  
  File "/Users/rohit.rawat/.virtualenvs/env/lib/python3.5/site-packages/django/template/base.py" in render
    988.                 bit = node.render_annotated(context)
  
  File "/Users/rohit.rawat/.virtualenvs/env/lib/python3.5/site-packages/django/template/base.py" in render_annotated
    955.             return self.render(context)
  
  File "/Users/rohit.rawat/.virtualenvs/env/lib/python3.5/site-packages/django/template/loader_tags.py" in render
    173.         return compiled_parent._render(context)
  
  File "/Users/rohit.rawat/.virtualenvs/env/lib/python3.5/site-packages/django/template/base.py" in _render
    197.         return self.nodelist.render(context)
  
  File "/Users/rohit.rawat/.virtualenvs/env/lib/python3.5/site-packages/django/template/base.py" in render
    988.                 bit = node.render_annotated(context)
  
  File "/Users/rohit.rawat/.virtualenvs/env/lib/python3.5/site-packages/django/template/base.py" in render_annotated
    955.             return self.render(context)
  
  File "/Users/rohit.rawat/.virtualenvs/env/lib/python3.5/site-packages/django/template/loader_tags.py" in render
    173.         return compiled_parent._render(context)
  
  File "/Users/rohit.rawat/.virtualenvs/env/lib/python3.5/site-packages/django/template/base.py" in _render
    197.         return self.nodelist.render(context)
  
  File "/Users/rohit.rawat/.virtualenvs/env/lib/python3.5/site-packages/django/template/base.py" in render
    988.                 bit = node.render_annotated(context)
  
  File "/Users/rohit.rawat/.virtualenvs/env/lib/python3.5/site-packages/django/template/base.py" in render_annotated
    955.             return self.render(context)
  
  File "/Users/rohit.rawat/.virtualenvs/env/lib/python3.5/site-packages/django/template/loader_tags.py" in render
    173.         return compiled_parent._render(context)
  
  File "/Users/rohit.rawat/.virtualenvs/env/lib/python3.5/site-packages/django/template/base.py" in _render
    197.         return self.nodelist.render(context)
  
  File "/Users/rohit.rawat/.virtualenvs/env/lib/python3.5/site-packages/django/template/base.py" in render
    988.                 bit = node.render_annotated(context)
  
  File "/Users/rohit.rawat/.virtualenvs/env/lib/python3.5/site-packages/django/template/base.py" in render_annotated
    955.             return self.render(context)
  
  File "/Users/rohit.rawat/.virtualenvs/env/lib/python3.5/site-packages/django/template/loader_tags.py" in render
    69.                 result = block.nodelist.render(context)
  
  File "/Users/rohit.rawat/.virtualenvs/env/lib/python3.5/site-packages/django/template/base.py" in render
    988.                 bit = node.render_annotated(context)
  
  File "/Users/rohit.rawat/.virtualenvs/env/lib/python3.5/site-packages/django/template/base.py" in render_annotated
    955.             return self.render(context)
  
  File "/Users/rohit.rawat/.virtualenvs/env/lib/python3.5/site-packages/django/template/loader_tags.py" in render
    69.                 result = block.nodelist.render(context)
  
  File "/Users/rohit.rawat/.virtualenvs/env/lib/python3.5/site-packages/django/template/base.py" in render
    988.                 bit = node.render_annotated(context)
  
  File "/Users/rohit.rawat/.virtualenvs/env/lib/python3.5/site-packages/django/template/base.py" in render_annotated
    955.             return self.render(context)
  
  File "/Users/rohit.rawat/.virtualenvs/env/lib/python3.5/site-packages/django/template/loader_tags.py" in render
    209.                 return template.render(context)
  
  File "/Users/rohit.rawat/.virtualenvs/env/lib/python3.5/site-packages/django/template/base.py" in render
    208.                 return self._render(context)
  
  File "/Users/rohit.rawat/.virtualenvs/env/lib/python3.5/site-packages/django/template/base.py" in _render
    197.         return self.nodelist.render(context)
  
  File "/Users/rohit.rawat/.virtualenvs/env/lib/python3.5/site-packages/django/template/base.py" in render
    988.                 bit = node.render_annotated(context)
  
  File "/Users/rohit.rawat/.virtualenvs/env/lib/python3.5/site-packages/django/template/base.py" in render_annotated
    955.             return self.render(context)
  
  File "/Users/rohit.rawat/.virtualenvs/env/lib/python3.5/site-packages/django/template/defaulttags.py" in render
    326.                 return nodelist.render(context)
  
  File "/Users/rohit.rawat/.virtualenvs/env/lib/python3.5/site-packages/django/template/base.py" in render
    988.                 bit = node.render_annotated(context)
  
  File "/Users/rohit.rawat/.virtualenvs/env/lib/python3.5/site-packages/django/template/base.py" in render_annotated
    955.             return self.render(context)
  
  File "/Users/rohit.rawat/.virtualenvs/env/lib/python3.5/site-packages/django/template/base.py" in render
    1039.             output = self.filter_expression.resolve(context)
  
  File "/Users/rohit.rawat/.virtualenvs/env/lib/python3.5/site-packages/django/template/base.py" in resolve
    726.                     arg_vals.append(arg.resolve(context))
  
  File "/Users/rohit.rawat/.virtualenvs/env/lib/python3.5/site-packages/django/template/base.py" in resolve
    846.             value = self._resolve_lookup(context)
  
  File "/Users/rohit.rawat/.virtualenvs/env/lib/python3.5/site-packages/django/template/base.py" in _resolve_lookup
    901.                                                        (bit, current))  # missing attribute
  
  Exception Type: VariableDoesNotExist at /
  Exception Value: Failed lookup for key [basket] in "&lt;WSGIRequest: GET '/'&gt;"
  </code></pre>
  
  <p><br>
  Also if you can suggest a better or less error prone e-commerce framework for django, it would be great!</p>