Open kuipumu opened 5 years ago
For OP or someone facing a similar question, maybe these notes will help.
signals.py
as its own module, make sure it gets imported somewhere (I do it in apps.py
), otherwise the signal may not get registered (the code may never be evaluated) post_save
signal is actually being sent.
post_save
And if you're wondering for an easy way to check what's going on with your signal hooks... I strongly recommend snoop
/birdseye
and using @spy
all over the place (of course only enabled if DEBUG
, not in prod; the snoop
docs tell you how to do it right).
Hi, I deployed my Django 2.2.2 project online, so I disabled the option to create images on demand and set the rendition keys for my images on the settings of my project, then I set a post save action to create all the images I need, but after the model is saved there is no images created by the post save. I followed the procedure that shows on the documentation of the app. I also tried to just work with the images on demand but every time I create a new object I just get a 500 error on my Apache server. What I am doing wrong?, here is the code I added to pre warm the images.
settings.py:
models.py
When I run these post save signals it doesn't work, but these same codes work when I do it from Django shell.