Some deprecation fixes for django1.4+. Added the ability to add lists to Attribute-stores lists using e.g. obj.db.mylist + [1,2,3,4]

This commit is contained in:
Griatch 2013-04-17 19:43:37 +02:00
parent c943b13351
commit 89c33a9197
7 changed files with 29 additions and 16 deletions

View file

@ -132,6 +132,10 @@ class _SaverList(_SaverMutable, MutableSequence):
super(_SaverList, self).__init__(*args, **kwargs)
self._data = list(*args)
@_save
def __add__(self, otherlist):
self._data = self._data.__add__(otherlist)
return self._data
@_save
def insert(self, index, value):
self._data.insert(index, self._convert_mutables(value))