Note that there are some explanatory texts on larger screens.

plurals
  1. POName 'Order' is not defined
    primarykey
    data
    text
    <p>I have this error</p> <pre><code>Name 'Order' is not defined </code></pre> <p>in the following claue:</p> <pre><code> try: order = Order.objects.from_request(request) cart = OrderCart(order) except Order.DoesNotExist: pass </code></pre> <p><code>Order</code> is defined exactly in the same file and is subclass of <code>model.Model</code></p> <p>To be more concrete, here is the file I'm working with: <a href="https://bitbucket.org/chris1610/satchmo/src/a04c87a539f3/satchmo/apps/satchmo_store/shop/models.py" rel="nofollow">https://bitbucket.org/chris1610/satchmo/src/a04c87a539f3/satchmo/apps/satchmo_store/shop/models.py</a> with exception occuring in line 242</p> <p>Why can this be?</p> <p>Update:</p> <p>Here is the traceback:</p> <pre><code>Traceback: File "/home/evgeniuz/.virtualenvs/port/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response 100. response = callback(request, *callback_args, **callback_kwargs) File "/home/evgeniuz/src/chillifish-pg/lib/payment/views/balance.py" in balance_remaining_order 30. template='shop/checkout/balance_remaining.html') File "/home/evgeniuz/src/chillifish-pg/pg/pgstore/utils.py" in _view 38. return view_func(request, *args, **kwargs) File "/home/evgeniuz/src/chillifish-pg/lib/payment/views/balance.py" in balance_remaining 66. 'paymentmethod_ct': len(config_value('PAYMENT', 'MODULES')) File "/home/evgeniuz/.virtualenvs/port/lib/python2.7/site-packages/django/template/context.py" in __init__ 149. self.update(processor(request)) File "/home/evgeniuz/src/chillifish-pg/lib/satchmo_store/shop/context_processors.py" in settings 21. cart = Cart.objects.from_request(request) File "/home/evgeniuz/src/chillifish-pg/lib/satchmo_store/shop/models.py" in from_request 237. except Order.DoesNotExist: Exception Type: NameError at /shop/checkout/balance/1/ Exception Value: global name 'Order' is not defined </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload