Django import_export 个性化导出 model 里的 字段含有 choice 的值 models.py class UserProfile(AbstractUser): """ 用户 """ gender_choice = ( ("0", "女"), ... continue reading django zhuoyuebiji 2020/12/8 1194
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running 产生原因: 安装 docker 后没有启动 docker 解决方法1: su root # 先切换到root用户, 再执行以下命令 systemctl enable docker # 开机自动启动docker ... continue reading docker zhuoyuebiji 2021/4/12 1192
Nginx 自定义 502 页面 server conf 配置 server { listen 80; listen 443; server_name www.xieboke ... continue reading nginx zhuoyuebiji 2022/2/17 1181
Django 获取富文本编辑器中的图片地址(缩略图、封面) 开发环境 1. python: 3.6.8 2. django==1.11.22 models.py from django.db import models from django ... continue reading django zhuoyuebiji 2019/7/26 1168
阿里云 docker 镜像仓库拉取 pull 和 推送 push 操作指南 1. 登录阿里云 Docker Registry $ docker login --username=5920*****@qq.com registry.cn-shenzhen.aliyuncs.com 用 ... continue reading docker zhuoyuebiji 2023/7/4 1163
Django admin admin_order_field 自定义字段排序实现方法 模型 # admin.py class CustomerAdmin(admin.ModelAdmin): list_display = ('foo', 'number_of_orders') # models ... continue reading django zhuoyuebiji 2021/5/17 1162
Selenium Firefox geckodriver 下载 从selenium 3.0.0开始,要求 Firefox为48及以上版本。 geckodriver下载:https://github.com/mozilla/geckodriver/releases/ ... continue reading 软件测试 zhuoyuebiji 2018/12/19 1158
Centos7 mysqlclient ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output. 安装环境 django 2.2 centos 7 错误日志 pip install mysqlclient (qingjiu) [root@VM_16_3_centos running]# pip in ... continue reading django zhuoyuebiji 2020/3/30 1157
Ckeditor 上传图片禁止生成缩略图 只需要在 settings.py 里面注释掉:CKEDITOR_IMAGE_BACKEND # CKEDITOR_UPLOAD_PATH = 'ckeditor/' # 他的目录相对与media root 就是 media r ... continue reading django zhuoyuebiji 2019/8/12 1152
Django 如何通过各种网站的 文件验证 1. 先把 验证文件 下载下来 以及 记录验证的链接 2. 然后把 验证文件放到项目的根目录 3. 新建一个 view 用来读取 验证文件的内容,也可以直接把 验证文件的内容 写在变量里 # b ... continue reading django zhuoyuebiji 2019/8/21 1152