Closed tiborsimko closed 6 years ago
Here is one /record/56
what should it be replaced with?
/docs/cms-vm-validation-2010
I guess. Note that we already have the redirection in place:
cernopendata/modules/pages/views.py:@blueprint.route('/vm/cms/validation/report')
cernopendata/modules/pages/views.py-def validation_report_redirect(exp):
cernopendata/modules/pages/views.py- """Redirects to CMS VM validation document."""
cernopendata/modules/pages/views.py- return redirect('/docs/cms-vm-validation-2010')
but it fails because of:
nginx_1 | 172.19.0.1 - - [05/Feb/2018:13:07:20 +0000] "GET /static/docs/getting-started-with-cms-2010-data/cms_tbrowser.png HTTP/1.1" 200 46848 "http://0.0.0.0/docs/cms-getting-started-2010" "Mozilla/5.0 (X11; Linux x86_64; rv:58.0) Gecko/20100101 Firefox/58.0"
web_1 | Traceback (most recent call last):
web_1 | File "/usr/lib/python2.7/site-packages/flask/app.py", line 1997, in __call__
web_1 | return self.wsgi_app(environ, start_response)
web_1 | File "/usr/lib/python2.7/site-packages/werkzeug/wsgi.py", line 660, in __call__
web_1 | return app(environ, start_response)
web_1 | File "/usr/lib/python2.7/site-packages/flask/app.py", line 1985, in wsgi_app
web_1 | response = self.handle_exception(e)
web_1 | File "/usr/lib/python2.7/site-packages/flask/app.py", line 1540, in handle_exception
web_1 | reraise(exc_type, exc_value, tb)
web_1 | File "/usr/lib/python2.7/site-packages/flask/app.py", line 1982, in wsgi_app
web_1 | response = self.full_dispatch_request()
web_1 | File "/usr/lib/python2.7/site-packages/flask/app.py", line 1614, in full_dispatch_request
web_1 | rv = self.handle_user_exception(e)
web_1 | File "/usr/lib/python2.7/site-packages/flask/app.py", line 1517, in handle_user_exception
web_1 | reraise(exc_type, exc_value, tb)
web_1 | File "/usr/lib/python2.7/site-packages/flask/app.py", line 1612, in full_dispatch_request
web_1 | rv = self.dispatch_request()
web_1 | File "/usr/lib/python2.7/site-packages/flask/app.py", line 1598, in dispatch_request
web_1 | return self.view_functions[rule.endpoint](**req.view_args)
web_1 | TypeError: validation_report_redirect() takes exactly 1 argument (0 given)
Would be good to fix this in the code rather than to change the link in the record, since those old URLs could be used outside by people.
Redirection for the following URL:
(that is used in some records) does not work.