dont split if . is escaped in key
This commit is contained in:
parent
3a5f49af05
commit
56c156d3f6
1 changed files with 2 additions and 1 deletions
|
@ -2,6 +2,7 @@
|
||||||
# vi:si:et:sw=4:sts=4:ts=4
|
# vi:si:et:sw=4:sts=4:ts=4
|
||||||
import random
|
import random
|
||||||
random.seed()
|
random.seed()
|
||||||
|
import re
|
||||||
|
|
||||||
from django import forms
|
from django import forms
|
||||||
from django.contrib.auth.models import User
|
from django.contrib.auth.models import User
|
||||||
|
@ -514,7 +515,7 @@ def setPreferences(request):
|
||||||
return
|
return
|
||||||
'''
|
'''
|
||||||
data = json.loads(request.POST['data'])
|
data = json.loads(request.POST['data'])
|
||||||
keys = data.keys()[0].split('.')
|
keys = re.sub('([^\\\\])\.', '\\1\n', data.keys()[0]).split('\n')
|
||||||
value = data.values()[0]
|
value = data.values()[0]
|
||||||
profile = request.user.get_profile()
|
profile = request.user.get_profile()
|
||||||
p = profile.preferences
|
p = profile.preferences
|
||||||
|
|
Loading…
Reference in a new issue