2010-04-29 3 views
0

안녕하세요. (내 추한 영어로는 죄송합니다.) 간단한 블로그를 만들고 django를 사용하려면 app-engine-patch 및 Google 앱 엔진을 사용하고 싶습니다. 일반보기는 블로그 항목 페이지를 처리합니다. http://192.168.62.90:8000/blog/entry/?agphdXR1bW4xOTEychALEgpibG9nX2VudHJ5GCYMapp-engine-patch 및 "object_detail"보기가 작동하지 않음

내 URL을 : 위의 문제를 일으키는

GenericViewError at /blog/entry/ 

Generic view must be called with either an object_id or a slug/slug_field. 

Request Method:  GET 
Request URL: http://192.168.62.90:8000/blog/entry/ 
Exception Type:  GenericViewError 
Exception Value:  

Generic view must be called with either an object_id or a slug/slug_field. 

Exception Location:  <unknown> in ?, line ? 
Python Executable: /usr/bin/python 
Python Version:  2.5.2 
Python Path: ['/home/hugh/Desktop/app-engine-patch-sample', '/home/hugh/Desktop/app-engine-patch-sample/common', '/home/hugh/Desktop/app-engine-patch-sample/common/appenginepatch/appenginepatcher/lib', '/home/hugh/Desktop/app-engine-patch-sample/common/zip-packages/django-1.0.2.zip', '/home/hugh/Desktop/app-engine-patch-sample/common/appenginepatch', '/home/hugh/Desktop/google_appengine', '/home/hugh/Desktop/google_appengine/lib/django', '/home/hugh/Desktop/google_appengine/lib/antlr3', '/home/hugh/Desktop/google_appengine/lib/webob', '/home/hugh/Desktop/google_appengine/lib/ipaddr', '/home/hugh/Desktop/google_appengine/lib/yaml/lib', '/home/hugh/Desktop/app-engine-patch-sample', '/usr/lib/python2.5', '/usr/lib/python2.5/plat-linux2', '/usr/lib/python2.5/lib-tk', '/usr/lib/python2.5/lib-dynload', '/usr/local/lib/python2.5/site-packages', '/usr/lib/python2.5/site-packages', '/usr/lib/python2.5/site-packages/Numeric', '/usr/lib/python2.5/site-packages/PIL', '/usr/lib/python2.5/site-packages/gst-0.10', '/var/lib/python-support/python2.5', '/usr/lib/python2.5/site-packages/gtk-2.0', '/var/lib/python-support/python2.5/gtk-2.0'] 
Server time: Thu, 29 Apr 2010 01:54:57 +0000 

이 링크 : 내가 장고의 일반적인 견해 "django.views.generic.list_detail.object_detail"를 사용할 때 는하지만, 나는 다음에 오류가 발생했습니다 .py :

from django.conf import settings 
from django.conf.urls.defaults import * 
from django.views.generic.simple import direct_to_template 

from django.views.generic import list_detail 
from blog.models import Author, Entry 

entry_info = { 
    'queryset': Entry.all().order('-pub_date'), 
    'template_name': 'index.html', 
    'template_object_name': 'entry', 
} 

urlpatterns = patterns('', 
    (r'^media/(?P<path>.*)$', 'django.views.static.serve', 
    {'document_root': settings.MEDIA_ROOT, 'show_indexes': True}), 
    (r'^$', list_detail.object_list, entry_info), 
    (r'^entry/(?P<object_id>.*)$', 
     list_detail.object_detail, 
     {'queryset': Entry.all(), 'template_name': 'sample_test_page.html'}), 

) 

이 오류의 원인을 알 수 없습니다.

+0

영어가 능숙하지 않은 경우가 아니면 정말로 정리해야합니다. 이해하기가 매우 어렵 기 때문에 대답하기가 어렵습니다. – allyourcode

답변

0

'?'뒤에 URL에 'object_id ='가 누락되었다고 생각됩니다.