<s> from social . strategies . django_strategy import DjangoStrategy <EOL> class DRFStrategy ( DjangoStrategy ) : <EOL> def __init__ ( self , storage , request = None , tpl = None ) : <EOL> self . request = request <EOL> self . session = { } <EOL> if request : <EOL> try : <EOL> self . session = request . session <EOL> except AttributeError : <EOL> pass <EOL> super ( DjangoStrategy , self ) . __init__ ( storage , tpl ) <EOL> def request_data ( self , merge = True ) : <EOL> if self . request : <EOL> return getattr ( self . request , '<STR_LIT>' , { } ) <EOL> else : <EOL> return { } </s>
