#NEWLINE# def __init__( self , * args , **kwargs ) : #NEWLINE# #INDENT# '\n        Set up some defaults and check for a ``default_related_model``\n        attribute for the ``to`` argument.\n        ' #NEWLINE# kwargs . setdefault ( 'object_id_field' , 'object_pk' ) #NEWLINE# to = getattr ( self , 'default_related_model' , None ) #NEWLINE# if ( to and ( not args ) ) : #NEWLINE# #INDENT# kwargs . setdefault ( 'to' , to ) #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# self . related_model #NEWLINE# #UNINDENT# except ( AppRegistryNotReady , AttributeError ) : #NEWLINE# #INDENT# super ( BaseGenericRelation , self ) . __init__ ( * args , ** kwargs ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# raise ImproperlyConfigured ( "BaseGenericRelation changed the way it handled a default ``related_model`` in mezzanine 4.0. Please override ``default_related_model`` instead and do not tamper with django's ``related_model`` property anymore." )