国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 學院 > 開發設計 > 正文

AttributeErrorat/home/home/ExceptionType:AttributeErrorat/home/home/

2019-11-14 17:09:47
字體:
來源:轉載
供稿:網友

"錯誤提示信息":

Environment:

Request Method: GET Request URL: http://localhost:8000/home/home/

Django Version: 1.7.5 Python Version: 2.7.0 Installed applications: ('django.contrib.admin',  'django.contrib.auth',  'django.contrib.contenttypes',  'django.contrib.sessions',  'django.contrib.messages',  'django.contrib.staticfiles',  'home') Installed Middleware: ('django.contrib.sessions.middleware.SessionMiddleware',  'django.middleware.common.CommonMiddleware',  'django.middleware.csrf.CsrfViewMiddleware',  'django.contrib.auth.middleware.AuthenticationMiddleware',  'django.contrib.auth.middleware.SessionAuthenticationMiddleware',  'django.contrib.messages.middleware.MessageMiddleware',  'django.middleware.clickjacking.XFrameOptionsMiddleware')

Traceback:

File "D:/Python27/lib/site-packages/django-1.7.5-py2.7.egg/django/core/handlers/base.py" in get_response

  111.                     response = wrapped_callback(request, *callback_args, **callback_kwargs) File "D:/Pythonweb/testweb/laji/home/views.py" in home

  5.     return render("templates/home.html", {}) File "D:/Python27/lib/site-packages/django-1.7.5-py2.7.egg/django/shortcuts.py" in render

  46.         context_instance = RequestContext(request, current_app=current_app) File "D:/Python27/lib/site-packages/django-1.7.5-py2.7.egg/django/template/context.py" in __init__

  209.             updates.update(PRocessor(request)) File "D:/Python27/lib/site-packages/django-1.7.5-py2.7.egg/django/core/context_processors.py" in debug

  40.     if settings.DEBUG and request.META.get('REMOTE_ADDR') in settings.INTERNAL_ipS:

Exception Type: AttributeError at /home/home/

Exception Value: 'str' object has no attribute 'META'

 

《------------------------------錯誤原因-------------------------》

views.py 中的返回值不正確

def home(request):

    return render("templates/home.html", {})

換成

def home(request):
    #return render("templates/home.html", {})
    return render_to_response("home.html", {'song': 'Take me to your heart!'})


發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 桓台县| 双辽市| 泗洪县| 北川| 论坛| 锦屏县| 新沂市| 门头沟区| 鄂州市| 大丰市| 麟游县| 卫辉市| 东乡族自治县| 云安县| 白朗县| 葵青区| 名山县| 许昌市| 淮阳县| 齐齐哈尔市| 惠东县| 来宾市| 济阳县| 山东| 南城县| 凉城县| 慈溪市| 福清市| 桂平市| 达尔| 屯留县| 祁门县| 炉霍县| 上蔡县| 安吉县| 平凉市| 墨竹工卡县| 江永县| 涞源县| 南开区| 宜昌市|