1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

Implemented an 'atomic' decorator and context manager.

Currently it only works in autocommit mode.

Based on @xact by Christophe Pettus.
This commit is contained in:
Aymeric Augustin
2013-03-04 22:17:35 +01:00
parent 4b31a6a9e6
commit d7bc4fbc94
7 changed files with 430 additions and 23 deletions

View File

@@ -22,4 +22,4 @@ class Reporter(models.Model):
ordering = ('first_name', 'last_name')
def __str__(self):
return "%s %s" % (self.first_name, self.last_name)
return ("%s %s" % (self.first_name, self.last_name)).strip()