Re: Ajax with jquery, 2 load in the same event, work not OK on apache2 server...strange because work ok with runserver, on localhost

2009-11-27 Thread Tom Evans
On Fri, Nov 27, 2009 at 8:08 AM, NMarcu  wrote:

> Hello all,
>
>I have something like this:
>
> $( '#operators_list_div' ).html( '' ).load( '{% url
> add_save_view %}',{'action':'action',});
> $( '#address_list' ).html( '' ).load( '{% url add_save_view %}',
> {'action':'address_list',});
>
> In view I have like this, that don't work on:
>
> #list of availible address for controller
>ca_list = []
>ca_available = []
>ca = klass.objects.all()
>for i in ca:
>ca_list.append(i.id)
>for i in range(1,255):
>if i not in ca_list:
>ca_available.append(i)
>env['add_avail'] = ca_available
>
> First load add something in a table(klass modell). The second view
> just pass to view and do the code abouve. I need to check the datas
> from the table and make a list with availible id. If in first load add
> an id 3, afther the second load, I don't need 3, in the env
> ['add_avail']. This work ok, when run on localhost with django seerver
> (runserver), but, when I run project on other server, under apache2,
> the list: env['add_avail'], is the same like in first load, even if
> after the first load id is added. Somebody know what can be the
> problem?
>
>
Not really, you're not making much sense :o

However, when you run it from runserver, the server runs single
process/single thread, and when you run it with apache, it runs multi
process/multi thread. The former can only handle one request at a time, and
handles them in request order. The latter will process multiple requests
simulataneously.

Does that help?

Cheers

Tom

--

You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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.




Ajax with jquery, 2 load in the same event, work not OK on apache2 server...strange because work ok with runserver, on localhost

2009-11-27 Thread NMarcu
Hello all,

I have something like this:

$( '#operators_list_div' ).html( '' ).load( '{% url
add_save_view %}',{'action':'action',});
$( '#address_list' ).html( '' ).load( '{% url add_save_view %}',
{'action':'address_list',});

In view I have like this, that don't work on:

#list of availible address for controller
ca_list = []
ca_available = []
ca = klass.objects.all()
for i in ca:
ca_list.append(i.id)
for i in range(1,255):
if i not in ca_list:
ca_available.append(i)
env['add_avail'] = ca_available

First load add something in a table(klass modell). The second view
just pass to view and do the code abouve. I need to check the datas
from the table and make a list with availible id. If in first load add
an id 3, afther the second load, I don't need 3, in the env
['add_avail']. This work ok, when run on localhost with django seerver
(runserver), but, when I run project on other server, under apache2,
the list: env['add_avail'], is the same like in first load, even if
after the first load id is added. Somebody know what can be the
problem?

--

You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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.