will-moore/openmicroscopy — comment on commit f288ba42bbb7411b55496de64ffe3a76ec9bc4a9
File: components/tools/OmeroWeb/omeroweb/webclient/views.py line 1429
By aleksandra-tarkowska:

In order to get access to HttpRequest GET/POST (or REQUEST for convenience), following examples should be used:

- check the HTTP method:
```request.method == 'GET':``` or ```request.method == 'POST':```
- get attribute value:
```request.REQUEST.get('key')``` gives value as a string or None or ```request.REQUEST.get('key', '')``` gives value as a string or empty string.

We could make few helpers to make the code prettier like here http://djangosnippets.org/snippets/826/. Alternatively string could be handled directly in the controllers.