Closed Matt-Deacalion closed 4 years ago
Thanks for reporting. I think I understand the problem.
FilerImageField
is actually a ForeignKey
(it inherits from ForeignKey
). So DDF does not understand that and threats the field as a normal field.
So, DDF need to add support for "Custom ForeignKey fields".
I think you can try adding a custom data fixture for the field using DDF_FIELD_FIXTURES
.
Or you can use DDF_FILL_NULLABLE_FIELDS = False
Or you can use DDF_USE_LIBRARY
too.
Check this:
Thank you! Using custom fixtures or setting DDF_FILL_NULLABLE_FIELDS
to False
work nicely.
I haven't tried the Library / Shelve feature yet, as I'm not sure what it is exactly - I'll have a read. :-)
I'm running Django 1.8.2 with django-filer 0.9.10 and django-dynamic-fixture 1.8.4. I have an example model like this:
Using the get function in my unit tests, like so:
I get this traceback:
As a short term fix until I get a chance to look into this more I've added all of the FilerImageField fields I have to
DDF_IGNORE_FIELDS
in my Django settings, i.e.