keep order of fields in profile

This commit is contained in:
Romain Bignon 2010-11-20 13:20:35 +01:00
commit aab127a4a2

View file

@ -17,6 +17,7 @@
from weboob.backends.aum.pages.base import PageBase
from weboob.tools.ordereddict import OrderedDict
from copy import deepcopy
from logging import warning
@ -124,51 +125,56 @@ class FieldParticularSignes(FieldBase):
d['freckle'] = True
class ProfilePage(PageBase):
empty_table = {'details': {'old': 0,
'birthday': (0,0,0),
'zipcode': 0,
'location': '',
'country': '',
'eyes': '',
'hairs': [],
'height': 0,
'weight': 0,
'BMI': 0,
'fat': '',
'from': '',
'tatoos': False,
'piercing': False,
'freckle': False,
'glasses': False,
'job': '',
'style': '',
'alimentation': '',
'alcool': '',
'tabac': '',
},
'liking': {'activities': '',
'music': [],
'cinema': [],
'books': [],
'tv': [],
},
'sex': {'underwear': [],
'top': [],
'bottom': [],
'interval': '',
'favorite': [],
'practices': [],
'toys': [],
},
'personality': {'snap': '',
'exciting': '',
'hate': '',
'vices': '',
'assets': '',
'fantasies': '',
'is': [],
},
}
empty_table = OrderedDict((
('details', OrderedDict((
('old', 0),
('birthday', (0,0,0)),
('zipcode', 0),
('location', ''),
('country', ''),
('eyes', ''),
('hairs', []),
('height', 0),
('weight', 0),
('BMI', 0),
('fat', ''),
('from', ''),
('tatoos', False),
('piercing', False),
('freckle', False),
('glasses', False),
('job', ''),
('style', ''),
('alimentation', ''),
('alcool', ''),
('tabac', ''),
))),
('liking', OrderedDict((
('activities', ''),
('music', []),
('cinema', []),
('books', []),
('tv', []),
))),
('sex', OrderedDict((
('underwear', []),
('top', []),
('bottom', []),
('interval', ''),
('favorite', []),
('practices', []),
('toys', []),
))),
('personality', OrderedDict((
('snap', ''),
('exciting', ''),
('hate', ''),
('vices', ''),
('assets', ''),
('fantasies', ''),
('is', []),
))),
))
tables = {'tab_0': 'details',
'tab_1': 'liking',