add option to add documents to all items in list
This commit is contained in:
parent
8be4b16e48
commit
3ff178ed83
2 changed files with 46 additions and 21 deletions
|
|
@ -17,7 +17,6 @@ from ox.django.fields import DictField, TupleField
|
|||
from archive import extract
|
||||
import managers
|
||||
|
||||
|
||||
class List(models.Model):
|
||||
|
||||
class Meta:
|
||||
|
|
@ -59,6 +58,13 @@ class List(models.Model):
|
|||
self.numberofitems = self.get_numberofitems(self.user)
|
||||
super(List, self).save(*args, **kwargs)
|
||||
|
||||
@classmethod
|
||||
def get(cls, id):
|
||||
id = id.split(':')
|
||||
username = id[0]
|
||||
listname = ":".join(id[1:])
|
||||
return cls.objects.get(user__username=username, name=listname)
|
||||
|
||||
def get_items(self, user=None):
|
||||
if self.query.get('static', False):
|
||||
return self.items
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue