kenken999's picture
test
63f6011
raw
history blame
327 Bytes
from fastapi import FastAPI
from fastapi.staticfiles import StaticFiles
from django.conf import settings
def init_django_app(app: FastAPI, application):
if settings.MOUNT_DJANGO_APP:
app.mount("/django", application) # type:ignore
app.mount("/static", StaticFiles(directory="staticfiles"), name="static")