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. Linux学习 --- 系统网络配置

    前言 : 如果一台计算机想接入互联网,必须配置好IP地址,子网掩码,网关,DNS服务器.在Linux系统中,这些信息都可以修改对应的配置文件来进行配置.临时配置一下网络可以使用一些简单的命令来进行配置 ...

  2. .Net最小工作线程对应用程序性能的影响

    这要从Asp.Net建立连接的机制说起,Asp.Net建立连接依赖于.Net线程池,线程池的大小决定了应用程序最多可以同时执行的请求数量.maxWorkerThreads最大工作线程,决定单个处理器最 ...

  3. go 处理json

    在云原生的相关技术中, 调用 kafka 和 es等中间件,返回的结果大多是 json 格式,因此我们需要频繁的对 json 进行操作. 在go这种强类型的语言中,不同于 python 和 nodej ...

  4. aws note

    Amazon EC2 Instance Types https://aws.amazon.com/ec2/instance-types/ My courses - AWS Skill Builder ...

  5. kubernetes:v1.25 + containerd

    由于kubernets从v1.24开始停止支持dockershim,kubernets不再支持通过docker来创建和管理容器.本文记录安装kubernetes v1.25 + containerd ...

  6. ts的接口和泛型的基本语法

    一.接口 1.接口定义 接口是一种规范的定义,它定义行为和规范,在程序设计中接口起到限制和规范的作用. 2.接口的声明与使用 //声明对象类型接口 interface Person {   name: ...

  7. cpp chrono basic

    // cpp 20 //c++ - Number of seconds since midnight - Stack Overflow //https://stackoverflow.com/ques ...

  8. 使用shell定时执行脚本

    yum install crontabs //安装 #检查安装crontab -V #服务操作service crond start //启动服务service crond stop //关闭服务se ...

  9. thinkphp6+composer+无集成工具 配置php项目环境

    安装composer 下载地址:https://getcomposer.org/Composer-Setup.exe 安装步骤 点击finish完成即可. 打开cmd输入composer查看是否安装成 ...

  10. 基于Axi4_lite的UART串口Verilog代码实现

    UART是通用异步收发传输器(Universal Asynchronous Receiver/Transmitter),通常称作UART,是一种异步收发传输器,是设备间进行异步通信的关键模块.UART ...