How to correct this error: “'Adminsite' object has no attribute 'root'”

后端 未结 2 452
迷失自我
迷失自我 2021-02-01 15:56

The full error message is:

AttributeError on running Django app on apache as localhost -- \'Adminsite\' object has no attribute \'root\'

2条回答
  •  旧时难觅i
    2021-02-01 16:42

    Your url for admin should be:
    url(r'^admin/', include(admin.site.urls))
    not (r'^admin/(.*)', admin.site.root)
    - it's for Django 1.0. For Django 1.3 it wouldn't work.

提交回复
热议问题