refactoring (intermediate state)
This commit is contained in:
parent
164961e562
commit
1f2bfe2f76
16 changed files with 206 additions and 169 deletions
|
|
@ -39,7 +39,7 @@ class UserProfile(models.Model):
|
|||
for key in new:
|
||||
if isinstance(new[key], dict) and key in ui:
|
||||
ui[key] = updateUI(ui[key], new[key])
|
||||
else:
|
||||
elif isinstance(ui, dict):
|
||||
ui[key] = new[key]
|
||||
return ui
|
||||
ui = updateUI(ui, self.ui)
|
||||
|
|
|
|||
|
|
@ -566,7 +566,7 @@ def setUI(request):
|
|||
if request.user.is_authenticated():
|
||||
profile = request.user.get_profile()
|
||||
for key in data:
|
||||
keys = key.split('|')
|
||||
keys = re.sub('([^\\\\])\.', '\\1\n', key).split('\n')
|
||||
value = data[key]
|
||||
p = profile.ui
|
||||
while len(keys)>1:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue