zoukankan      html  css  js  c++  java
  • openshift django目录结果

    blog
    ├── README.md
    ├── requirements.txt
    ├── setup.py
    ├── static
    ├── wsgi
    │   ├── application
    │   ├── db.sqlite3
    │   ├── __init__.py
    │   ├── manage.py
    │   ├── myblog
    │   │   ├── admin.py
    │   │   ├── __init__.py
    │   │   ├── migrations
    │   │   ├── models.py
    │   │   ├── templates
    │   │   │   ├── home
    │   │   │   │   └── home.html
    │   │   │   └── todolist
    │   │   │   └── index.html
    │   │   ├── tests.py
    │   │   ├── urls.py
    │   │   └── views.py
    │   ├── openshift
    │   │   ├── __init__.py
    │   │   ├── settings.py
    │   │   ├── urls.py
    │   │   └── wsgi.py
    │   └── static
    │        ├── bootstrap.min.css
    │        ├── bootstrap.min.js
    │        ├── db.js
    │        └── jquery-1.11.2.min.js
    └── wsgi.py

    在openshift网站上和本地使用static静态文件(css、js...)

    openshift中的settings.py:

    # Static files (CSS, JavaScript, Images)
    # https://docs.djangoproject.com/en/1.7/howto/static-files/
    STATIC_URL = '/static/'
    if ON_OPENSHIFT:
        STATIC_ROOT = os.path.join(os.environ['OPENSHIFT_REPO_DIR'], 'wsgi', 'static')
    else:
        STATIC_ROOT = os.path.join(BASE_DIR, '..', 'static')
        STATICFILES_DIRS=[BASE_DIR+STATIC_URL]
  • 相关阅读:
    unity-疑难杂症(一)
    unity-【UI】点击交互(一)
    asp.net core 附加进程调试、指令等
    几种定时器(timer)的区别
    ObjectDisplay 对象属性展示 Display
    IEnumerable,ICollection,IList,List 比较
    Excel等格式文件从服务端调用导出
    Azure DevOps 与VS 2019
    从 数据库表 生成 项目实体 文件
    Border样式
  • 原文地址:https://www.cnblogs.com/ibgo/p/4290012.html
Copyright © 2011-2022 走看看