Mercurial > libervia-web
comparison libervia_server/blog.py @ 436:73f767a9ac2f
server_side: added constant SERVICE_PROFILE to remove hard-coded value
author | souliane <souliane@mailoo.org> |
---|---|
date | Thu, 01 May 2014 11:31:51 +0200 |
parents | bbdbee25123a |
children | 63017904c4d4 |
comparison
equal
deleted
inserted
replaced
435:e63fc04efef7 | 436:73f767a9ac2f |
---|---|
46 """ | 46 """ |
47 | 47 |
48 def __init__(self, host): | 48 def __init__(self, host): |
49 self.host = host | 49 self.host = host |
50 Resource.__init__(self) | 50 Resource.__init__(self) |
51 if not host.bridge.isConnected("libervia"): # FIXME: hard coded value for test | 51 # FIXME: this can be move to the beginning of Libervia.startService to avoid an initialization issue |
52 host.bridge.connect("libervia") | 52 if not host.bridge.isConnected(C.SERVICE_PROFILE): |
53 host.bridge.connect(C.SERVICE_PROFILE) | |
53 | 54 |
54 def render_GET(self, request): | 55 def render_GET(self, request): |
55 if not request.postpath: | 56 if not request.postpath: |
56 return MicroBlog.ERROR_TEMPLATE % {'root': '', | 57 return MicroBlog.ERROR_TEMPLATE % {'root': '', |
57 'message': "You must indicate a nickname"} | 58 'message': "You must indicate a nickname"} |