pg django jsonb:在Django中使用Postgres的JSONB字段 源码
Django + Postgres JSONB 启动容器: docker-compose up -d运行迁移: docker-compose exec web python manage.py migrate输入Python shell: docker-compose exec web python manage.py shell运行模型命令: from pgdjangojsonb . models import Profile # Get all Profiles: Profile . objects . all () # Create a Profile without preferences: p = Profile ( name = "Sam" , preferences = {}) p . save () # Create a Profile with preferences
文件列表
pg-django-jsonb-main.zip
(预估有个19文件)
pg-django-jsonb-main
Dockerfile
146B
pgdjangojsonb
models.py
236B
migrations
__pycache__
__init__.cpython-38.pyc
133B
0001_initial.cpython-38.pyc
761B
__init__.py
0B
0001_initial.py
615B
暂无评论