aboutsummaryrefslogtreecommitdiff
path: root/src/hydrilla/proxy/web_ui/items_import.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/hydrilla/proxy/web_ui/items_import.py')
-rw-r--r--src/hydrilla/proxy/web_ui/items_import.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/hydrilla/proxy/web_ui/items_import.py b/src/hydrilla/proxy/web_ui/items_import.py
index a5b5f18..f94768f 100644
--- a/src/hydrilla/proxy/web_ui/items_import.py
+++ b/src/hydrilla/proxy/web_ui/items_import.py
@@ -51,7 +51,13 @@ bp = flask.Blueprint('import', __package__)
@bp.route('/import', methods=['GET'])
def items_import(errors: t.Mapping[str, bool] = {}) -> werkzeug.Response:
- html = flask.render_template('import.html.jinja', **errors)
+ pattern = flask.request.args.get('pattern')
+ if pattern is None:
+ extra_args = {}
+ else:
+ extra_args = {'pattern': normalize_pattern(pattern)}
+
+ html = flask.render_template('import.html.jinja', **errors, **extra_args)
return flask.make_response(html, 200)
def items_import_from_file() -> werkzeug.Response:
@@ -172,7 +178,6 @@ def item_import_ad_hoc() -> werkzeug.Response:
try:
builder_args = ['-s', str(source_dir), '-d', str(malcontent_dir)]
build.perform(builder_args, standalone_mode=False)
- build.perform(['-s', str(source_dir), '-d', '/tmp/haketilodebug'], standalone_mode=False)
_app.get_haketilo_state().import_items(malcontent_dir)
except:
import traceback