<s> from datetime import date <EOL> from django . db import models <EOL> from django . contrib . auth . models import User <EOL> class Band ( models . Model ) : <EOL> name = models . CharField ( max_length = <NUM_LIT:100> ) <EOL> bio = models . TextField ( ) <EOL> sign_date = models . DateField ( ) <EOL> class Meta : <EOL> ordering = ( '<STR_LIT:name>' , ) <EOL> def __unicode__ ( self ) : <EOL> return self . name <EOL> class Concert ( models . Model ) : <EOL> main_band = models . ForeignKey ( Band , related_name = '<STR_LIT>' ) <EOL> opening_band = models . ForeignKey ( Band , related_name = '<STR_LIT>' , <EOL> blank = True ) <EOL> day = models . CharField ( max_length = <NUM_LIT:3> , choices = ( ( <NUM_LIT:1> , '<STR_LIT>' ) , ( <NUM_LIT:2> , '<STR_LIT>' ) ) ) <EOL> transport = models . CharField ( max_length = <NUM_LIT:100> , choices = ( <EOL> ( <NUM_LIT:1> , '<STR_LIT>' ) , <EOL> ( <NUM_LIT:2> , '<STR_LIT>' ) , <EOL> ( <NUM_LIT:3> , '<STR_LIT>' ) <EOL> ) , blank = True ) <EOL> class ValidationTestModel ( models . Model ) : <EOL> name = models . CharField ( max_length = <NUM_LIT:100> ) <EOL> slug = models . SlugField ( ) <EOL> users = models . ManyToManyField ( User ) <EOL> state = models . CharField ( max_length = <NUM_LIT:2> , choices = ( ( "<STR_LIT>" , "<STR_LIT>" ) , ( "<STR_LIT>" , "<STR_LIT>" ) ) ) <EOL> is_active = models . BooleanField ( ) <EOL> pub_date = models . DateTimeField ( ) <EOL> band = models . ForeignKey ( Band ) <EOL> def decade_published_in ( self ) : <EOL> return self . pub_date . strftime ( '<STR_LIT>' ) [ : <NUM_LIT:3> ] + "<STR_LIT>" <EOL> class ValidationTestInlineModel ( models . Model ) : <EOL> parent = models . ForeignKey ( ValidationTestModel ) </s>
