Parent: [d4fe36] (diff)

Child: [ddf08c] (diff)

Download this file

030-set-trove-show_as_skill.py    22 lines (17 with data), 454 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
import re
from allura import model as M
def main():
categories_regex = '|'.join([
'Translations',
'Programming Language',
'User Interface',
'Database Environment',
'Operating System',
'Topic',
])
M.TroveCategory.query.update(
{'fullname': re.compile(r'^(%s)' % categories_regex)},
{'$set': {'show_as_skill': True}},
multi=True)
if __name__ == '__main__':
main()