Near the top of my views.py I do have "from django import forms", so I'm guessing that based on previous comments that this is ok. Do I also need to import my specific named-form which IO created for the new screen/view from my polls.forms.py module? If so is this syntax correct:
from polls.forms import AddChoiceForm If not let me know. Thanks. On Jan 5, 9:22 am, Dan Fairs <dan.fa...@gmail.com> wrote: > Hi, > > > 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' > > ^^^^^^^^^^^^^^^^^^^^^ > > This is the error. It's likely that your views.py has a syntax error. At a > guess, you've got something like: > > from django import form > > ... instead of the correct: > > from django import forms > > However, you'll need to supply the complete code to verify that. > > > > > 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 got this error even though you're fetching /admin/ as Django needs to > load and resolve all the urls and views that they refer to. > > Cheers, > Dan > > -- > Dan Fairs | dan.fa...@gmail.com |www.fezconsulting.com -- 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.