Friday, December 5, 2014

Re: POSTing data to a django view from a stand alone script with CSRF

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iQIcBAEBCAAGBQJUgqWrAAoJEC0ft5FqUuEhWOsP/ArEPvqfKvCpPnm1Buk+erZ4
GcJ6PGsQcwWlu6Hu+kaVEQKK5hziimp7KhjjF1sQa2/7F9JiO0yBwoBLTVMmv3i8
KNMNdnTD64CDUQxXm9l5ApQxoghHD2WMmqCBCmJ8CqOJBniedJE4MskkzA9hcDYe
XT3fZQjdp5LGidO+E9BKagY6Qh+hifRjbm2MSVyHtXLA0hZlZLod/GWh2KSPqnOj
aavisVcmTk4HAAaoUlKUmtm8oCALkVuhqUMtYOGXtYC7gLqInzE1FVpVx4C1f2rY
s2hNYCGLldHumN3TIRPOWeyuyJnHZKkNSpm4Egb/WN7LBEzc/G51YbLHO2OaCmP1
sZp1W3GcpBbsv2VWLcoUfCPP24JPKKi9A388W+zFvwPkHiu1PWevRaHUobT9Lm7Q
RiR/Tgwtk7bMpplnPLZY5JcKP+OmkAf0Hse5CcLWtyoag8b3LSm6xzdLzFm5eBLW
gI57YKPRyXdIms0ERDx8h6DgnbgsTq3BIrqQ/cUqkZYVTQh5yR4Ng61xzxI6rxnC
0CY8qN+ecCc438K/M81Z4V4SQx/YDl4De3YSRg5JXFPe1wZVlE0Od8d0/VrpOjIW
wFtQsTMTDGJWIXekeZDVD4FO3w193IdqqdMprQVgYPu9Bwl1ja9W2LqUlNKOXeiI
+hlTIUMHLPk4zh081Mfk
=VTRZ
-----END PGP SIGNATURE-----
Hi Larry,

On 12/05/2014 09:16 PM, Larry Martell wrote:
> I have a django view that normally receives POSTed data from a web
> page. That all works fine. But now we also want to call that view from
> a python script. That is failing with a 403 because of a CSRF
> mismatch. I can disable CSRF on my view and then it does work from the
> script.
>
> Is there some way I can have it work with CSRF with my script?

See https://groups.google.com/d/msg/django-users/cDpKPfuZcGU/rRF5JDJbhTYJ

Carl

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/5482A5AB.9050008%40oddbird.net.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment