use / as list delimiter
This commit is contained in:
parent
9044cdf9c2
commit
85fd98e5c0
3 changed files with 3 additions and 3 deletions
|
@ -83,7 +83,7 @@ def parseCondition(condition):
|
|||
return q
|
||||
elif key_type == 'list':
|
||||
q = Q(itemId=False)
|
||||
l = v.split(".")
|
||||
l = v.split("/")
|
||||
if len(l) == 2:
|
||||
lqs = list(List.objects.filter(name=l[1], user__username=l[0]))
|
||||
if len(lqs) == 1:
|
||||
|
|
|
@ -64,7 +64,7 @@ class List(models.Model):
|
|||
return self.get_id()
|
||||
|
||||
def get_id(self):
|
||||
return u'%s.%s' % (self.user.username, self.name)
|
||||
return u'%s/%s' % (self.user.username, self.name)
|
||||
|
||||
def editable(self, user):
|
||||
#FIXME: make permissions work
|
||||
|
|
|
@ -13,7 +13,7 @@ from item import utils
|
|||
from item.models import Item
|
||||
|
||||
def get_list_or_404_json(id):
|
||||
username, listname = id.split('.')
|
||||
username, listname = id.split('/')
|
||||
return get_object_or_404_json(models.List, user__username=username, name=listname)
|
||||
|
||||
def _order_query(qs, sort):
|
||||
|
|
Loading…
Reference in a new issue