- 博客(8)
- 收藏
- 关注
原创 django 多表联查
一对多name = Blog.objects.get(name='a').test.all()l = []for n in name : l.append(n.headline)return HttpResponse(l)class Blog(models.Model): name = models.CharField(max_length=100) ...
2019-05-26 17:48:37 875
转载 django去重
user_courses = BrandMapping.objects.all()user_courses = user_courses.values('brand_name').distinct()
2019-05-13 13:48:08 2141
原创 问题:使用systemctl start nginx.service启动nginx,出现Job for nginx.service failed because the control process
问题:使用systemctl start nginx.service启动nginx,出现Job for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "journalctl -xe" for details.解决:...
2019-05-08 15:30:10 9137
原创 前端部署
需要前端先打包成【cnpm run build】压缩build.zip上传到/home/ubuntu/tmp/testReact 【随便一个,但是后面的location的地址要对应上】在解压unzipbuild.zip 解压之后进入build 然后 mv * ../就是把build解压之后的内容都移到上一级目录sudo apt-get install build-essentialsu...
2019-05-06 19:38:03 411
转载 后期看看
npm cachehttps://jingyan.baidu.com/article/574c52197e42b96c8d9dc115.htmlsudo apt-get install nodejssudo apt install nodejs-legacysudo apt install npm# apt-get update# apt-get install -y p...
2019-05-06 10:52:27 176
原创 去掉数据库字段的的空格
update test_qu_diao_kongge set StdOE=replace(StdOE,' ',''); uuid【生成不重复的id】import uuidid = uuid.uuid1()
2019-05-05 22:02:45 3037
原创 ubuntu Python3包的位置上[django.core.exceptions.ImproperlyConfigured: mysqlclient 1.3.3 or newer is re]
先找到django的位置 然后在按照下面的路径 遇到两次这个问题,但是位置都不一样,切记【可以先下载django,如果有的话,会提示diango在那个文件夹已经存在,进去之后/django/db/backends/mysq会有一个base.py将文件中的如下代码注释if version < (1, 3, 3): raise ImproperlyConfigured(...
2019-05-04 17:45:11 562
转载 下载python和更改优先级
https://www.cnblogs.com/yjlch1016/p/8641910.htmlsudo apt-get remove python3-pip【卸载pip3】sudo add-apt-repository ppa:jonathonf/python-3.6按Enter确认输入命令sudo apt-get update输入命令sudo apt-get install...
2019-05-04 13:52:40 544
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人