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
用户评论