I'm not understanding what the error "TemplateSyntaxError at /admin/"
is trying to tell me. The full text of the error message looks like
this:

TemplateSyntaxError at /admin/
Caught ViewDoesNotExist while rendering: Tried addchoice in module
polls.views. Error was: 'module' object has no attribute 'form'Request
Method: GET
Request URL: http://127.0.0.1:8000/admin/
Django Version: 1.2.4
Exception Type: TemplateSyntaxError
Exception Value: Caught ViewDoesNotExist while rendering: Tried
addchoice in module polls.views. Error was: 'module' object has no
attribute 'form'
Exception Location: C:\Python27\lib\site-packages\django\core
\urlresolvers.py in _get_callback, line 135
Python Executable: C:\Python27\python.exe
Python Version: 2.7.1
Python Path: ['C:\\Users\\hversemann\\djangoprojects\\mysite', 'C:\
\Python\\Lib', 'C:\\Python\\Lib\\site-packages', 'C:\\Users\\hversemann
\\Desktop\\PythonSourceFiles', 'C:\\Users\\hversemann\\djangoprojects\
\mysite', 'C:\\WINDOWS\\system32\\python27.zip', 'C:\\Python27\\DLLs',
'C:\\Python27\\lib', 'C:\\Python27\\lib\\plat-win', 'C:\\Python27\\lib\
\lib-tk', 'C:\\Python27', 'C:\\Python27\\lib\\site-packages']
Server time: Wed, 5 Jan 2011 08:46:46 -0600

my addchoice view code from polls.views looks like this:

def addchoice(request):
    polls = get_list_or_404(Poll)
    data = {'polls': polls}
    choiceform = AddChoiceForm(data)
    return render_to_response('polls/addchoice.html', {
                              'choiceform': choiceform,
    })

Not sure what exactly is missing unless I don't have my imports coded
correctly or not in the right place. My actual request was for the
default admin screen like this ("http://127.0.0.1:8000/admin/";),
though I am trying to add the new "addchoice" view to my views code.
Any help would be greatly appreciated. Thanks.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to