expand {user} to user of list when creating default lists, #1879

This commit is contained in:
j 2014-08-20 09:35:40 +00:00
parent 83c3490568
commit bc3aa5364c

View file

@ -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')