Show More
@@ -131,6 +131,12 b' beaker.cache.sql_cache_long.key_length =' | |||
|
131 | 131 | ## dbm, file, memcached, database, and memory. |
|
132 | 132 | ## The storage uses the Container API |
|
133 | 133 | ##that is also used by the cache system. |
|
134 | ||
|
135 | #db session example | |
|
136 | #beaker.session.type = ext:database | |
|
137 | #beaker.session.sa.url = postgresql://postgres:qwe@localhost/rhodecode | |
|
138 | #beaker.session.table_name = db_session | |
|
139 | ||
|
134 | 140 | beaker.session.type = file |
|
135 | 141 | |
|
136 | 142 | beaker.session.key = rhodecode |
@@ -130,6 +130,12 b' beaker.cache.sql_cache_long.key_length =' | |||
|
130 | 130 | ## dbm, file, memcached, database, and memory. |
|
131 | 131 | ## The storage uses the Container API |
|
132 | 132 | ##that is also used by the cache system. |
|
133 | ||
|
134 | #db session example | |
|
135 | #beaker.session.type = ext:database | |
|
136 | #beaker.session.sa.url = postgresql://postgres:qwe@localhost/rhodecode | |
|
137 | #beaker.session.table_name = db_session | |
|
138 | ||
|
133 | 139 | beaker.session.type = file |
|
134 | 140 | |
|
135 | 141 | beaker.session.key = rhodecode |
@@ -36,7 +36,7 b' from rhodecode.lib.compat import izip_lo' | |||
|
36 | 36 | from paste.response import replace_header |
|
37 | 37 | |
|
38 | 38 | from pylons.controllers import WSGIController |
|
39 | from pylons.controllers.util import Response | |
|
39 | ||
|
40 | 40 | |
|
41 | 41 | from webob.exc import HTTPNotFound, HTTPForbidden, HTTPInternalServerError, \ |
|
42 | 42 | HTTPBadRequest, HTTPError |
@@ -56,9 +56,15 b' class JSONRPCError(BaseException):' | |||
|
56 | 56 | |
|
57 | 57 | |
|
58 | 58 | def jsonrpc_error(message, code=None): |
|
59 | """Generate a Response object with a JSON-RPC error body""" | |
|
60 | return Response(body=json.dumps(dict(result=None, | |
|
61 | error=message))) | |
|
59 | """ | |
|
60 | Generate a Response object with a JSON-RPC error body | |
|
61 | """ | |
|
62 | from pylons.controllers.util import Response | |
|
63 | resp = Response(body=json.dumps(dict(result=None, error=message)), | |
|
64 | status=code, | |
|
65 | content_type='application/json') | |
|
66 | return resp | |
|
67 | ||
|
62 | 68 | |
|
63 | 69 | |
|
64 | 70 | class JSONRPCController(WSGIController): |
General Comments 0
You need to be logged in to leave comments.
Login now