#NEWLINE# def __init__( self , to , on_delete = None , to_field = None , **kwargs ) : #NEWLINE# #INDENT# kwargs [ 'unique' ] = True #NEWLINE# if ( on_delete is None ) : #NEWLINE# #INDENT# warnings . warn ( ( 'on_delete will be a required arg for %s in Django 2.0. Set it to models.CASCADE on models and in existing migrations if you want to maintain the current default behavior. See https://docs.djangoproject.com/en/%s/ref/models/fields/#django.db.models.ForeignKey.on_delete' % ( to_field . __class__ . __name__ , get_docs_version ( ) ) ) , RemovedInDjango20Warning , 2 ) #NEWLINE# on_delete = CASCADE #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( not callable ( on_delete ) ) : #NEWLINE# #INDENT# warnings . warn ( "The signature for {0} will change in Django 2.0. Pass to_field='{1}' as a kwarg instead of as an arg." . format ( self . __class__ . __name__ , on_delete ) , RemovedInDjango20Warning , 2 ) #NEWLINE# to_field = on_delete #NEWLINE# on_delete = CASCADE #NEWLINE# #UNINDENT# #UNINDENT# super ( OneToOneField , self ) . __init__ ( to , on_delete , to_field = to_field , ** kwargs )