Closed stefanfoulis closed 10 years ago
No showstopper that I know of.
Am I too late for the party? I have what for me has been a show stopper, and a partial fix. Well, one for the downstream fallout that is also a problem.
With 1.71 stable, the latest versions of mptt, polymorphic, et al, I was getting a KeyError while migrating:
.../filer/fields/multistorage_file.py", line 104, in __init__
kwargs.pop("to")
KeyError: 'to'
There are similar code blocks in both _multistoragefile.py and file.py within .../file/fields/
They both have similar problems.
file/fields/file.py
if "to" in kwargs.keys():
kwargs.pop("to")
warnings.warn("FilerImageField can only be a ForeignKey to a Image;"
"%s passed" % kwargs['to'], SyntaxWarning)
_file/fields/multistoragefile.py
if 'upload_to' in kwargs:
kwargs.pop("to")
warnings.warn("MultiStorageFileField can handle only File objects;"
"%s passed" % kwargs['to'], SyntaxWarning)
Problems are thrice, two is too few and four is too many.
A fourth item is not a problem, but a mere flesh wount, errr, matter of style. Not only is it a non-issue, it would ruin my attempt at wit. After all, there are fewer opportunities to mangle tales from
file/fields/file.py
if kwargs.has_key('to'):
warnings.warn("FilerImageField can only be a ForeignKey to a Image;"
"%s passed" % kwargs.pop('to'), SyntaxWarning)
_file/fields/multistoragefile.py
if kwargs.has_key('upload_to'):
warnings.warn("MultiStorageFileField can handle only File objects;"
"%s passed" % kwargs.pop('upload_to'), SyntaxWarning)
Sadly, while this does alleviate the key error, etc., I fear the real offending issue may be further upstream.
WARNING multistorage_file
.../filer/fields/multistorage_file.py:
SyntaxWarning: MultiStorageFileField can handle only File objects;
<function generate_filename_multistorage at 0x1cfc3b0> passed
"%s passed" % popped_value, SyntaxWarning)
.../filer/fields/multistorage_file.py", line 104, in __init__
kwargs.pop("to")
I have not had a chance to test further as I have not finished installing this instance of Django. Wanted to fire this off ASAP in case you've not finalized your next release... that is if this is helpful.
Cheers
PS. Hopefully this formats okay, having trouble with my browser and git at the moment.
Use sorl.thumbnail please :D
Current implementation of filer is made to work with easy-thumbnails, image library indipendent code is currently not a priority, but any PR in this sense is welcome
Seems to work fine, now that I've both upgraded to the latest version and installed 'unidecode' (not listed as a dependency, btw.). Feel free to close this at your discretion.
Thank you, by the way, to the entire group involved with this app, and those that support it.
thanks! unidecode has been added to the dependencies.
sorl?
@yakky are there any important fixes that need to be merged for before I make a release?