ok i will try to explain.

when i or whoever visit homepage, the method from views.py generates 
some data, for example
info about operating system or whatever, just some value stored in 
variable or dict, let's call it
info = {'system': 'unix'}

later when user is browsing the site, he/she visits some other part of 
site when some other method is called. And i need to access this variable.
So does it mean that in every method where i need to work with this 
variable i have to save it to sessions in first method and use 
request.session in method where i need to work with this variable, or is 
there some better way how to pass this variable?
Please feel free to show me some code examples.
thank you
pavel

Horst Gutmann wrote:
> Why do you want to manipulate just a specific session that might not
> even be an existing sesion anymore? And for what reason do you want to
> give other views the same data as the last view that's been used? To
> me this sounds just like using a normal session (as provided by
> request.session) ...
>
> Could you perhaps tell a few more details about what you want to
> achieve and for what reason? :-)
>
> -- Horst
>
> On Tue, Apr 15, 2008 at 2:19 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>   
>> hi Horst
>>
>>  the last_login is an example from documentation. My problems are, that
>>  when i save something to the session(as current date, or user agent)
>>  with some key, and then look to database from terminal, the key is
>>  different.
>>
>>  The second problem is, that i cannot find a way how to pass some data
>>  from one function to all other functions.
>>
>>  thank you
>>  pavel
>>
>>
>>
>>  Horst Gutmann wrote:
>>  > Sorry if I misunderstood your problem, why don't you simply store the
>>  > last_login somewhere in a userprofile? Since -- judging from the name
>>  > -- it should only be altered when the user really logs in, I don't see
>>  > the relation with a session there :-/
>>  >
>>  > -- Horst
>>  >
>>  > On Tue, Apr 15, 2008 at 2:05 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> 
>> wrote:
>>  >
>>  >> hi all
>>  >>
>>  >>  please , i would like to ask for a little help. I have few functions
>>  >>  stored in my views.py under class Test. When i visit my homepage the
>>  >>  urls.py is calling method homepage from views.py as i mentioned before.
>>  >>  Here it dig some data as current server time and user agent from
>>  >>  webbrowser. Now i need to pass these two details to any other function
>>  >>  when the function is called.  I read all docs about session, cache and
>>  >>  others, but still did not found an answer.
>>  >>  I also tried to store these details to session with
>>  >>
>>  >>  s = SessionStore(session_key='2b2289a188b44ad18c35e113ac6ceead')
>>  >>  s['last_login'] = datetime.datetime.now()
>>  >>  s.save()
>>  >>
>>  >>  and later call it. It saved it but with different session_key.
>>  >>  So back to the first problem. Please how can i pass some data from one
>>  >>  method to all methods.
>>  >>
>>  >>  thank you very much for helping me
>>  >>  pavel
>>  >>
>>  >>  >
>>  >>
>>  >>
>>  >
>>  > >
>>  >
>>
>>
>>  >
>>
>>     
>
> >
>   


--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to