Spaces:
Sleeping
Sleeping
File size: 327 Bytes
024edca |
1 2 3 4 5 6 7 8 9 |
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")
|