django的settings.py设置static

DEBUG = True

###############
# STATICFILES #
###############

# A list of locations of additional static files
STATICFILES_DIRS = (
os.path.join(BASE_DIR, “static”),
)

# The default file storage backend used during the build process
STATICFILES_STORAGE = ‘django.contrib.staticfiles.storage.StaticFilesStorage’

# List of finder classes that know how to find static files in
# various locations.
STATICFILES_FINDERS = (
‘django.contrib.staticfiles.finders.FileSystemFinder’,
‘django.contrib.staticfiles.finders.AppDirectoriesFinder’,
# ‘django.contrib.staticfiles.finders.DefaultStorageFinder’,
)

# Absolute path to the directory static files should be collected to.
# Example: “/var/www/example.com/static/”
STATIC_ROOT = None

# URL that handles the static files served from STATIC_ROOT.
# Example: “http://example.com/static/”, “http://static.example.com/”
STATIC_URL = ‘/static/’

木易的技术记录 » django的settings.py设置static

顶 (0)

评论 0

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

置顶文章