在每个app目录下有个admin.py,使用这个文件可以对其app进行控制。步骤如下:
1) 先在settings里对其进行注册
这里在myblog\myblog\settings.py > INSTALLED_APPS里把APP名添加进去
INSTALLED_APPS = [ # 'blog.apps.BlogConfig', #注册APP应用 'blog', 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', ]
标签:4.2,admin,app,Django,myblog,contrib,django From: https://www.cnblogs.com/baihuitestsoftware/p/17588364.html