You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
375 B
15 lines
375 B
# coding=utf-8
|
|
import json
|
|
|
|
print 'Вытаскиваю материалы'
|
|
_fixture = json.load(open('fixtures/courses.json'))
|
|
|
|
loader = ('courses.course')
|
|
w = open('fixtures/courses.json', 'w')
|
|
for i in _fixture:
|
|
if i['model'] in loader.keys():
|
|
i['model'] = loader[i['model']]
|
|
|
|
json.dump(_fixture, w)
|
|
w.close()
|
|
print 'Закончил вытаскивание'
|
|
|