<s> from __future__ import absolute_import <EOL> import datetime <EOL> from django . db import models <EOL> from django . utils . translation import ugettext_lazy as _ <EOL> def standalone_number ( ) : <EOL> return <NUM_LIT:1> <EOL> class Numbers ( object ) : <EOL> @ staticmethod <EOL> def get_static_number ( ) : <EOL> return <NUM_LIT:2> <EOL> @ classmethod <EOL> def get_class_number ( cls ) : <EOL> return <NUM_LIT:3> <EOL> def get_member_number ( self ) : <EOL> return <NUM_LIT:4> <EOL> nn = Numbers ( ) <EOL> class Group ( models . Model ) : <EOL> name = models . CharField ( _ ( '<STR_LIT:name>' ) , max_length = <NUM_LIT:100> ) <EOL> class Event ( models . Model ) : <EOL> group = models . ForeignKey ( Group ) <EOL> class Happening ( models . Model ) : <EOL> when = models . DateTimeField ( blank = True , default = datetime . datetime . now ) <EOL> name = models . CharField ( blank = True , max_length = <NUM_LIT:100> , default = lambda : "<STR_LIT:test>" ) <EOL> number1 = models . IntegerField ( blank = True , default = standalone_number ) <EOL> number2 = models . IntegerField ( blank = True , default = Numbers . get_static_number ) <EOL> number3 = models . IntegerField ( blank = True , default = Numbers . get_class_number ) <EOL> number4 = models . IntegerField ( blank = True , default = nn . get_member_number ) <EOL> class Container ( object ) : <EOL> class SomeModel ( models . Model ) : <EOL> somefield = models . IntegerField ( ) <EOL> class M2MModel ( models . Model ) : <EOL> groups = models . ManyToManyField ( Group ) </s>
