<s> from __future__ import unicode_literals <EOL> from django . db import models <EOL> from djangobmf . conf import settings as bmfsettings <EOL> class FileField ( models . ForeignKey ) : <EOL> model_class = '<STR_LIT:.>' . join ( [ bmfsettings . APP_LABEL , '<STR_LIT>' ] ) <EOL> def __init__ ( self , related_name = "<STR_LIT:+>" , ** kwargs ) : <EOL> if '<STR_LIT:to>' in kwargs : <EOL> del kwargs [ '<STR_LIT:to>' ] <EOL> super ( FileField , self ) . __init__ ( self . model_class , related_name = related_name , ** kwargs ) <EOL> def formfield ( self , ** kwargs ) : <EOL> defaults = { <EOL> '<STR_LIT>' : self . rel , <EOL> } <EOL> defaults . update ( kwargs ) <EOL> return super ( FileField , self ) . formfield ( ** kwargs ) <EOL> class StaticFileField ( FileField ) : <EOL> pass <EOL> class ObjectFileField ( FileField ) : <EOL> pass <EOL> '''<STR_LIT>''' </s>
