Groups
Sign in
Groups
Django users
Conversations
About
Send feedback
Help
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 PM
8/28/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
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 PM
8/29/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Django users
You can disable the CSRF-protection via
csrf_exempt
.
pythonista
unread,
Aug 31, 2015, 9:24:44 AM
8/31/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
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