equal
deleted
inserted
replaced
45 """ |
45 """ |
46 |
46 |
47 from soc.logic.helper import timeline |
47 from soc.logic.helper import timeline |
48 from soc.logic.models.site import logic as site_logic |
48 from soc.logic.models.site import logic as site_logic |
49 from soc.logic.models.user import logic as user_logic |
49 from soc.logic.models.user import logic as user_logic |
|
50 from soc.views import out_of_band |
|
51 from soc.views.helper import responses |
50 |
52 |
51 @wraps(func) |
53 @wraps(func) |
52 def view_wrapper(request, *args, **kwds): |
54 def view_wrapper(request, *args, **kwds): |
53 site = site_logic.getSingleton() |
55 site = site_logic.getSingleton() |
54 |
56 |
71 logging.exception(exception) |
73 logging.exception(exception) |
72 return http.HttpResponseRedirect('/soc/content/memory_error.html') |
74 return http.HttpResponseRedirect('/soc/content/memory_error.html') |
73 except AssertionError, exception: |
75 except AssertionError, exception: |
74 logging.exception(exception) |
76 logging.exception(exception) |
75 return http.HttpResponseRedirect('/soc/content/assertion_error.html') |
77 return http.HttpResponseRedirect('/soc/content/assertion_error.html') |
|
78 except out_of_band.Error, error: |
|
79 return responses.errorResponse(error, request) |
76 |
80 |
77 return view_wrapper |
81 return view_wrapper |
78 |
82 |
79 |
83 |
80 def merge_params(func): |
84 def merge_params(func): |