Skip to content
This repository has been archived by the owner on May 20, 2024. It is now read-only.

No route to upload_page #100

Open
trbKnl opened this issue Jun 1, 2022 · 2 comments
Open

No route to upload_page #100

trbKnl opened this issue Jun 1, 2022 · 2 comments

Comments

@trbKnl
Copy link

trbKnl commented Jun 1, 2022

After generating a default config yaml file with: osd2f --generate-current-config config.yaml

There is this section for the upload page:

...
upload_page:
   blocks: []
   consent_popup:
     accept_button: I consent
     decline_button: I do not consent
     end_text: By clicking below, you consent to these terms...
     lead: This box explains the conditions of your donation
...

In the app there is no route defined for upload_page but there is for upload.
Suggestion: in default_content_settings change upload_page to upload.

@trbKnl
Copy link
Author

trbKnl commented Jun 1, 2022

When changing: upload_page to upload in the config.yaml.

An error gets thrown:

  File "/home/turbo/d3i/osd2f/env/lib/python3.10/site-packages/hypercorn/asyncio/lifespan.py", line 84, in asgi_send
    raise LifespanFailureError("startup", message["message"])
hypercorn.utils.LifespanFailureError: Lifespan failure in startup. '1 validation error for ContentSettings
upload_page
  field required (type=value_error.missing)'

So I think the solution is then to change the route from:
@app.route("/upload", methods=["GET", "POST"]) to
@app.route("/upload_page", methods=["GET", "POST"])

@trbKnl trbKnl closed this as completed Jun 1, 2022
@trbKnl
Copy link
Author

trbKnl commented Jun 1, 2022

Did not meant to close :)

@trbKnl trbKnl reopened this Jun 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant