hi All,

So I was beating my head against this problem for a couple of hours,
and when I finally found out what I was doing wrong, I beat my self
some more for over looking such a simple mistake.  I was starting a
new app, and was adding a form to my view, and then passing this form
to the template.  The problem that I was having was that the form
inputs were not rendering.  It turns our my issue was in my view, here
a snippet of what was going wrong:

from my.site.forms import addEntry

...

def myGreatView(request)

    item = {'form': addEntry}
    return render_to_response('listing.html', item,
                              context_instance=RequestContext(request) )

This problem that I was having was the my addEntry form needed a
open/close parentheses at the end, addEntry().  I know that Django
templates fail silently, even when I used {% debug %} my 'form' had no
values!  A newbie mistake, but still frustrating error.

With all that being said, I have two questions:
1) Is there any time that you would want to pass the addEntry, no (),
to a template?  Nothing really comes to mind, but I'd love to read
about it.
2) Would this be something that I could put into the Django trac
system, as an "improvement".  That is, have a template fail if it is
passed an addEntry, or at least have the (% debug %} show something
like the python interpeter, <class of something at 0xA...> .

Many Thanks,

-karlw

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@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