Ver código fonte

editor route can get url parameter

weichen 4 anos atrás
pai
commit
0c80cdbc09
1 arquivos alterados com 3 adições e 2 exclusões
  1. 3 2
      backstage/editor/routes.py

+ 3 - 2
backstage/editor/routes.py

@@ -1,4 +1,4 @@
-from flask import render_template, Blueprint
+from flask import render_template, Blueprint, request
 
 
 editor_app = Blueprint('editor', __name__)
@@ -6,4 +6,5 @@ editor_app = Blueprint('editor', __name__)
 
 @editor_app.route('/backstage/editor')
 def editor():
-    return render_template('editor.html', title='Type Editor', url='/collection/doll_and_drum_set')
+    url = request.args.get('url', type=str)
+    return render_template('editor.html', title='Type Editor', url=url)