码农行者 码农行者
首页
  • Python

    • 语言特性
    • Django相关
    • Tornado
    • Celery
  • Golang

    • golang学习笔记
    • 对比python学习go
    • 模块学习
  • JavaScript

    • Javascript
  • 数据结构预算法笔记
  • ATS
  • Mongodb
  • Git
云原生
运维
垃圾佬的快乐
  • 数据库
  • 机器学习
  • 杂谈
  • 面试
关于
收藏
  • 分类
  • 标签
  • 归档
GitHub (opens new window)

DeanWu

软件工程师
首页
  • Python

    • 语言特性
    • Django相关
    • Tornado
    • Celery
  • Golang

    • golang学习笔记
    • 对比python学习go
    • 模块学习
  • JavaScript

    • Javascript
  • 数据结构预算法笔记
  • ATS
  • Mongodb
  • Git
云原生
运维
垃圾佬的快乐
  • 数据库
  • 机器学习
  • 杂谈
  • 面试
关于
收藏
  • 分类
  • 标签
  • 归档
GitHub (opens new window)
  • Django 最佳实践-读书笔记 - 第三章 如何布局 django 项目

    • 建议布局
    • 开发语言
    • Python
    • Best.Practices.for.Django
    DeanWu
    2016-05-22
    目录

    Django 最佳实践-读书笔记 - 第三章 如何布局 django 项目

    其他章节索引页

    # 第三章 如何布局 django 项目

    # 建议布局

    <repository_root>/
        <django_project_root>/
            <configuration_root>/
    
    1
    2
    3
    • repository_root 本层放置文件:

      • README.rst
      • docs/
      • directory
      • .gitignore
      • requirements.txt
    • django_project_root 本目录是django项目根目录

    • configuration_root django项目配置目录

    icecreamratings_project/
        .gitignore
        Makefile
        docs/
        README.rst
        requirements.txt
        icecreamratings/
            manage.py
            media/ # Development ONLY!
            products/
            profiles/
            ratings/
            static/
            templates/
            config/
                __init__.py
                settings/
                urls.py
                wsgi.py
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19

    扩展:

    推荐的 cookiecutter 生成的项目目录:

    mysite
    ├── config
    │   ├── __init__.py
    │   ├── settings
    │   │   ├── common.py
    │   │   ├── __init__.py
    │   │   ├── local.py
    │   │   └── production.py
    │   ├── urls.py
    │   └── wsgi.py
    ├── CONTRIBUTORS.txt
    ├── docs
    │   ├── conf.py
    │   ├── deploy.rst
    │   ├── docker_ec2.rst
    │   ├── index.rst
    │   ├── __init__.py
    │   ├── install.rst
    │   ├── make.bat
    │   └── Makefile
    ├── env.example
    ├── LICENSE
    ├── manage.py
    ├── mysite
    │   ├── contrib
    │   │   ├── __init__.py
    │   │   └── sites
    │   │       ├── __init__.py
    │   │       └── migrations
    │   │           ├── 0001_initial.py
    │   │           ├── 0002_set_site_domain_and_name.py
    │   │           └── __init__.py
    │   ├── __init__.py
    │   ├── static
    │   │   ├── css
    │   │   │   └── project.css
    │   │   ├── fonts
    │   │   ├── images
    │   │   │   └── favicon.ico
    │   │   ├── js
    │   │   │   └── project.js
    │   │   └── sass
    │   │       └── project.scss
    │   ├── templates
    │   │   ├── 404.html
    │   │   ├── 500.html
    │   │   ├── account
    │   │   │   ├── base.html
    │   │   │   ├── email_confirmed.html
    │   │   │   ├── email_confirm.html
    │   │   │   ├── email.html
    │   │   │   ├── login.html
    │   │   │   ├── logout.html
    │   │   │   ├── password_change.html
    │   │   │   ├── password_reset_done.html
    │   │   │   ├── password_reset_from_key_done.html
    │   │   │   ├── password_reset_from_key.html
    │   │   │   ├── password_reset.html
    │   │   │   ├── password_set.html
    │   │   │   ├── signup_closed.html
    │   │   │   ├── signup.html
    │   │   │   ├── verification_sent.html
    │   │   │   └── verified_email_required.html
    │   │   ├── base.html
    │   │   ├── pages
    │   │   │   ├── about.html
    │   │   │   └── home.html
    │   │   └── users
    │   │       ├── user_detail.html
    │   │       ├── user_form.html
    │   │       └── user_list.html
    │   └── users
    │       ├── adapters.py
    │       ├── admin.py
    │       ├── __init__.py
    │       ├── migrations
    │       │   ├── 0001_initial.py
    │       │   └── __init__.py
    │       ├── models.py
    │       ├── tests
    │       │   ├── factories.py
    │       │   ├── __init__.py
    │       │   ├── test_admin.py
    │       │   ├── test_models.py
    │       │   └── test_views.py
    │       ├── urls.py
    │       └── views.py
    ├── pytest.ini
    ├── README.rst
    ├── requirements
    │   ├── base.txt
    │   ├── local.txt
    │   ├── production.txt
    │   └── test.txt
    ├── setup.cfg
    └── utility
        ├── install_os_dependencies.sh
        ├── install_python_dependencies.sh
        ├── requirements.apt
        └── requirements.apt.xenial
    
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    #Django#Django最佳实践
    上次更新: 2023/03/28, 16:27:19
    最近更新
    01
    chromebox/chromebook 刷bios步骤
    03-01
    02
    redis 集群介绍
    11-28
    03
    go语法题二
    10-09
    更多文章>
    Theme by Vdoing | Copyright © 2015-2024 DeanWu | 遵循CC 4.0 BY-SA版权协议
    • 跟随系统
    • 浅色模式
    • 深色模式
    • 阅读模式