Mercurial > libervia-backend
comparison frontends/src/quick_frontend/quick_blog.py @ 1667:bf67dc424784
quick_frontend (quick_blog): remove tags2mbdata which is replaced by common.iter2dict
author | souliane <souliane@mailoo.org> |
---|---|
date | Tue, 24 Nov 2015 23:42:49 +0100 |
parents | dbac3cb19159 |
children | ad20cedbf25e |
comparison
equal
deleted
inserted
replaced
1666:dbac3cb19159 | 1667:bf67dc424784 |
---|---|
459 COMMENTS_CLS = cls | 459 COMMENTS_CLS = cls |
460 else: | 460 else: |
461 raise ValueError("type_ should be ENTRY or COMMENT") | 461 raise ValueError("type_ should be ENTRY or COMMENT") |
462 if COMMENTS_CLS is None: | 462 if COMMENTS_CLS is None: |
463 COMMENTS_CLS = ENTRY_CLS | 463 COMMENTS_CLS = ENTRY_CLS |
464 | |
465 def tags2mbdata(tags): | |
466 """Build from the tags a dict using the microblog data format. | |
467 | |
468 @param tags (list[unicode]): list of tags | |
469 @return dict | |
470 """ | |
471 data = {} | |
472 count = 0 | |
473 for tag in tags: | |
474 data[('tag#%i' % count) if count else 'tag'] = tag | |
475 count += 1 | |
476 return data |