Commit 584c22ba authored by Patrick's avatar Patrick
Browse files

AttributeError at /fr/repanier/order/1/

'NoneType' object has no attribute 'streaming'
Solved :
Url.py login_required / cache_page order
parent 948f0ea9
......@@ -9,7 +9,8 @@ from views import PermanenceView
urlpatterns = patterns('',
url(r'^contact/$', views.contact_form, name='contact_form'),
url(r'^order/(\w+)/$', cache_page(60*60)(OrderView.as_view()), name='order_view'),
# url(r'^order/(\w+)/$', cache_page(60*60)(OrderView.as_view()), name='order_view'),
url(r'^order/(\w+)/$', login_required(cache_page(60*60)(OrderView.as_view())), name='order_view'),
url(r'^basket/(\w+)/$', login_required(OrderViewWithoutCache.as_view()), name='basket_view'),
url(r'^order-ajax/$', views.order_form_ajax, name='order_form_ajax'),
url(r'^ajax/order-init/$', views.ajax_order_init, name='ajax_order_init'),
......
......@@ -309,6 +309,9 @@ class OrderView(ListView):
if self.request.GET.get('departementforcustomer'):
self.departementforcustomer_id = self.request.GET['departementforcustomer']
return super(OrderView, self).dispatch(request, *args, **kwargs)
else:
return HttpResponseRedirect("/")
# return super(OrderView, self).dispatch(request, *args, **kwargs)
return
def get_context_data(self, **kwargs):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment