fixing url of link

This commit is contained in:
Cayo Puigdefabregas 2021-01-18 17:18:47 +01:00
parent 0273021d50
commit a7d51655b6
2 changed files with 7 additions and 3 deletions

View file

@ -237,7 +237,11 @@ class StampsView(View):
of one csv file
"""
def get(self):
return flask.render_template('documents/stamp.html')
url = urlutils.URL(request.url)
url.normalize()
url.path_parts = url.path_parts[:-2] + ['check', '']
url_path = url.to_text()
return flask.render_template('documents/stamp.html', rq_url=url_path)
class DocumentDef(Resource):

View file

@ -39,10 +39,10 @@
<div class="container-fluid">
<div class="page-header col-md-6 col-md-offset-3">
<div class="row">
<a href="http://dlt.ereuse.org/stamps/create?url=https://api.testing.usody.com/usodybeta/documents/check" target="_blank">Add one new check in your csv</a>
<a href="http://dlt.ereuse.org/stamps/create?url={{ rq_url }}" target="_blank">Add one new check in your csv</a>
</div>
<div class="row">
<a href="http://dlt.ereuse.org/stamps/check?url=https://api.testing.usody.com/usodybeta/documents/check" target="_blank">Verify a CSV file in here.</a>
<a href="http://dlt.ereuse.org/stamps/check?url={{ rq_url }}" target="_blank">Verify a CSV file in here.</a>
</div>
</div>
</div>