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.

Changes between Version 3 and Version 5 of Ticket #6342


Ignore:
Timestamp:
12/05/11 22:10:44 (12 years ago)
Author:
wmoore
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #6342

    • Property Milestone changed from Unscheduled to OMERO-Beta4.4
  • Ticket #6342 – Description

    v3 v5  
    22 
    33Tickets - DRAFT ONLY!!! 
     4 
     5Examples of common functionality that exists (and could be moved to decorators) or that we might want to provide via decorators. 
     6 
     7 - Error handling, connection & redirect or error if json. 
     8 
     9{{{ 
     10conn = None 
     11    try: 
     12        conn = kwargs["conn"] 
     13    except: 
     14        logger.error(traceback.format_exc()) 
     15        return handlerInternalError("Connection is not available. Please contact your administrator.") 
     16}}} 
     17 
     18 - Would be nice to allow 3rd party developers to specify templates. E.g. as in webgateway  
     19{{{ 
     20def full_viewer(request, iid, server_id=None, _conn=None, **kwargs): 
     21    .... 
     22    template = kwargs.get('template', "webgateway/omero_image.html") 
     23    ...etc. 
     24}}} 
     25 
     26 - Also we have this a lot 
     27{{{ 
     28    t = template_loader.get_template(template) 
     29    c = Context(request,context) 
     30    logger.debug('TEMPLATE: '+template) 
     31    return HttpResponse(t.render(c)) 
     32}}} 
     33 
     34{{{ 
     35# check menu 
     36    menu = request.REQUEST.get("menu") 
     37    if menu is not None: 
     38        request.session['nav']['menu'] = menu 
     39    else: 
     40        menu = request.session['nav']['menu'] 
     41    # check view 
     42    view = request.REQUEST.get("view") 
     43    if view is not None: 
     44        request.session['nav']['view'] = view 
     45    else: 
     46        view = request.session['nav']['view'] 
     47}}} 

1.3.13-PRO © 2008-2011 Agilo Software all rights reserved (this page was served in: 0.13887 sec.)

We're Hiring!