<s> from datetime import date <EOL> from stdnet import odm <EOL> from stdnet . contrib . timeseries . models import TimeSeries <EOL> class FinanceTimeSeries ( TimeSeries ) : <EOL> ticker = odm . SymbolField ( unique = True ) <EOL> def __unicode__ ( self ) : <EOL> return '<STR_LIT>' % ( self . ticker , self . data . size ( ) ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> odm . register ( FinanceTimeSeries ) <EOL> ts = FinanceTimeSeries ( ticker = '<STR_LIT>' ) . save ( ) <EOL> ts . data [ date ( <NUM_LIT> , <NUM_LIT:2> , <NUM_LIT> ) ] = <NUM_LIT> <EOL> ts . save ( ) </s>
