摘要:        
local_settings.py import os from pathlib import Path DEBUG = False ALLOWED_HOSTS = ['*'] BASE_BASE_DIR = Path(__file__).resolve().parent.parent.parent    阅读全文
posted @ 2022-09-25 19:38
Sherwin_szw
阅读(107)
评论(0)
推荐(0)
        
            
        
        
摘要:        
第一步:安装git客户端,默认安装在/usr/libexec/git-core目录 yum -y install git #查看版本 git --version 第二步:配置git信息 git config --global user.name "username" git config --glo    阅读全文
posted @ 2022-09-25 19:17
Sherwin_szw
阅读(272)
评论(0)
推荐(0)
        
            
        
        
摘要:        
创建envs目录 mkdir envs 创建虚拟环境 python -m venv django_env 启用虚拟环境 source activate 退出虚拟环境 deactivate 安装包 pip3 install -r requirements.txt    阅读全文
posted @ 2022-09-25 12:38
Sherwin_szw
阅读(35)
评论(0)
推荐(0)
        
            
        
        
摘要:        
升级openssl # 1. 查看当前openssl的版本信息 openssl version #1.0.2 需要升级 # 2. 安装对应的依赖库 sudo yum -y groupinstall "Development tools" sudo yum -y install zlib-devel     阅读全文
posted @ 2022-09-25 12:08
Sherwin_szw
阅读(757)
评论(0)
推荐(0)
        
            
        
        
摘要:        
settings内 。。。 try: from .local_settings import * except Exception as e: print(e) local_settings内 写本地/线上配置 。。。    阅读全文
posted @ 2022-09-25 09:51
Sherwin_szw
阅读(30)
评论(0)
推荐(0)
        
            
        
        
摘要:        
# Byte-compiled / optimized / DLL files __pycache__/ *.py[cod] *$py.class # C extensions *.so # Distribution / packaging .Python build/ develop-eggs/     阅读全文
posted @ 2022-09-25 09:45
Sherwin_szw
阅读(657)
评论(0)
推荐(0)
        
            
        
        
摘要:        
构造 class Connect: def __init__(self): pass def __enter__(self): #链接数据库 return self def __exit__(self,exc_type,exc_val,exc_tb): #关闭数据库 pass def fetchon    阅读全文
posted @ 2022-09-25 08:25
Sherwin_szw
阅读(28)
评论(0)
推荐(0)
        
 
                    
                
 浙公网安备 33010602011771号
浙公网安备 33010602011771号