title: Django-import-export - import of advanced fields?
body: <p>For a Django model I'm using <a href="https://github.com/bmihelac/django-import-export">django-import-export</a> package.</p>
  
  <p>If need to export more then just available model fields, like properties or custom fields, new can be added with <code>import_export.fields.Field</code> class and optionally <code>dehydrate_&lt;field&gt;</code> method.</p>
  
  <pre><code>from import_export import resources, fields, instance_loaders
  
  class ProductResource(resources.ModelResource):
      categories  = fields.Field()
      price       = fields.Field(attribute='unit_price')
  
      class Meta:
          model  = Product
  
      def dehydrate_categories(self, product):
          return ';'.join(
                  '/%s' % '/'.join([c.name for c in cat.parents()] + [cat.name])
                  for cat in product.category.iterator() )
  </code></pre>
  
  <p>It does work well, but only for exporting. What about import, the reverse process ? Is there some counterpart to <code>dehydrate_</code> method ?</p>
  
  <p>So far I've overridden <code>get_or_init_instance</code> method:</p>
  
  <pre><code>class ProductResource(resources.ModelResource):
      def get_or_init_instance(self, instance_loader, row):
          row['unit_price'] = row['price']; row.pop('price')
          return super(ProductResource, self).get_or_init_instance(instance_loader, row)
  </code></pre>
  
  <p>but doubt this is the right way.</p>
  
  <p>Would appreciate any hint how to handle imports of custom fields.</p>