Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add STATIC_URL in middleware exclude #21

Closed
wants to merge 1 commit into from

Conversation

lsaavedr
Copy link

Hi,

with this PR can be importing css or other stuff from static files,

regards!

@xi
Copy link
Owner

xi commented Jul 31, 2024

I don't see why this should be necessary. In production you usually don't serve static files from django, so the request doesn't go through the middleware. In development you usually use the staticfiles app, which doesn't go through middleware either.

Am I missing something? Can you provide a reproducable case in which this makes a difference?

@lsaavedr
Copy link
Author

lsaavedr commented Jul 31, 2024

this is necessary to develop with any ASGI server like uvicorn or daphne that serve static files through middleware, I think that others developers also work in development with ASGI servers to manage async viewers or channels

@xi
Copy link
Owner

xi commented Jul 31, 2024

Can you provide more details on your setup? The official documentation does not mention anything special about static files. Any tutorials I found (e.g. this one also recommended to bypass django when serving static files. So I tend to believe that this is an issue with your setup rather than django-mfa3.

@lsaavedr lsaavedr closed this Oct 12, 2024
@lsaavedr lsaavedr deleted the fix_middleware branch October 12, 2024 00:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants