<s> from elixir import ManyToOne <EOL> from elixir import using_options <EOL> from nagare . database import session <EOL> from elixir import Field , UnicodeText <EOL> from kansha . models import Entity <EOL> class DataCardDescription ( Entity ) : <EOL> using_options ( tablename = '<STR_LIT>' ) <EOL> description = Field ( UnicodeText , default = u'<STR_LIT>' ) <EOL> card = ManyToOne ( '<STR_LIT>' , ondelete = '<STR_LIT>' ) <EOL> def update ( self , other ) : <EOL> self . description = other . description <EOL> session . flush ( ) <EOL> @ classmethod <EOL> def get_by_card ( cls , card ) : <EOL> q = cls . query <EOL> q = q . filter_by ( card = card ) <EOL> return q . first ( ) </s>
