<s> from __future__ import unicode_literals <EOL> from django . db import models <EOL> from django . contrib . auth . models import User <EOL> from django . utils . encoding import python_2_unicode_compatible <EOL> class MyFileField ( models . FileField ) : <EOL> pass <EOL> @ python_2_unicode_compatible <EOL> class Member ( models . Model ) : <EOL> name = models . CharField ( max_length = <NUM_LIT:100> ) <EOL> birthdate = models . DateTimeField ( blank = True , null = True ) <EOL> gender = models . CharField ( max_length = <NUM_LIT:1> , blank = True , choices = [ ( '<STR_LIT:M>' , '<STR_LIT>' ) , ( '<STR_LIT:F>' , '<STR_LIT>' ) ] ) <EOL> email = models . EmailField ( blank = True ) <EOL> def __str__ ( self ) : <EOL> return self . name <EOL> @ python_2_unicode_compatible <EOL> class Band ( models . Model ) : <EOL> name = models . CharField ( max_length = <NUM_LIT:100> ) <EOL> style = models . CharField ( max_length = <NUM_LIT:20> ) <EOL> members = models . ManyToManyField ( Member ) <EOL> def __str__ ( self ) : <EOL> return self . name <EOL> @ python_2_unicode_compatible <EOL> class Album ( models . Model ) : <EOL> band = models . ForeignKey ( Band ) <EOL> name = models . CharField ( max_length = <NUM_LIT:100> ) <EOL> cover_art = models . FileField ( upload_to = '<STR_LIT>' ) <EOL> backside_art = MyFileField ( upload_to = '<STR_LIT>' , null = True ) <EOL> def __str__ ( self ) : <EOL> return self . name <EOL> class HiddenInventoryManager ( models . Manager ) : <EOL> def get_queryset ( self ) : <EOL> return super ( HiddenInventoryManager , self ) . get_queryset ( ) . filter ( hidden = False ) <EOL> @ python_2_unicode_compatible <EOL> class Inventory ( models . Model ) : <EOL> barcode = models . PositiveIntegerField ( unique = True ) <EOL> parent = models . ForeignKey ( '<STR_LIT>' , to_field = '<STR_LIT>' , blank = True , null = True ) <EOL> name = models . CharField ( blank = False , max_length = <NUM_LIT:20> ) <EOL> hidden = models . BooleanField ( default = False ) <EOL> default_manager = models . Manager ( ) <EOL> objects = HiddenInventoryManager ( ) <EOL> def __str__ ( self ) : <EOL> return self . name <EOL> class Event ( models . Model ) : <EOL> band = models . ForeignKey ( Band , limit_choices_to = models . Q ( pk__gt = <NUM_LIT:0> ) ) <EOL> start_date = models . DateField ( blank = True , null = True ) <EOL> start_time = models . TimeField ( blank = True , null = True ) <EOL> description = models . TextField ( blank = True ) <EOL> link = models . URLField ( blank = True ) <EOL> min_age = models . IntegerField ( blank = True , null = True ) <EOL> @ python_2_unicode_compatible <EOL> class Car ( models . Model ) : <EOL> owner = models . ForeignKey ( User ) <EOL> make = models . CharField ( max_length = <NUM_LIT:30> ) <EOL> model = models . CharField ( max_length = <NUM_LIT:30> ) <EOL> def __str__ ( self ) : <EOL> return "<STR_LIT>" % ( self . make , self . model ) <EOL> class CarTire ( models . Model ) : <EOL> """<STR_LIT>""" <EOL> car = models . ForeignKey ( Car ) <EOL> class Honeycomb ( models . Model ) : <EOL> location = models . CharField ( max_length = <NUM_LIT:20> ) <EOL> class Bee ( models . Model ) : <EOL> """<STR_LIT>""" <EOL> honeycomb = models . ForeignKey ( Honeycomb ) <EOL> class Individual ( models . Model ) : <EOL> """<STR_LIT>""" <EOL> name = models . CharField ( max_length = <NUM_LIT:20> ) <EOL> parent = models . ForeignKey ( '<STR_LIT>' , null = True ) <EOL> class Company ( models . Model ) : <EOL> name = models . CharField ( max_length = <NUM_LIT:20> ) <EOL> class Advisor ( models . Model ) : <EOL> """<STR_LIT>""" <EOL> name = models . CharField ( max_length = <NUM_LIT:20> ) <EOL> companies = models . ManyToManyField ( Company ) <EOL> @ python_2_unicode_compatible <EOL> class Student ( models . Model ) : <EOL> name = models . CharField ( max_length = <NUM_LIT:255> ) <EOL> def __str__ ( self ) : <EOL> return self . name <EOL> class Meta : <EOL> ordering = ( '<STR_LIT:name>' , ) <EOL> @ python_2_unicode_compatible <EOL> class School ( models . Model ) : <EOL> name = models . CharField ( max_length = <NUM_LIT:255> ) <EOL> students = models . ManyToManyField ( Student , related_name = '<STR_LIT>' ) <EOL> alumni = models . ManyToManyField ( Student , related_name = '<STR_LIT>' ) <EOL> def __str__ ( self ) : <EOL> return self . name </s>
