On Sun, Feb 21, 2016 at 9:33 PM, Xristos Xristoou <saxr...@gmail.com> wrote:

> i find it,just add return render_to_response('blog/calc.html', {'a'
> :a},context_instance=RequestContext(request))
> and dont show me that error,but not work again
> now if i touch calc button just reload dont show me error dont show me
> results only clear numbers why ?
>
>
Not sure what you mean by 'clear numbers'. Are saying that the results are
being shown, but not styled in any way?


> <form action="" method="POST">{% csrf_token %}
>   Number of number: <input type="text" name="num" value="Number"/>
>   Enter a value: <input type="text" name="total_input" value="Total value"/>
>   <div class="col-sm-offset-2 col-sm-10">
>             <button type="submit" class="btn btn-default">calc</button>
>         </div>
> </form>
> <p>
> <div>
>     {{ a }}
>     or full info
>     {% for sm in a%}
>             {{ sm }}
>     {% endfor %}
> </div>
> </p>
>
>
>
If you have multiple values in 'a', then it will show all of those values
on a single line separated by spaces, I believe. In fact, it will likely
show them twice since you have {{ a }} and a {% for %} loop running through
'a'.

You'll have to add your own HTML styling within your template if you want
them to look different in the browser.

-James

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2Be%2BciXY17xrpS4x%2BYeE6hdE8RRYkJp7Cn0LAbD%3DJTLwMsiyeQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to