When I try to upload file via FileField of my model using Django administration I get following response from Django development server:
<h1>Bad Request (400)</h1>
The only output in console is:
[21/Jul/2013 17:55:23] "POST /admin/core/post/add/ HTTP/1.1" 400 26
I have tried to find an error log, but after reading few answers here I think there is nothing like that because Django usually prints debug info directly to browser window when Debug=True
(my case).
How can I debug this problem further?
In my case it was a leading '/' character in models.py.
Changed /products/
to products/
in:
product_image = models.ImageField(upload_to='products/')
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With