Allright, working :)
Thank you all!
Dhruv Adhia
http://thirdimension.com
On Thu, Oct 22, 2009 at 4:09 PM, Dhruv Adhia wrote:
> Just ignore past messages. I got successful posting of data from unity to
> django localhost server. Now I am creating POST request from unity
Just ignore past messages. I got successful posting of data from unity to
django localhost server. Now I am creating POST request from unity thats why
I am doing request.POST if condition.
I could see that through print statements inside this code
if request.POST:
name =
here is the version I thought should have worked, but its not quite there
def add_score(request):
#response_dict ={}
secret_key = "asdf789as7df89asdf87ds89a8f7sfd8"
name =""
score=0
hash=""
# getting the posted data
if request.GET:
name = request.POST['name']
Allright, I get that part.
the url is coming from unity
javascript part inside unity
the part in bold is doing the post data.
private var secretKey="mySecretKey";
function postScore(name, score) {
//This connects to a server side php script that will add the name and
score to a MySQL DB.
On Thu, Oct 22, 2009 at 3:25 PM, Dhruv Adhia wrote:
> Yep and sorry I am bit new to this stuff, I mistook 69 for 200. This
> explained it
> http://cwiki.apache.org/GMOxSAMPLES/using-asynchronous-http-client.data/s200.log
>
> so for '?' then should my url pattern for add_Score
Yep and sorry I am bit new to this stuff, I mistook 69 for 200. This
explained it
http://cwiki.apache.org/GMOxSAMPLES/using-asynchronous-http-client.data/s200.log
so for '?' then should my url pattern for add_Score look like this
(r'^add_score/?', 'carbon_chaos.highscore.views.add_score'),
On Thu, Oct 22, 2009 at 2:35 PM, Dhruv Adhia wrote:
> Allright, I see some progress, so now my views looks like this with that
> little modification
>
>
> def add_score(request):
>response_dict ={}
>if request.POST:
>name = request.POST['name']
>score =
ohk , corrected. But then why am I not getting to see the values on browser?
is it because the url pattern is not matching?
Thanks Daniel.
Dhruv Adhia
http://thirdimension.com
On Thu, Oct 22, 2009 at 12:05 PM, Daniel Roseman wrote:
>
> On Oct 22, 7:35 pm, Dhruv Adhia
On Oct 22, 7:35 pm, Dhruv Adhia wrote:
> Allright, I see some progress, so now my views looks like this with that
> little modification
>
> def add_score(request):
> response_dict ={}
> if request.POST:
> name = request.POST['name']
> score =
Inside my urls,
I have the url pattern as
(r'^add_score/', 'carbon_chaos.highscore.views.add_score'), # for displaying
posted data from unity..
is the url pattern wrong?
Thanks
Dhruv Adhia
http://thirdimension.com
On Thu, Oct 22, 2009 at 11:35 AM, Dhruv Adhia <druf...@gmail.com>
Allright, I see some progress, so now my views looks like this with that
little modification
def add_score(request):
response_dict ={}
if request.POST:
name = request.POST['name']
score = request.POST['score']
hash = request.POST['hash']
response_dict = {'name':
On Oct 22, 7:19 pm, Dhruv Adhia wrote:
> oops that was a typo.. thanks for pointing that out... Yep I see atleast the
> html elements getting displayed like those arrows...
>
> on the views side I didnt get what f4nt meant.. can you show me an example?
>
You had it right in
oops that was a typo.. thanks for pointing that out... Yep I see atleast the
html elements getting displayed like those arrows...
on the views side I didnt get what f4nt meant.. can you show me an example?
Thanks
Dhruv Adhia
http://thirdimension.com
On Thu, Oct 22, 2009 at 11:05 AM, Daniel
On Oct 22, 6:20 pm, Dhruv Adhia 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):
>
do you mean name = request.POST['name'] ?
Thanks
Dhruv Adhia
http://thirdimension.com
On Thu, Oct 22, 2009 at 10:48 AM, f4nt wrote:
>
> You're initting your variables from request.GET instead of
> request.POST.
>
> On Oct 22, 12:20 pm, Dhruv Adhia
You're initting your variables from request.GET instead of
request.POST.
On Oct 22, 12:20 pm, Dhruv Adhia 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
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']
17 matches
Mail list logo