From d39d66c112366e24791dc1c3b3bb2654e677dde3 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Sun, 16 Jan 2011 00:57:44 +0000 Subject: [PATCH] use / as list delimiter --- pandora/item/managers.py | 2 +- pandora/itemlist/models.py | 2 +- pandora/itemlist/views.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pandora/item/managers.py b/pandora/item/managers.py index 187878ab1..b8d36bb10 100644 --- a/pandora/item/managers.py +++ b/pandora/item/managers.py @@ -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: diff --git a/pandora/itemlist/models.py b/pandora/itemlist/models.py index 75edd85ae..d51a8d8c9 100644 --- a/pandora/itemlist/models.py +++ b/pandora/itemlist/models.py @@ -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 diff --git a/pandora/itemlist/views.py b/pandora/itemlist/views.py index 6c629dadf..3cf9aa59f 100644 --- a/pandora/itemlist/views.py +++ b/pandora/itemlist/views.py @@ -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):