From bc3aa5364c275ef8964e284a8b8d9483d409a515 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Wed, 20 Aug 2014 09:35:40 +0000 Subject: [PATCH] expand {user} to user of list when creating default lists, #1879 --- pandora/user/views.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pandora/user/views.py b/pandora/user/views.py index b3f8e04c..3768cca6 100644 --- a/pandora/user/views.py +++ b/pandora/user/views.py @@ -167,6 +167,10 @@ def signup(request): for key in ('query', 'public', 'featured'): if key in l: setattr(list, key, l[key]) + if key == 'query': + for c in list.query['conditions']: + if c['key'] == 'user': + c['value'] = c['value'].format(user=user.username) list.save() pos = models.Position(list=list, section='personal', user=user) qs = models.Position.objects.filter(user=user, section='personal')