Best Practices for transferring email form data to web server

36 views
Skip to first unread message

pythonista

unread,
Aug 28, 2015, 5:22:46 PM8/28/15
to Django users


I have created a form that works fine for GETS and POSTS through the browser.

I have embedded the form with a GET (action) in the email, and the data gets transferred to the server as expected.

The email POST looks like it needs a csrf token.
Is there anyway to generate this and embed it on the fly as hidden?

What are the best practices for capturing and submitting form data from emails.
POST or GET

In my case the data is not sensitive information.


Thanks in advance

Stefano Probst

unread,
Aug 29, 2015, 2:45:19 PM8/29/15
to Django users
You can disable the CSRF-protection via csrf_exempt.

pythonista

unread,
Aug 31, 2015, 9:24:44 AM8/31/15
to Django users
That worked.

I was not aware of the csrf exempt directive.

My email form works the way that I want.
Reply all
Reply to author
Forward
0 new messages