Skip to content

Commit 598377d

Browse files
committed
Fixing broken url references in the request handling code - re markfinger#52
1 parent 78deb94 commit 598377d

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

react/render_server.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ def __unicode__(self):
2121

2222
class RenderServer(object):
2323
def render(self, path, props=None, to_static_markup=False):
24+
url = conf.settings.RENDER_URL
25+
2426
if props is not None:
2527
serialized_props = json.dumps(props, cls=JSONEncoder)
2628
else:
@@ -39,17 +41,17 @@ def render(self, path, props=None, to_static_markup=False):
3941

4042
try:
4143
res = requests.post(
42-
conf.settings.RENDER_URL,
44+
url,
4345
data=serialized_options,
4446
headers={'content-type': 'application/json'},
4547
params={'hash': options_hash}
4648
)
4749
except requests.ConnectionError:
48-
raise RenderServerError('Could not connect to render server at {}'.format(self.url))
50+
raise RenderServerError('Could not connect to render server at {}'.format(url))
4951

5052
if res.status_code != 200:
5153
raise RenderServerError(
52-
'Unexpected response from render server at {} - {}: {}'.format(self.url, res.status_code, res.text)
54+
'Unexpected response from render server at {} - {}: {}'.format(url, res.status_code, res.text)
5355
)
5456

5557
obj = res.json()

0 commit comments

Comments
 (0)