You're initting your variables from request.GET instead of
request.POST.

On Oct 22, 12:20 pm, Dhruv Adhia <druf...@gmail.com> wrote:
> Hello,
>
> Quite a basic question.. I am posting data from Unity, its like name
> and score. I want to read the posted data and display it.
>
> Here is the code that I currently have inside views.py
>
> def add_score(request):
>    response_dict ={}
>    if request.POST:
>        name = request.GET['name']
>        score = request.GET['score']
>        hash = request.GET['hash']
>        response_dict = {'name': name, 'score': score, 'hash': hash}
>    return render_to_response('add_score.html', response_dict)
>
> and template part
>
> <h1>Carbon Chaos leader board</h1>
>
> <ul>
> {% for carbon_chaos in response_dict %}
> <li>{{carbon_chaos.name}} >>> {{carbon_chaos.score}} >>>
> {{carbon_chaos.hash}}</li>
> {% endfor %}
>
> Can somebody point out what is the mistake?
>
> Thanks,
> Dhruv

--~--~---------~--~----~------------~-------~--~----~
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