Run django application without django.contrib.admin
Asked Answered
P

2

12

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:

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

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?

Phraseology answered 29/10, 2015 at 17:29 Comment(1)
Can you show your URLs file? I believe by default Django includes the admin urls now.Jacal
S
22

django.contrib.admin is simply a Django app.

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

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

Remove url(r'^admin/', include(admin.site.urls) from urlpatterns in urls.py.

Selhorst answered 29/10, 2015 at 17:43 Comment(0)
P
0

I have resolved this issue.

I had #url(r'^admin/', include(admin.site.urls)), in my urls.py which I just commented out.

Phraseology answered 29/10, 2015 at 17:40 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.