Skip to content

Commit 426d17f

Browse files
committed
Fixed an issue where changes to the render server's url wouldn't be applied after initialisation
Re markfinger#47
1 parent 3d58f2d commit 426d17f

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

react/render_server.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,6 @@ def __unicode__(self):
2020

2121

2222
class RenderServer(object):
23-
def __init__(self, url):
24-
self.url = url
25-
2623
def render(self, path, props=None, to_static_markup=False):
2724
if props is not None:
2825
serialized_props = json.dumps(props, cls=JSONEncoder)
@@ -42,7 +39,7 @@ def render(self, path, props=None, to_static_markup=False):
4239

4340
try:
4441
res = requests.post(
45-
self.url,
42+
conf.settings.RENDER_URL,
4643
data=serialized_options,
4744
headers={'content-type': 'application/json'},
4845
params={'hash': options_hash}
@@ -73,4 +70,4 @@ def render(self, path, props=None, to_static_markup=False):
7370
return RenderedComponent(markup, serialized_props)
7471

7572

76-
render_server = RenderServer(conf.settings.RENDER_URL)
73+
render_server = RenderServer()

0 commit comments

Comments
 (0)