load_initial_data.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:tn2 作者: hsoft 项目源码 文件源码
def handle(self, *app_labels, **options):
        if Project.objects.exists():
            print("We already have data. Skip load_initial_data.")
            return
        assert post_save.disconnect(sender=DiscussionComment, dispatch_uid='discussioncomment_was_saved')
        FIXTURES = [
            'pages',
            'emails',
            'articlecategory',
            'patterncategory',
            'sample_data',
        ]
        for fixture in FIXTURES:
            call_command('loaddata', fixture, app_label='tn2app')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号