Beispiel #1
0
 def get(self):
     importer = ImportFromJson(False)
     json_file = json.load(open(config['importer']['json_users_path']))
     importer.create_users(json_file)
     json_file = json.load(open(config['importer']['json_posts_path']))
     importer.create_posts(json_file)
     json_file = json.load(open(config['importer']['json_comments_path']))
     importer.create_comments(json_file)
     json_file = json.load(open(config['importer']['json_tags_path']))
     importer.create_tags(json_file)
     json_file = json.load(open(config['importer']['json_annotations_path']))
     importer.create_annotations(json_file)
     return makeResponse(importer.end_import(), 200)
Beispiel #2
0
 def get(self):
     importer = ImportFromJson(False)
     json_file = json.load(open(config['importer']['json_users_path']))
     importer.create_users(json_file)
     return makeResponse(importer.end_import(), 200)