摘要: 第一步: nodejs安装 https://nodejs.org/en/download/ 说明安装成功 第二步: cnpm 十分钟上手自己搭建vue项目, 转载: https://www.jianshu.com/p/0c6678671635 由于npm需要很多的依赖包,这些包下载都很慢,所以就有了 阅读全文
posted @ 2019-12-17 16:04 渱尘 阅读(231) 评论(0) 推荐(0) 编辑
摘要: 第一步: python虚拟环境模块介绍 https://www.cnblogs.com/jiangzongyou/p/11962804.html 第二步: 项目搭建 1. 安装虚拟环境,指定使用python36 mkvirtualenv -p C:\Python36\python36.exe Vue 阅读全文
posted @ 2019-12-17 14:44 渱尘 阅读(236) 评论(0) 推荐(0) 编辑
摘要: 第一步: 环境 VMware 15 + centos 7.x + xshell 5 + winscp(传文件用) https://www.cnblogs.com/jiangzongyou/p/12036985.html 第二步: 安装docker 视频地址: https://www.bilibili 阅读全文
posted @ 2019-12-14 15:02 渱尘 阅读(1160) 评论(0) 推荐(0) 编辑
摘要: 第一步: 下载 centos7 http://isoredirect.centos.org/centos/7/isos/x86_64/ 选择阿里云镜像下载,速度最快 注意: 尽量使用下载工具下载, 以避免安装包文件有丢失现象发生. 同时在下载的过程中,应该尽量避免有暂停, 中止等操作, 避免安装包出 阅读全文
posted @ 2019-12-13 19:38 渱尘 阅读(1622) 评论(0) 推荐(0) 编辑
摘要: http协议 8种请求方式:get post head put delete options trace connect get请求的参数(键值对)会放在请求体的第一行的url栏里(路径里) post请求的参数(键值对)会放在请求体的最后 -input标签必须要有name,因为数据的传递必须要有键值 阅读全文
posted @ 2019-12-13 16:10 渱尘 阅读(153) 评论(0) 推荐(0) 编辑
摘要: 需求: 每个老师都只能看到自己的课程 # models.py from django.contrib.auth.models import AbstractUser class UserProfile(AbstractUser): ...... class Courses: teacher = mo 阅读全文
posted @ 2019-12-11 18:20 渱尘 阅读(993) 评论(0) 推荐(0) 编辑
摘要: xadmin表单的自定义布局(重写 get_form_layout()) apps.courses.adminx.py class NewCoursesAdmin(object): list_display = ['name', 'desc', ...] search_fields = ['name 阅读全文
posted @ 2019-12-10 18:13 渱尘 阅读(849) 评论(0) 推荐(0) 编辑
摘要: users.views.py from django.contrib.auth.backends import ModelBackend from django.db.models import Q class CustomAuth(ModelBackend): def authenticate(s 阅读全文
posted @ 2019-12-09 17:35 渱尘 阅读(164) 评论(0) 推荐(0) 编辑
摘要: 图片上传的配置 image = models.ImageField(upload_to='org/%Y/%m',...) upload_to默认是上传到项目的'MEDIA_ROOT/org/%Y/%m'的,但此时若没有进行全局的MEDIA_ROOT配置,那就会在根目录下生成org文件夹 无论任何时候 阅读全文
posted @ 2019-12-06 15:21 渱尘 阅读(358) 评论(0) 推荐(0) 编辑
摘要: 静态文件,常用在head中,可动态的去检索settings里面的STATIC_URL = '/static/',然后做拼接settings.py中 STATIC_URL = '/static9/' # 9只是为了方便说明问题 STATICFILES_DIRS = [ os.path.join(BAS 阅读全文
posted @ 2019-12-04 11:38 渱尘 阅读(2445) 评论(0) 推荐(0) 编辑