Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/karanlyons/django-save-the-change
Your DB Got It the First Time.
https://github.com/karanlyons/django-save-the-change
django orm python
Last synced: 3 months ago
JSON representation
Your DB Got It the First Time.
- Host: GitHub
- URL: https://github.com/karanlyons/django-save-the-change
- Owner: karanlyons
- License: other
- Created: 2013-08-30T21:56:45.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2022-11-22T01:27:52.000Z (almost 2 years ago)
- Last Synced: 2024-04-27T06:06:05.839Z (6 months ago)
- Topics: django, orm, python
- Language: Python
- Homepage: http://django-save-the-change.readthedocs.io
- Size: 468 KB
- Stars: 110
- Watchers: 7
- Forks: 28
- Open Issues: 10
-
Metadata Files:
- Readme: README.rst
- Changelog: HISTORY.rst
- License: LICENSE
Awesome Lists containing this project
- starred-awesome - django-save-the-change - Your DB Got It the First Time. (Python)
README
###############
Save The Change
###############.. image:: https://img.shields.io/pypi/v/django-save-the-change.svg
:target: https://pypi.python.org/pypi/django-save-the-change
.. image:: https://travis-ci.org/karanlyons/django-save-the-change.svg?branch=master
:target: https://travis-ci.org/karanlyons/django-save-the-change
.. image:: https://codecov.io/github/karanlyons/django-save-the-change/coverage.svg?branch=master
:target: https://codecov.io/github/karanlyons/django-save-the-changeSave 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 `_.