Skip to content

Can't get static files work in version 0.6.1 #52

@andyzhouty

Description

@andyzhouty

Can't get static files work in version 0.6.1

Example:

from apiflask import APIFlask
app = APIFlask(__name__)

@app.route("/")
def index():
    return ""
h1 { font-size: 16px; }

File Tree:

/app-root
  app.py
  /static
    style.css

And I GET /static/style.css in the browser, I expected to see:

h1 { font-size: 16px; }

But I got

500 Internal Server Error

What I have tried

  1. Change APIFlask to Flask, it works well.
  2. Change to any older version of APIFlask, it doesn't work.

Environment:

  • Python version: 3.8.5
  • Flask version: 2.0.0
  • APIFlask version: 0.6.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions