django-save-the-change-1.1.0
توضیحات
Automatically save only changed model data.
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | django-save-the-change-1.1.0 |
| نام | django-save-the-change |
| نسخه کتابخانه | 1.1.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Karan Lyons |
| ایمیل نویسنده | karan@karanlyons.com |
| آدرس صفحه اصلی | https://github.com/karanlyons/django-save-the-change |
| آدرس اینترنتی | https://pypi.org/project/django-save-the-change/ |
| مجوز | Copyright 2013 Karan Lyons Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. |
###############
Save The Change
###############
.. image:: https://badge.fury.io/py/django-save-the-change.png
:target: http://badge.fury.io/py/django-save-the-change
.. image:: https://travis-ci.org/karanlyons/django-save-the-change.png?branch=master
:target: https://travis-ci.org/karanlyons/django-save-the-change/
.. image:: https://coveralls.io/repos/karanlyons/django-save-the-change/badge.png?branch=master
:target: https://coveralls.io/r/karanlyons/django-save-the-change
Save The Change takes this:
.. code-block:: pycon
>>> lancelot = Knight.objects.get(name="Sir Lancelot")
>>> lancelot.favorite_color = "Blue"
>>> lancelot.save()
And does this:
.. code-block:: sql
UPDATE "roundtable_knight"
SET "favorite_color" = 'Blue'
Instead of this:
.. code-block:: sql
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.',
Installation
============
Install Save The Change just like everything else:
.. code-block:: bash
$ pip install django-save-the-change
Documentation
=============
Full documentation is available at
`ReadTheDocs <https://django-save-the-change.readthedocs.org/en/latest/>`_.
History
=======
1.1.0 (05/16/2014)
------------------
- Add proper support for ForeignKeys (thanks to Brandon Konkle and
Brian Wilson).
- Add update_together field to model Meta, via UpdateTogetherModel.
1.0.0 (09/08/2013)
------------------
- Initial release.
نحوه نصب
نصب پکیج whl django-save-the-change-1.1.0:
pip install django-save-the-change-1.1.0.whl
نصب پکیج tar.gz django-save-the-change-1.1.0:
pip install django-save-the-change-1.1.0.tar.gz