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