简体   繁体   English

数据库表未显示在django admin中

[英]Database table doesnt show up in django admin

I'm new to django and I'm wondering why the database table I created with django models won't show up on the admin page. 我是django的新手,我想知道为什么用django模型创建的数据库表不会显示在管理页面上。

Here's what I did in a bash window. 这是我在bash窗口中所做的事情。 在此处输入图片说明

And my admin page. 还有我的管理页面。 在此处输入图片说明

It seems the Cards table has been created but I don't see the table on my admin page and I want to know why. 似乎Cards表已创建,但我在管理页面上看不到该表,我想知道为什么。 Any advice will be much appreciated. 任何建议将不胜感激。

You have to enter your table name in admin.py file like this 您必须像这样在admin.py文件中输入表格名称

from django.contrib import admin
admin.site.register(ModelName)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM