Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for plan in plans:
- feature_name = "feature name"
- data = features.get(feature_name)
- if data is None:
- features[feature_name] = [ plan.feature_object_data ]
- else:
- features[feature_name].append(plan.feature_object_data)
- pass
- ''' dictionary of feature names
- '''
- features = {
- "feature name" : [ # a list, *.append(...)
- # append the corresponding plan feature data
- # - it can be the feature code or the feature object
- ],
- ...
- }
- <!--- HTML -->
- <tal:loop repeat="planids plan_ids">
- <!-- column header -->
- <tal:x tal:define="idx repeat/plan_ids/index;
- values features/values;
- values python:(values.reverse(), values)[1]">
- <div style="float:left"
- class="plan-column"
- tal:repeat="feature_object python:values[idx]">
- <div tal:content="feature_object/name">feature name</div>
- </div>
- </tal:x>
- </tal:loop>
Add Comment
Please, Sign In to add comment