在没有django.contrib.admin的情况下运行django应用程序 [英] Run django application without django.contrib.admin

查看:238
本文介绍了在没有django.contrib.admin的情况下运行django应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在没有Django管理面板的情况下运行Django应用程序,因为我现在不需要它,但是得到了异常值:

I am trying to run my Django Application without Django admin panel because I don't need it right now but getting an exception value:


在您的INSTALLED_APPS设置中放入 django.contrib.admin,以便
使用管理应用程序。

Put 'django.contrib.admin' in your INSTALLED_APPS setting in order to use the admin application.

可以我在没有 django.contrib.admin 的情况下运行了我的应用程序?即使去我的 localhost:8000 ,它显示您需要在您的install_apps中添加 django.contrib.admin 吗? / p>

Could I ran my application without django.contrib.admin ? Even if go my localhost:8000 it is showing you need to add django.contrib.admin in your installed_apps?

推荐答案

django.contrib.admin 仅仅是Django应用。

django.contrib.admin is simply a Django app.

INSTALLED_APPS 中删除​​或评论 django.contrib.admin settings.py 文件。

Remove or comment django.contrib.admin from INSTALLED_APPS in settings.py file.

还可以从django.contrib import admin中删除或评论 admin.py' urls.py 和所有具有此导入语句的文件。

Also remove or comment from django.contrib import admin from admin.py',urls.py and all the files having this import statement.

从<$ c删除 url(r'^ admin /',include(admin.site.urls)

这篇关于在没有django.contrib.admin的情况下运行django应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆