zoukankan      html  css  js  c++  java
  • 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/'

  • 相关阅读:
    装饰设计模式
    Enum的基本使用
    java根据文件流判断文件类型(后缀名)
    Java正则表达式的用法
    java遍历Map
    java操作json
    struts2+ajax+jquery
    Hibernate注解
    oracle经典建表语句--scott建表
    Struts2 ui标签
  • 原文地址:https://www.cnblogs.com/linn/p/3895544.html
Copyright © 2011-2022 走看看