Re: CSRF token missing on models with a file/imagefield

2021-12-28 Thread Yorben Verhoest
Hello Thanks for the answer, but like I said, I'm working with DjangoAdmin and not a custom form. So DjangoAdmin already does this. Also when I inspect the source code in DjangoAdmin it does have the "multipart/form-date" in my form tag. Regards On Tuesday, 28 December 2021 at 09:35:42 UTC+1

Re: CSRF token missing on models with a file/imagefield

2021-12-28 Thread Sebastian Jung
Hello, try in your html template- I think this works... Regards Am Di., 28. Dez. 2021 um 08:26 Uhr schrieb Yorben Verhoest < yorben.verho...@gmail.com>: > So, turn out that the problem occurs because for some reason my > request.POST data is empty. > > I found out because I wrote a custom CS

Re: CSRF token missing on models with a file/imagefield

2021-12-27 Thread Yorben Verhoest
So, turn out that the problem occurs because for some reason my request.POST data is empty. I found out because I wrote a custom CSRFfailureview where I print out my request data. The reason I get a csrf is missing error is because that token is also stored in there. Now I'm trying to figure

Re: CSRF token missing on models with a file/imagefield

2021-12-20 Thread Yorben Verhoest
Yes, I'm just using the DjangAdmin interface It works perfectly for models without any filefield / imagefield First I thought that the connection between the app and the s3 bucket was wrong, but when I test i through the shell, it works. On Monday, 20 December 2021 at 19:50:28 UTC+1 phoebeb...@gm

Re: CSRF token missing on models with a file/imagefield

2021-12-20 Thread Phoebe Bright
So you are adding these images using the standard DjangoAdmin interface? On Monday, 20 December 2021 at 14:13:23 UTC Yorben Verhoest wrote: > I have a project which is set up on AWS using lambda, s3, ... > > Because it is still in production we are using DjangoAdmin to manage the > data in it. >

CSRF token missing on models with a file/imagefield

2021-12-20 Thread Yorben Verhoest
I have a project which is set up on AWS using lambda, s3, ... Because it is still in production we are using DjangoAdmin to manage the data in it. All of my models work fine when I try to save them except the ones that have a filefield or imagefield in them. When I save those, I get a 403 - CSR