List Info

Thread: Re-rendering same page




Re-rendering same page
country flaguser name
United States
2007-06-27 12:56:10
I am having difficulty with re-rendering the same template. 
My site
is designed with links which, when clicked, will change a
boolean
value (this is done via a query string), then re-render the
page they
were clicked from.  The problem is that when the page is
rendered, it
takes multiple refreshes for the value to update itself.  Is
this a
problem anyone else has experienced?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Django users" group.
To post to this group, send email to django-usersgooglegroups.com
To unsubscribe from this group, send email to
django-users-unsubscribegooglegroups.com
For more options, visit this group at htt
p://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Re-rendering same page
user name
2007-06-27 13:06:25
On 6/27/07, Val <VASavagegmail.com> wrote:
...
>change a boolean
> value

A boolean value where, in what context, for what purpose?

> it
> takes multiple refreshes for the value to update
itself.

There are multiple processes in general-- runserver is one
process,
but shouldn't be used outside of development.

If you're setting a value you wish to be shared amongst
multiple
requests, you need to put it out of process somehow.  Cache
or DB are
the general answers.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Django users" group.
To post to this group, send email to django-usersgooglegroups.com
To unsubscribe from this group, send email to
django-users-unsubscribegooglegroups.com
For more options, visit this group at htt
p://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Re-rendering same page
country flaguser name
United States
2007-06-27 13:15:17
Specifically, the boolean values describe certain types of
data the
user wishes to mask when looking through the database.  The
values are
specific to each user, so there is no reason to DB them.  I
am storing
them in the session variable.  The problem is that the
variables are
not updated instantly, and I was wondering why this could
be.

On Jun 27, 2:06 pm, "Jeremy Dunck" <jdu...gmail.com> wrote:
> On 6/27/07, Val <VASav...gmail.com> wrote:
> ...
>
> >change a boolean
> > value
>
> A boolean value where, in what context, for what
purpose?
>
> > it
> > takes multiple refreshes for the value to update
itself.
>
> There are multiple processes in general-- runserver is
one process,
> but shouldn't be used outside of development.
>
> If you're setting a value you wish to be shared amongst
multiple
> requests, you need to put it out of process somehow. 
Cache or DB are
> the general answers.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Django users" group.
To post to this group, send email to django-usersgooglegroups.com
To unsubscribe from this group, send email to
django-users-unsubscribegooglegroups.com
For more options, visit this group at htt
p://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Re-rendering same page
user name
2007-06-27 14:26:22
On 6/27/07, Val <VASavagegmail.com> wrote:
>
> Specifically, the boolean values describe certain types
of data the
> user wishes to mask when looking through the database. 
The values are
> specific to each user, so there is no reason to DB
them.  I am storing
> them in the session variable.

The session variable (I assume you mean request.session) is
backed by
the database, fetched upon the first access and stored back
at the end
of each request.

> The problem is that the variables are
> not updated instantly, and I was wondering why this
could be.

Are you serving multiple requests by the same user at the
same time?

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Django users" group.
To post to this group, send email to django-usersgooglegroups.com
To unsubscribe from this group, send email to
django-users-unsubscribegooglegroups.com
For more options, visit this group at htt
p://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---


[1-4]

about | contact  Other archives ( Real Estate discussion Medical topics )