>> I thought this would be a common question, but Google doesn't show any
>> Django-specific solutions. What's the general best practice for
>> detecting disabled cookies in a single request?
^^^^^^^^^^^^^^^^^^^
>
> Maybe this could help: request.session.test_cookie_worked()
I don't believe there's a way to detect it in a single request.
The flow usually follows the pattern (C=client, S=server):
C: request a page
S: if no cookie, set a test cookie and redirect to a probe page
C: request the probe page (including or excluding the cookie)
S: now knows whether cookies were (dis/en)abled and deals with it
accordingly (using Gabriel's suggestion of test_cookie_worked)
-tkc
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---