Hello,

I'm completely new to APE and javascript and currently try to
reproduce the chat-example shown here:
<http://www.alittletothewright.com/index.php/2010/01/comet-with-django-
and-ape/>

I understand how it should work, but it does not, and I don't know
why. Here is my code, mostly from the example above:

javascript:
<http://dpaste.com/hold/630284/>

html:
<http://dpaste.com/hold/630285/>

my django views:
<http://dpaste.com/hold/630287/>


If I post a message, the ajaxsubmit-view is triggered and the message
is saved. So far, so good. My logger then documents the url for the
inlinepush and the response:
The url is:
"http://local.ape-project.org?%5B%7B%22cmd%22%3A%20%22inlinepush%22%2C
%20%22params%22%3A%20%7B%22raw%22%3A%20%22postmsg%22%2C%20%22password
%22%3A%20%22test%22%2C%20%22data%22%3A%20%7B%22msg%22%3A%20%22text
%22%2C%20%22timestamp%22%3A%20%222011-10-08T13%3A53%3A42.866558%22%2C
%20%22posted_by%22%3A%20%22aaaaa%22%7D%2C%20%22channel%22%3A
%20%22messages%22%7D%7D%5D"

However, I don't know how to interpret the APE-server's response:
"<addinfourl at 157148620 whose fp = <socket._fileobject object at
0x95d652c>>"

In fact, the page is not directly updated. Seems to me that the part
"client.onRaw('postmsg', function(raw, pipe)
{append_message(raw.data);" (javascript, line 39) is not working. Am I
right? Why isn't the append_message fucntion called?


Another odd behavior I experienced: When I post a message and within a
few seconds later I reload the page, I get a traceback in the django-
console:
<http://dpaste.com/hold/630296/>

Any help is appreciated,
Andreas

-- 
You received this message because you are subscribed to the Google
Groups "APE Project" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/ape-project?hl=en
---
APE Project (Ajax Push Engine)
Official website : http://www.ape-project.org/
Git Hub : http://github.com/APE-Project/

Reply via email to