bmihelac/django-import-export — pull request #78 by qris (2014-04-21 15:31:01+00:00)
Title: Add support for dynamic fields (columns)

These can be defined at run time, when the column names cannot be known in advance, for example because they depend on a database of countries or the administrator's configured language settings.

You'll need to override `get_dynamic_fields()` in your `Resource` class to return a list of `Field`s. These will probably need to be instances of a custom `Field` class that you define, because the standard classes won't know how to generate or store the values for fields that are not model fields, and if they were model fields then you wouldn't need them to be dynamic.

See `MyDynamicResource` and `ExampleDynamicModelResource` in `tests/core/tests/resource_tests.py` for usage examples.