仅自动保存更改的模型数据。

otree-save-the-change的Python项目详细描述


https://img.shields.io/pypi/v/django-save-the-change.svghttps://travis-ci.org/karanlyons/django-save-the-change.svg?branch=masterhttps://codecov.io/github/karanlyons/django-save-the-change/coverage.svg?branch=master

保存更改如下:

>>> lancelot=Knight.objects.get(name="Sir Lancelot")>>> lancelot.favorite_color="Blue">>> lancelot.save()

这样做:

UPDATE"roundtable_knight"SET"favorite_color"='Blue'

而不是这个:

UPDATE"roundtable_knight"SET"name"='Sir Lancelot',"from"='Camelot',"quest"='To seek the Holy Grail.',"favorite_color"='Blue',"epithet"='The brave',"actor"='John Cleese',"full_name"='John Marwood Cleese',"height"='6''11"',"birth_date"='1939-10-27',"birth_union"='UK',"birth_country"='England',"birth_county"='Somerset',"birth_town"='Weston-Super-Mare',"facial_hair"='mustache',"graduated"=true,"university"='Cambridge University',"degree"='LL.B.',

安装

安装并保存更改,与其他操作一样:

$ pip install django-save-the-change

文档

完整的文档可在 ReadTheDocs

历史

1.1.0(2014年5月16日)

  • Add proper support for ForeignKeys (thanks to Brandon Konkle and Brian Wilson).
  • Add update_together field to model Meta, via UpdateTogetherModel.

1.0.0(2013年8月9日)

  • Initial release.

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java与Groovy正则表达式匹配混淆   java控制台未定义为JSNI   主目录中的java指针异常   java如何获取hashmap中的arrayList的大小   ApachePOI用于文本,Java代码中的word doc(.docx)中没有进行追加   Ruby对象到Java对象   JavaSpringJPA哈希集只返回一个值   Java在执行由配置了精确类路径参数的mavenjarpluin生成的可执行jar时无法找到依赖项   java我试图在画布上写一个文本,但什么也没发生   java HTTP 404源服务器找不到目标资源的当前表示形式,或者不愿意透露存在该表示形式。不起作用   java提取小数点后的最后一个数字   oop Java:无法访问对象的元素   PHP URL中RecyclerView中的java句柄空异常   不调用OnCreateViewHolder的java Update RecyclerView适配器项