修改urls.py文件,将下面蓝色注释前面的#去掉,即改为:
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
# Uncomment this for admin:
(r'^admin/', include('django.contrib.admin.urls')),
去掉注释。
本文指导如何在Django项目中修改urls.py文件,启用后台管理系统,包括注释去除步骤及具体代码实现。
修改urls.py文件,将下面蓝色注释前面的#去掉,即改为:
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
# Uncomment this for admin:
(r'^admin/', include('django.contrib.admin.urls')),
去掉注释。

被折叠的 条评论
为什么被折叠?