ContentType matching query does not exist on post_syncdb
问题 I am trying to add add some data to the database as soon as tables are created, using the post_syncdb signal. signals.post_syncdb.connect(init) Then in the init function, I want to set permission, so I use ct = ContentType.objects.get(app_label='news', model='Article') Permission(name='Approve articles', codename='can_approve_article', content_type=ct) But if I drop all the tables and run syncdb , I get ... File "...\base\functions\init.py", line 11, in init ct = ContentType.objects.get(app