Warning: Can't synchronize with repository "(default)" (/home/git/ome.git does not appear to be a Git repository.). Look in the Trac log for more information.
Notice: In order to edit this ticket you need to be either: a Product Owner, The owner or the reporter of the ticket, or, in case of a Task not yet assigned, a team_member"
Due to the changes in #6387, Web should have one common strategy to create connection, keep it alive and retrieve in specific use cases. That is also related to decorators.
Tickets - DRAFT ONLY!!!
Examples of common functionality that exists (and could be moved to decorators) or that we might want to provide via decorators.
Error handling, connection & redirect or error if json.
conn = None
try:
conn = kwargs["conn"]
except:
logger.error(traceback.format_exc())
return handlerInternalError("Connection is not available. Please contact your administrator.")
Would be nice to allow 3rd party developers to specify templates. E.g. as in webgateway
t = template_loader.get_template(template)
c = Context(request,context)
logger.debug('TEMPLATE: '+template)
return HttpResponse(t.render(c))
# check menu
menu = request.REQUEST.get("menu")
if menu is not None:
request.session['nav']['menu'] = menu
else:
menu = request.session['nav']['menu']
# check view
view = request.REQUEST.get("view")
if view is not None:
request.session['nav']['view'] = view
else:
view = request.session['nav']['view']