一.Dgango 流程
一、注册app
python3 manage.py startapp products
二、在app里面的models设计模型类
1、生成迁移文件 python3 manage.py makemigrations
2、执行迁移文件 在数据库里面生成对应的表 python3 manage.py migrate
三、创建超级用户
1、python3 manage.py createsuperuser
在admin里面注册模型类
四、视图
1、定义视图函数
2、进行Url 配置
调试
python3 manage.py shell
写入数据
from polls.models import UpdataStore
b = UpdataStore()
b.store_id = “dgangotest”
b.store_name = “dgango_name”
b.pages = 3
b.save()
使用现成的表
python3 manage.py inspectdb
jquery
Django:bootstrap table自定义查询实现
https://www.cnblogs.com/gcgc/p/11139530.html
https://blog.csdn.net/weixin_34029949/article/details/85860264
https://www.wandouip.com/t5i394210/
https://www.cnblogs.com/liaojiafa/p/6474181.html
[{“store_id”: “dgangotest”, “store_name”: “dgango_name”, “pages”: 4}, {“store_id”: “A1Q9Q1EHB0XK1A”, “store_name”: “MPFProducts”, “pages”: 2}, {“store_id”: “dgango_test_1”, “store_name”: “2”, “pages”: 3}, {“store_id”: “dgango_test_2”, “store_name”: “dfgh”, “pages”: 3}, {“store_id”: “dgango_test_3”, “store_name”: “tkkiy”, “pages”: 3}, {“store_id”: “tyui”, “store_name”: “2”, “pages”: 3}]
mysql 启动 net start mysql
关闭 net stop mysql
登录 mysql -uroot -p
创建数据库 create database bj18 charset=utf8;
展示数据库 show databases;
使用数据库 use bj18;
查看表 show tables;
查询 select ASIN,STORE_ID,PRODUCT_NAME from store_asins_info where FIND_IN_SET(ASIN,‘B00SWCQHZU,B00YBS6MBS’);