Launch django app without django.contrib.admin

I am trying to start a Django application without the Django admin panel, because I do not need it right now, but I get the exception value:

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

Can I run the application without django.contrib.admin? Even if you go to mine localhost:8000, do you need to add django.contrib.adminto your installed_apps?

+4
source share
2 answers

django.contrib.admin is just a Django app.

Delete or comment django.contrib.adminout INSTALLED_APPSin the file settings.py.

from django.contrib import admin admin.py', urls.py , .

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

+6

.

#url(r'^admin/', include(admin.site.urls)), urls.py, .

+1

Source: https://habr.com/ru/post/1613694/


All Articles