0

From the django admin page, I wanted to remove a section of an app. At first, the admin.py had this contents:

admin.site.register(MyUser)

So I changed it to be:

admin.site.unregister(MyUser)

and it caused Internal Server Error.

What should I do to remove the section of account app from the admin page?

4

1 回答 1

1

只是不要在其中注册您的模型,admin.py它将从管理页面中“删除”。注释或删除此行而不是更改它:

# admin.site.register(MyUser)
于 2015-01-14T07:08:04.540 回答