Commit 5b5a6a00 authored by Alexandre Leray's avatar Alexandre Leray
Browse files

Computes the url to index in page_edit view

It was set to localhost before, therefore breaking when deploying ths
parent bfd0dea3
......@@ -253,10 +253,11 @@ def page_edit(request, slug):
page.obj_create(bundle, request=request)
# indexes the page in the RDF store
url = reverse('aawiki:page-detail', kwargs={'slug': slug})
AAResource("http://localhost:8000" + url).index()
path = reverse('aawiki:page-detail', kwargs={'slug': slug})
url = '%s://%s%s' % (request.is_secure() and 'https' or 'http', request.get_host(), path)
return redirect(url)
return redirect(path)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment