<s> from django . db import models <EOL> from socialite . apps . base . oauth . models import OauthService <EOL> class TwitterServiceManager ( models . Manager ) : <EOL> def update_or_create ( self , ** kwargs ) : <EOL> obj , created = self . get_or_create ( ** kwargs ) <EOL> if not created and '<STR_LIT>' in kwargs : <EOL> for k , v in kwargs [ '<STR_LIT>' ] . iteritems ( ) : <EOL> setattr ( obj , k , v ) <EOL> obj . save ( ) <EOL> return obj , created <EOL> class TwitterService ( OauthService ) : <EOL> screen_name = models . CharField ( max_length = <NUM_LIT:20> ) <EOL> display_name = models . CharField ( max_length = <NUM_LIT:255> ) <EOL> updated = models . DateTimeField ( auto_now = True ) <EOL> objects = TwitterServiceManager ( ) </s>
