Function | serve |
Serve static files below a given point in the directory structure. |
Constant | DEFAULT_DIRECTORY_INDEX_TEMPLATE |
Undocumented |
Variable | template_translatable |
Undocumented |
Function | directory_index |
Undocumented |
Function | was_modified_since |
Was something modified since the user last downloaded it? |
Serve static files below a given point in the directory structure.
To use, put a URL pattern such as:
from django.views.static import serve path('<path:path>', serve, {'document_root': '/path/to/my/files/'})
in your URLconf. You must provide the document_root param. You may also set show_indexes to True if you'd like to serve a basic index of the directory. This index view will use the template hardcoded below, but if you'd like to override it, you can create a template called static/directory_index.html.
str
=
Undocumented
Value |
|
Was something modified since the user last downloaded it?