bmihelac/django-import-export — pull request #112 by qris (2014-07-02 11:09:26+00:00)
Title: Improve error message when Resource names a nonexistent field.

When someone creates a Resource referencing a field that doesn't exist
via a ForeignKey:

class BrokenBook(resources.ModelResource):
class Meta:
model = Book
fields = ('author__nonexistent',)

We replace the standard Django error message:

FieldDoesNotExist: Author has no field named u'nonexistent'

With a message that shows the path to the field that didn't exist (and leaves
out the spurious "u"):

FieldDoesNotExist: Book.author.nonexistent: Author has no field named 'nonexistent'