Skip to content

Commit

Permalink
fix use-token + rename template for syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
PythonFZ committed Oct 19, 2023
1 parent e234f81 commit 76d5a66
Show file tree
Hide file tree
Showing 6 changed files with 443 additions and 731 deletions.
9 changes: 6 additions & 3 deletions zndraw/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,16 @@ def index():
try:
token = session["token"]
except KeyError:
token = uuid.uuid4().hex
if "token" in app.config:
token = app.config["token"]
else:
token = uuid.uuid4().hex
session["token"] = token

return render_template(
"index.html",
"index.jinja2",
upgrade_insecure_requests=app.config["upgrade_insecure_requests"],
token=session["token"],
token=session["token"],
)


Expand Down
7 changes: 0 additions & 7 deletions zndraw/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,6 @@ def main(
True,
help="""Whether to compute bonds for the structure. If set to False, no bonds will be computed.""",
),
multiprocessing: bool = typer.Option(
False,
"--multiprocessing",
"-mp",
help="""Use multiprocessing to read data files. This will slow down the loading time, but enables loading large files in the background.""",
),
upgrade_insecure_requests: bool = typer.Option(
False,
hidden=True,
Expand Down Expand Up @@ -79,7 +73,6 @@ def main(
stop=stop,
step=step,
compute_bonds=compute_bonds,
multiprocessing=multiprocessing,
upgrade_insecure_requests=upgrade_insecure_requests,
use_token=use_token,
)
Loading

0 comments on commit 76d5a66

Please sign in to comment.