Merge pull request #106 from eReuse/#104-page-explaining-stamp

fixing url of link
This commit is contained in:
cayop 2021-01-18 17:34:40 +01:00 committed by GitHub
commit bd609a0842
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 3 deletions

View File

@ -237,7 +237,11 @@ class StampsView(View):
of one csv file of one csv file
""" """
def get(self): 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): class DocumentDef(Resource):

View File

@ -39,10 +39,10 @@
<div class="container-fluid"> <div class="container-fluid">
<div class="page-header col-md-6 col-md-offset-3"> <div class="page-header col-md-6 col-md-offset-3">
<div class="row"> <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>
<div class="row"> <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> </div>
</div> </div>