This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

django-object-utils

This small library provides helpers for updating Django model objects without race conditions.

Installation

pip install django-object-utils

Usage

from django_object_utils import reload_object, update_object, lock_object

user = User.objects.get(pk=1)

# Reload object in-place with the latest version from the database
reload_object(user)

# Run SQL UPDATE for certain fields only and update the Python object
update_object(user, username='john', email='john@gmail.com')

# Run SQL UPDATE and then reload the object from the database
update_object(user, balance=F('balance')+payment, reload=True)

if request.method == 'POST':
        with transaction.atomic():
                # Enter a critical section and ensure that the object is the latest version.
                # Use the corresponding database row as the synchronization monitor.
                lock_object(user)
                form = UserForm(data=request.POST)
                form.save()
Release History

Release History

0.0.1

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
django-object-utils-0.0.1.tar.gz (1.8 kB) Copy SHA256 Checksum SHA256 Source Jul 15, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting