本文介紹 django.conf.urls.static.static
的用法。
聲明
static.static(prefix, view=django.views.static.serve, **kwargs)
幫助函數返回用於在調試模式下提供文件的 URL 模式:
from django.conf import settings
from django.conf.urls.static import static
urlpatterns = [
# ... the rest of your URLconf goes here ...
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
相關用法
- Python staticmethod()用法及代碼示例
- Python staticmethod用法及代碼示例
- Python statistics.median_grouped用法及代碼示例
- Python statistics mean()用法及代碼示例
- Python statistics.median_high用法及代碼示例
- Python statistics.quantiles用法及代碼示例
- Python statistics.correlation用法及代碼示例
- Python statistics.multimode用法及代碼示例
- Python statistics.mean用法及代碼示例
- Python statistics.median用法及代碼示例
- Python statistics.covariance用法及代碼示例
- Python statistics.variance用法及代碼示例
- Python statistics.NormalDist用法及代碼示例
- Python statistics.median_low用法及代碼示例
- Python statistics.mode用法及代碼示例
- Python statistics.linear_regression用法及代碼示例
- Python statistics.pvariance用法及代碼示例
- Python statistics.harmonic_mean用法及代碼示例
- Python Scipy stats.cumfreq()用法及代碼示例
- Python Scipy stats.nanmean()用法及代碼示例
- Python Scipy stats.gengamma()用法及代碼示例
- Python Scipy stats.dweibull()用法及代碼示例
- Python scipy stats.expon()用法及代碼示例
- Python Scipy stats.f()用法及代碼示例
- Python Scipy stats.genexpon()用法及代碼示例
注:本文由純淨天空篩選整理自djangoproject.com大神的英文原創作品 django.conf.urls.static.static。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。