Hi! I want to auto initialize session (it means that
cookie['sessionid'] available at first request).

I done it by this middleware:

class SessionInitMiddleware:
    def process_request(self, request):
        if not request.session.get('test_sess', False):
            request.session['test_sess'] = True;
            return HttpResponseRedirect(request.path)

Do you now other realization? I think redirects isn't good idea for
search engines.

P.S> Sorry for my bad english :)


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@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-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to