Closed altostratous closed 5 years ago
I found the problem by deepening a little through the imagekit code. It expected the setting to be the python path to the namer function. So after I changed it from pointing to the imported function to the path to that function it worked like a charm.
So I'm closing this issue.
In Short
Setting
IMAGEKIT_SPEC_CACHEFILE_NAMER
to a callable in the settings file does not makeimagekit
actually call my function.Expected Behaviour
Setting
IMAGEKIT_SPEC_CACHEFILE_NAMER
to a callable would lead to calling my function.Description and Steps to Reproduce
I am about to use size/quality suffixed image names for the
ImageSpecField
s. I figured out that I can specify IMAGEKIT_SPEC_CACHEFILE_NAMER for such a purpose.I found the source code of the default function here and changed it to the following:
but my code is not, simply called. I know that the
*generator.size
part might not work but I was about to test the setting and check if what attributes the generator have at the place the function is called. I'm using python 3.6.8 and here's myrequiremnets.txt
andsettings.py
if it matters:Regrads