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

magic-removal: Manipulator and deletion fixes.

git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@1765 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Robert Wittams
2005-12-22 15:07:36 +00:00
parent 7b7d1e8939
commit 79ad41be03
8 changed files with 173 additions and 113 deletions

View File

@@ -86,4 +86,14 @@ Ella Fitzgerald
Ultimate Ella
>>> a2.release_date
datetime.date(2005, 2, 13)
# Test follow (inline editing) functionality.
>>> follow = {"albums":True}
>>> man = Musician.ChangeManipulator(m1 ,follow=follow)
>>> data = man.flatten_data()
>>> sorted(data.items(), cmp=lambda x,y: cmp(x[0],y[0]))
[('album.0.id', 1), ('album.0.name', 'Ella and Basie'), ('album.0.release_date', ''), ('album.1.id', 2), ('album.1.name', 'Ultimate Ella'), ('album.1.release_date', '2005-02-13'), ('first_name', 'Ella'), ('id', 1L), ('last_name', 'Fitzgerald')]
"""