相关疑难解决方法(0)

访问管理站点时,'str'对象没有属性'resolve'

我一直收到这个错误:'str'对象没有属性'resolve'

当试图访问django管理站点时,我无法弄清楚原因.我的项目中的应用程序有自己的admin.py文件.这会导致它吗?这是我的urls.py:

from django.conf.urls.defaults import *
import settings
from django.contrib.auth.views import login, logout
from views import index, simple, complex
from django.views.generic.simple import direct_to_template

# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
    # Example:
    # (r'^django_jchat/', include('django_jchat.foo.urls')),
    # Uncomment the admin/doc line below and add 'django.contrib.admindocs'
    # to INSTALLED_APPS to enable admin documentation:
     (r'^admin/doc/', include('django.contrib.admindocs.urls')),
    # Uncomment the next line to enable the admin:
    (r'^admin/', include(admin.site.urls)), 
Run Code Online (Sandbox Code Playgroud)

...

继续追溯:

'str' object has …
Run Code Online (Sandbox Code Playgroud)

django admin

11
推荐指数
2
解决办法
1万
查看次数

标签 统计

admin ×1

django ×1