Commit 0505e140 by carpoon

add some logging for the store

parent 71d6ccff
......@@ -71,19 +71,19 @@ class StoreList(LoginRequiredMixin, TemplateView):
try:
if self.request.is_ajax():
context = self.get_context_data(**kwargs)
return render_to_response(
"dashboard/store/_list-box.html",
context, self.request
)
return render(self.request, "dashboard/store/_list-box.html", context)
else:
return super(StoreList, self).get(*args, **kwargs)
except NoStoreException:
messages.warning(self.request, _("No store."))
except NotOkException:
except NotOkException as e:
logger.error("Store error: %s" % unicode(e))
logger.exception(e)
messages.warning(self.request, _("Store has some problems now."
" Try again later."))
except Exception as e:
logger.critical("Something is wrong with store: %s", unicode(e))
logger.exception(e)
messages.warning(self.request, _("Unknown store error."))
return redirect("/")
......
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 sign in to comment