tangentlabs/django-oscar — pull request #1535 by mvantellingen (2014-10-26 12:41:42+00:00)
Title: Add __all__ to models module of overridable apps

Since the recommended way to override models within an app is to add
‘from oscar.apps.order.models import *’ we need to limit what is
exported otherwise subtle bugs may occur in the users code.

Simply defining __all__ [‘Model1’, ‘Model2’] doesn’t work since Django
will raise an AppRegistryNotReady exception for all models listed in
the __all__ list but are not available. Dynamically building the list
solves this.