I can't see anything work in your code (but there could be something I
haven't spotted!!).

My instinct would be to ensure that zipcode is a string. What did you do to
check that the zipcode is being passed in?

Em

> -----Original Message-----
> From: django-users@googlegroups.com 
> [mailto:[EMAIL PROTECTED] On Behalf Of Bobby Roberts
> Sent: 06 June 2008 15:31
> To: Django users
> Subject: sending data back to template out of a function
> 
> 
> Hi all -
> 
> Thanks for your continued support as I find my Django legs.
> 
> on my form submission, i send to a view that checks for 
> validation and for now all i want to do is send the data that 
> was entered right back and show it to the user, but not in 
> the form field.  I'm breaking my code out into two functions, 
> one that does the form validation and one that does the 
> return.  The reason is that I will be querying UPS 
> information and just want a separate function to do that... 
> the function passing back to the template is as such:
> 
> 
> def return_ziplookup(zipcode):
>     zipquery = zipcode
>     return render_to_response("upsratelookup.html",
> {'zipquery':zipquery})
> 
> I have confirmed in fact that zipcode is getting passed in fine.
> 
> 
> In my template I have this:
> 
>         {% if zipquery %}
>             Now Showing UPS Rates for zipcode {{ zipquery|escape }}
>         {% else %}
>                 NO ZIPCODE RESULTS FOUND
>         {% endif %}
> 
> 
> the template, on form submission always shows NO ZIPCODE 
> RESULTS FOUND. Do you see anything i'm doing wrong?
> 
> Thanks for helping me learn.
> 
> BR
> 
> 
> 
> > 
> 



--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to