1 local_settings

第一步:需要在项目根目录下的settings配置如下

try:
from .local_settings import *
except Exception:
pass

第二步:在项目目录下创建local_settings.py文件

2 .gitignore

可以在github上自己去下载.gitignore文件,也可以拷贝如下:

.gitignore
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class # C extensions
*.so # Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST # PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec # Installer logs
pip-log.txt
pip-delete-this-directory.txt # Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/ # Translations
*.mo
*.pot # Django stuff:
*.log
day06/local_settings.py
db.sqlite3
db.sqlite3-journal # Flask stuff:
instance/
.webassets-cache # Scrapy stuff:
.scrapy # Sphinx documentation
docs/_build/ # PyBuilder
.pybuilder/
target/ # Jupyter Notebook
.ipynb_checkpoints # IPython
profile_default/
ipython_config.py # pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version # pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock # poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock # pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm.fming.dev/#use-with-ide
.pdm.toml # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/ # Celery stuff
celerybeat-schedule
celerybeat.pid # SageMath parsed files
*.sage.py # Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/ # Spyder project settings
.spyderproject
.spyproject # Rope project settings
.ropeproject # mkdocs documentation
/site # mypy
.mypy_cache/
.dmypy.json
dmypy.json # Pyre type checker
.pyre/ # pytype static type analyzer
.pytype/ # Cython debug symbols
cython_debug/ # PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/

20 local_settings文件配置 && .gitignore的更多相关文章

  1. .gitignore文件配置以及gitee提交报Push rejected...错误解决

    .gitignore文件配置 .gitignore 文件可以用来忽略被指定的文件或文件夹的改动.记录在.gitignore文件里的文件或文件夹是不会被 git 跟踪到,也就是被忽略的文件是不会被上传到 ...

  2. git config --global core.excludesfile配置gitignore全局文件

    Linux中,这时把全局要忽略的文件列表.gitignore放当前用户根目录下: git config --global core.excludesfile '~/.gitignogtire' Win ...

  3. Android Studio 减小项目文件夹的大小和.gitignore文件配置

    Build --> Clean Project 可以清理出很大一部分的空间 手动删除以下文件或者目录 Dir : ProjectFolder/buildDir : ProjectFolder/a ...

  4. 码源中国.gitignore忽略文件配置

    码源中国.gitignore忽略文件配置 ## Ignore Visual Studio temporary files, build results, and ## files generated ...

  5. iOS日常学习 - 如何配置.gitignore文件

    文章为转载学习,原文地址 为什么要配置.gitigore 在我们使用git的过程当中,不是任何文件都需要commit到本地或者远程仓库的,比如一些三方库文件. 那么作为一个git新手,很多人不知道如何 ...

  6. web.xml 文件配置01

    web.xml 文件配置01   前言:一般的web工程中都会用到web.xml,方便开发web工程.web.xml主要用来配置Filter.Listener.Servlet等.但是要说明的是web. ...

  7. git正确的删除远程仓库的文件并用.gitignore忽略提交此文件

    我向远程仓库提交了如下文件src/ pom.xml target/ WebContent/,发现没必要提交target目录. 于是做了如下操作: git rm -r --cached target g ...

  8. 规范开发目录 及 webpack多环境打包文件配置

    规范开发目录 普通项目 开发目录: ├── project-name ├── README.md ├── .gitignore ├── assets ├── ├── js ├── ├── css ├─ ...

  9. Django(五)框架之模板继承和静态文件配置

    https://www.cnblogs.com/haiyan123/p/7731959.html 一.模板继承 目的是:减少代码的冗余 语法: {% block classinfo %} {% end ...

  10. Spring读取外部的资源配置文件—@PropertySource和@Value实现资源文件配置

    通过@PropertySource可以指定读取的配置文件,通过@Value注解获取值: @PropertySource注解主要是让Spring的Environment接口读取属性配置文件用的,标识在@ ...

随机推荐

  1. SQL Server 2012主从数据库的订阅和发布,实现数据库读写分离(主从备份)

    学习:https://www.bilibili.com/video/BV13B4y1h7Wu?p=12&spm_id_from=pageDriver&vd_source=3f21d2e ...

  2. (原创)odoo中字段默认值的获取顺序

    odoo中某个字段的默认值的取值顺序 1.搜索当前记录集(recordset)中的context中是否存在"default_字段名"的键,如果存在则取值 2.搜索模型(ir.def ...

  3. 摄像头的MIPI接口、DVP接口和CSI接口

    电脑摄像头接口是USB接口,智能手机的摄像头接口是MIPI接口,还有一部分的摄像头(比如说某些支持DVP接口的硬件)是DVP接口. USB是串行通用串行总线(Universal Serial Bus) ...

  4. 达芬奇18.1.2安装包下载+软件详细破解安装教程(Win&Mac)

    DaVinci Resolve v18.1.2是一款在同一个软件工具中,将剪辑.调色.视觉特效.动态图形和音频后期制作融于一身的解决方案!它采用美观新颖的界面设计,易学易用,能让新手用户快速上手操作, ...

  5. C# List提取类中某列保存成新list

    例如,将oldList中的ID列提取出来存放到newList中: List<ushort> newList = new List<ushort>(oldList.Select( ...

  6. eKuiper 1.8.0 发布:零代码实现图像/视频流的实时 AI 推理

    LF Edge eKuiper 是 Golang 实现的轻量级物联网边缘分析.流式处理开源软件,可以运行在各类资源受限的边缘设备上.eKuiper 的主要目标是在边缘端提供一个流媒体软件框架(类似于 ...

  7. zuoye(借鉴)

  8. elasticsearch组件

    elasticsearch组件 Elasticsearch 是一个实时的分布式搜索分析引擎,它能让你以前所未有的速度和规模,去探索你的数据. 它被用作全文检索.结构化搜索.分析以及这三个功能的组合 E ...

  9. 【情景题】NPDP经典题目(上)

    [情景题]NPDP经典题目(上) 1.一家玩具生产企业正在为10-12岁的儿童开发一种"动力车".潜在风险:尽管该公司在玩具市场有着丰富的经验,但是这些经验主要是针对5岁以下儿童玩 ...

  10. docker nginx 配置

    1.下载镜像 docker pull nginx2宿主机器建立目录/docker/nginx/conf.d 这个目录下面新建 default.conf upstream tomcat77{ serve ...