-
-
Notifications
You must be signed in to change notification settings - Fork 456
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
There are several serve functions that should return a `FileResponse`. Source code: https://github.com/django/django/blob/863aa7541d30247e7eb7a973ff68a7d36f16dc02/django/views/static.py#L17-L53 https://github.com/django/django/blob/863aa7541d30247e7eb7a973ff68a7d36f16dc02/django/contrib/staticfiles/views.py#L15-L39 https://github.com/django/django/blob/863aa7541d30247e7eb7a973ff68a7d36f16dc02/django/contrib/staticfiles/handlers.py#L48-L50 https://github.com/django/django/blob/863aa7541d30247e7eb7a973ff68a7d36f16dc02/django/test/testcases.py#L1680-L1687 Signed-off-by: Zixuan James Li <[email protected]>
- Loading branch information
Showing
4 changed files
with
10 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
from typing import Any | ||
|
||
from django.http.request import HttpRequest | ||
from django.http.response import HttpResponseBase | ||
from django.http.response import FileResponse | ||
|
||
def serve(request: HttpRequest, path: str, insecure: bool = ..., **kwargs: Any) -> HttpResponseBase: ... | ||
def serve(request: HttpRequest, path: str, insecure: bool = ..., **kwargs: Any) -> FileResponse: ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters