# HG changeset patch # User BenoƮt Allard # Date 1412588641 -7200 # Node ID 752b8bfe0baf427b40dc1f50ece510d1893eff5f # Parent 9b0fb5ca7eff4297ac300863f511ef25c0a92fee Use FarolLuz method to get a document ID (increase dependency version) diff -r 9b0fb5ca7eff -r 752b8bfe0baf farol/cache.py --- a/farol/cache.py Thu Oct 02 15:40:38 2014 +0200 +++ b/farol/cache.py Mon Oct 06 11:44:01 2014 +0200 @@ -91,7 +91,7 @@ abort(403) if request.method != 'POST': return render_template('cache/save.j2', - id_=get_current()._tracking._identification._id) + id_=get_current().getDocId()) # Get some kind of filename, and save the cvrf on cache (disk) path = secure_filename(request.form['fname']) path, _ = os.path.splitext(path) diff -r 9b0fb5ca7eff -r 752b8bfe0baf farol/main.py --- a/farol/main.py Thu Oct 02 15:40:38 2014 +0200 +++ b/farol/main.py Mon Oct 06 11:44:01 2014 +0200 @@ -143,7 +143,7 @@ current_id = None cvrf = get_current() if has_current(): - current_id = get_current()._tracking._identification._id + current_id = get_current().getDocId() return render_template('new.j2', has_document=has_current(), now=utcnow(), current_id=current_id) if 'rhsa' in request.form: @@ -184,7 +184,7 @@ if 'raw' not in request.args: return render_template('render.j2', format_=format_, title=cvrf._title, type_=cvrf._type, doc=doc) response = make_response(doc) - filename = secure_filename(cvrf._tracking._identification._id) + "." + format_ + filename = secure_filename(cvrf.getDocId()) + "." + format_ response.headers["content-disposition"] = 'attachement; filename=' + filename response.headers["content-type"] = 'text/plain' return response diff -r 9b0fb5ca7eff -r 752b8bfe0baf setup.py --- a/setup.py Thu Oct 02 15:40:38 2014 +0200 +++ b/setup.py Mon Oct 06 11:44:01 2014 +0200 @@ -42,7 +42,7 @@ license='GPLv2+', packages=['farol'], scripts=['run_web'], - install_requires=['farolluz', 'Flask'], + install_requires=['farolluz >= 0.1.1', 'Flask'], test_suite='tests', # Also install the templates and the static dir include_package_data=True,