Table Of Contents

Previous topic

omero.util package

Next topic

omeroweb.feedback package

This Page

omeroweb package

Subpackages

Submodules

omeroweb.connector module

class omeroweb.connector.Connector(server_id, is_secure)

Bases: object

Object which encompasses all of the logic related to a Blitz connection and its status with respect to OMERO.web.

SERVER_VERSION_RE = <_sre.SRE_Pattern object at 0x192b4ca0>
check_version(useragent)
create_connection(useragent, username, password, is_public=False, userip=None)
create_gateway(useragent, username=None, password=None, userip=None)
create_guest_connection(useragent, is_public=False)
is_server_up(useragent)
join_connection(useragent, userip=None)
lookup_host_and_port()
prepare_gateway(connection)
class omeroweb.connector.IterRegistry

Bases: type

class omeroweb.connector.Server(host, port, server=None)

Bases: omeroweb.connector.ServerBase

_frozen = False
_registry = {}
classmethod find(host=None, port=None, server=None)
classmethod get(pk)
class omeroweb.connector.ServerBase(host, port, server=None)

Bases: object

_frozen = False
_next_id = 1
_registry = {}
classmethod freeze()
classmethod instance(pk)
classmethod reset()

omeroweb.custom_context_processor module

omeroweb.custom_context_processor.url_suffix(request)

omeroweb.custom_forms module

class omeroweb.custom_forms.NonASCIIForm(*args, **kwargs)

Bases: django.forms.forms.Form

base_fields = {}
full_clean()

Cleans all of self.data and populates self._errors and self.cleaned_data.

media

omeroweb.decorators module

Decorators for use with OMERO.web applications.

class omeroweb.decorators.ConnCleaningHttpResponse(streaming_content=(), *args, **kwargs)

Bases: django.http.response.StreamingHttpResponse

Extension of L{HttpResponse} which closes the OMERO connection.

close()
omeroweb.decorators.get_client_ip(request)
class omeroweb.decorators.login_required(useragent='OMERO.web', isAdmin=False, isGroupOwner=False, doConnectionCleanup=True, omero_group='-1', allowPublic=None)

Bases: object

OMERO.web specific extension of the Django login_required() decorator, https://docs.djangoproject.com/en/dev/topics/auth/, which is responsible for ensuring a valid L{omero.gateway.BlitzGateway} connection. Is configurable by various options.

_cleanup_deprecated(s)
get_authenticated_connection(server_id, request)

Prepares an authenticated Blitz connection wrapper (from L{omero.gateway}) for use with a view function.

get_connection(server_id, request)

Prepares a Blitz connection wrapper (from L{omero.gateway}) for use with a view function.

get_login_url()

The URL that should be redirected to if not logged in.

get_public_user_connector()

Returns the current cached OMERO.webpublic connector or None if nothing has been cached.

get_share_connection(request, conn, share_id)
is_valid_public_url(server_id, request)

Verifies that the URL for the resource being requested falls within the scope of the OMERO.webpublic URL filter.

load_server_settings(conn, request)

Loads Client preferences from the server.

login_url

The URL that should be redirected to if not logged in.

on_logged_in(request, conn)

Called whenever the users is successfully logged in. Sets the ‘omero.group’ option if specified in the constructor

on_not_logged_in(request, url, error=None)

Called whenever the user is not logged in.

on_share_connection_prepared(request, conn_share)

Called whenever a share connection is successfully prepared.

prepare_share_connection(request, conn, share_id)

Prepares the share connection if we have a valid share ID.

set_public_user_connector(connector)

Sets the current cached OMERO.webpublic connector.

verify_is_admin(conn)

If we have been requested to by the isAdmin flag, verify the user is an admin and raise an exception if they are not.

verify_is_group_owner(conn, gid)

If we have been requested to by the isGroupOwner flag, verify the user is the owner of the provided group. If no group is provided the user’s active session group ownership will be verified.

omeroweb.decorators.parse_url(lookup_view)
class omeroweb.decorators.render_response

Bases: object

This decorator handles the rendering of view methods to HttpResponse. It expects that wrapped view methods return a dict. This allows: - The template to be specified in the method arguments OR within the view

method itself
  • The dict to be returned as json if required
  • The request is passed to the template context, as required by some tags etc
  • A hook is provided for adding additional data to the context, from the L{omero.gateway.BlitzGateway} or from the request.
prepare_context(request, context, *args, **kwargs)

Hook for adding additional data to the context dict

omeroweb.filesessionstore module

class omeroweb.filesessionstore.SessionStore(session_key=None)

Bases: django.contrib.sessions.backends.base.SessionBase

Implements a file based session store.

_expiry_date(session_data)

Return the expiry time of the file storing the session’s content.

classmethod _get_storage_path()
_key_to_file(session_key=None)

Get the file associated with this session key.

_last_modification()

Return the modification time of the file storing the session’s content.

clean()
classmethod clear_expired()
create()
delete(session_key=None)
exists(session_key)
load()
save(must_create=False)

omeroweb.http module

class omeroweb.http.HttpJNLPResponse(content)

Bases: django.http.response.HttpResponse

class omeroweb.http.HttpJPEGResponse(content)

Bases: django.http.response.HttpResponse

class omeroweb.http.HttpJavascriptResponse(content)

Bases: django.http.response.HttpResponse

class omeroweb.http.HttpJavascriptResponseServerError(content)

Bases: django.http.response.HttpResponseServerError

class omeroweb.http.HttpJsonResponse(content)

Bases: django.http.response.HttpResponse

omeroweb.manage module

omeroweb.settings module

exception omeroweb.settings.LeaveUnset

Bases: exceptions.Exception

omeroweb.settings.check_server_type(s)
omeroweb.settings.check_session_engine(s)
omeroweb.settings.check_threading(t)
omeroweb.settings.check_worker_class(c)
omeroweb.settings.identity(x)
omeroweb.settings.leave_none_unset(s)
omeroweb.settings.leave_none_unset_int(s)
omeroweb.settings.load_server_list()
omeroweb.settings.map_deprecated_settings(settings)
omeroweb.settings.parse_boolean(s)
omeroweb.settings.parse_paths(s)
omeroweb.settings.process_custom_settings(module, settings='CUSTOM_SETTINGS_MAPPINGS', deprecated=None)
omeroweb.settings.report_settings(module)
omeroweb.settings.str_slash(s)

omeroweb.urls module

omeroweb.urls.redirect_urlpatterns()

Helper function to return a URL pattern for index page http://host/.

omeroweb.urls.remove_prefix(appname, prefix='omero_')

omeroweb.wsgi module

WSGI config for the OMERO.web project.

Copyright 2014 Glencoe Software, Inc. All rights reserved. Use is subject to license terms supplied in LICENSE.txt

Module contents