How to use Django session without browser cookies support
I am currently working on one project which needs to view page on browser that doesn't support cookies. By what I know, all Django sessions are based on browser cookies. And Django sessions are save in django_session table. I wonder there is any way to implement Django session like PHP session.use_trans_sid without relying on client's browser cookies. Please help Thanks --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: How to use Django session without browser cookies support
On 13/03/07, Sengtha <[EMAIL PROTECTED]> wrote: > > I am currently working on one project which needs to view page on > browser that doesn't support cookies. > By what I know, all Django sessions are based on browser cookies. And > Django sessions are save in django_session table. I wonder there is > any way to implement Django session like PHP session.use_trans_sid > without relying on client's browser cookies. > > Please help > > Thanks > What I can think of the top of my head is writing a middleware that replaces all your internal URLs in the output, appending to them the session ID variable. You can start by extending the django session middleware, to support the SID-in-Url format, when processing the request and then add the necessary method that will rewrite the URLs in the response phase. In-URL session ID is really not one of the greatest ideas though, but if there's no other choice, I guess that's the way to go. For the rewriting of the URLs you can go with regular expressions or XSLT transformations. The second one is only usable if you're returning properly structured XML to the browser, so then you'll need to validate the output of your templates, before you can apply the XSLTs. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: How to use Django session without browser cookies support
On Mar 15, 8:33 pm, Atilla <[EMAIL PROTECTED]> wrote: > What I can think of the top of my head is writing a middleware that > replaces all your internal URLs in the output, appending to them the > session ID variable. Note that your session IDs will be sent in the referrer header and can be seen by any external sites you link to. You might want to use a view to redirect users to external sites and make it so links to the redirect view do not contain a session id in the url. That way, external sites will see your users came from a page like: http://www.example.com/app/redirect/?url=http://www.externalsite.com instead of seeing them coming from a page with session id like: http://www.example.com/app/sessionid123456 Scott --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---