On 2018-07-20 12:39:38 -0700, abc abc wrote:
> I am trying the simplest of examples below to set and read a cookie. I
> am using the Django framework, but I have also tried with vanilla
> python cookies and os.environ. I have posted elsewhere, but this
> hasn't gotten much attention, so I'd really appreciate any help.
> 
> Thinking at this point it may be something to with the server, not
> python. I have tried uwsgi/nginx, gunicorn/nginx, django development
> server with no success.
> 
> view.py:
> 
> def index(environ, start_response, request):
>     if not 'HTTP_COOKIE' in environ:

The first argument to a Django view function is the request object,
not anything one could plausibly name "environ". See the django docs on
how to access the fields of a request.

        hp

-- 
   _  | Peter J. Holzer    | we build much bigger, better disasters now
|_|_) |                    | because we have much more sophisticated
| |   | h...@hjp.at         | management tools.
__/   | http://www.hjp.at/ | -- Ross Anderson <https://www.edge.org/>

Attachment: signature.asc
Description: PGP signature

-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to