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

Save The Change takes this:

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

And does this:

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

Instead of this:

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:

$ pip install django-save-the-change

Documentation

Full documentation is available at ReadTheDocs.

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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

otree-save-the-change-2.0.0.tar.gz (7.6 kB view details)

Uploaded Source

File details

Details for the file otree-save-the-change-2.0.0.tar.gz.

File metadata

File hashes

Hashes for otree-save-the-change-2.0.0.tar.gz
Algorithm Hash digest
SHA256 37d05a7d16b1a9a5a5e2d9f4c032bfdf87f35cd750369add18e478984df98c19
MD5 8eec1ec405b1a4796105aa37aa2c9903
BLAKE2b-256 be55bde9141d81216647d5536fd92153da1dd1f3e8c16c7bbb88211951cdeebc

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

2.0.0 This release

1 file

1.1.3

1 file

1.1.2

1 file

1.1.1

1 file

1.1.0

1 file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page