Django admin 注册多个app

class game(models.Model):

    content = models.TextField()

    def __str__(self):
        return 'To game %s' % self.game.title
    class Meta:


        verbose_name = '答案'
        verbose_name_plural = '答案'
        

class GameAdmin(admin.ModelAdmin):


    list_display = (

        "content",


                    )
admin.site.register(game,GameAdmin)
必须每个appp,admin.site.register注册一下,才能显示


posted @ 2016-08-25 00:08  编程青年的崛起  阅读(2558)  评论(0编辑  收藏  举报