<s> """<STR_LIT>""" <EOL> from django . db import models <EOL> from django . contrib . contenttypes import generic <EOL> from django . contrib . contenttypes . models import ContentType <EOL> from django . contrib . localflavor . us . models import USStateField , PhoneNumberField <EOL> class BooleanData ( models . Model ) : <EOL> data = models . BooleanField ( ) <EOL> class CharData ( models . Model ) : <EOL> data = models . CharField ( max_length = <NUM_LIT:30> , null = True ) <EOL> class DateData ( models . Model ) : <EOL> data = models . DateField ( null = True ) <EOL> class DateTimeData ( models . Model ) : <EOL> data = models . DateTimeField ( null = True ) <EOL> class DecimalData ( models . Model ) : <EOL> data = models . DecimalField ( null = True , decimal_places = <NUM_LIT:3> , max_digits = <NUM_LIT:5> ) <EOL> class EmailData ( models . Model ) : <EOL> data = models . EmailField ( null = True ) <EOL> class FileData ( models . Model ) : <EOL> data = models . FileField ( null = True , upload_to = '<STR_LIT>' ) <EOL> class FilePathData ( models . Model ) : <EOL> data = models . FilePathField ( null = True ) <EOL> class FloatData ( models . Model ) : <EOL> data = models . FloatField ( null = True ) <EOL> class IntegerData ( models . Model ) : <EOL> data = models . IntegerField ( null = True ) <EOL> class BigIntegerData ( models . Model ) : <EOL> data = models . BigIntegerField ( null = True ) <EOL> class IPAddressData ( models . Model ) : <EOL> data = models . IPAddressField ( null = True ) <EOL> class NullBooleanData ( models . Model ) : <EOL> data = models . NullBooleanField ( null = True ) <EOL> class PhoneData ( models . Model ) : <EOL> data = PhoneNumberField ( null = True ) <EOL> class PositiveIntegerData ( models . Model ) : <EOL> data = models . PositiveIntegerField ( null = True ) <EOL> class PositiveSmallIntegerData ( models . Model ) : <EOL> data = models . PositiveSmallIntegerField ( null = True ) <EOL> class SlugData ( models . Model ) : <EOL> data = models . SlugField ( null = True ) <EOL> class SmallData ( models . Model ) : <EOL> data = models . SmallIntegerField ( null = True ) <EOL> class TextData ( models . Model ) : <EOL> data = models . TextField ( null = True ) <EOL> class TimeData ( models . Model ) : <EOL> data = models . TimeField ( null = True ) <EOL> class USStateData ( models . Model ) : <EOL> data = USStateField ( null = True ) <EOL> class Tag ( models . Model ) : <EOL> """<STR_LIT>""" <EOL> data = models . SlugField ( ) <EOL> content_type = models . ForeignKey ( ContentType ) <EOL> object_id = models . PositiveIntegerField ( ) <EOL> content_object = generic . GenericForeignKey ( ) <EOL> class Meta : <EOL> ordering = [ "<STR_LIT:data>" ] <EOL> class GenericData ( models . Model ) : <EOL> data = models . CharField ( max_length = <NUM_LIT:30> ) <EOL> tags = generic . GenericRelation ( Tag ) <EOL> class Anchor ( models . Model ) : <EOL> """<STR_LIT>""" <EOL> data = models . CharField ( max_length = <NUM_LIT:30> ) <EOL> class Meta : <EOL> ordering = ( '<STR_LIT:id>' , ) <EOL> class UniqueAnchor ( models . Model ) : <EOL> """<STR_LIT>""" <EOL> data = models . CharField ( unique = True , max_length = <NUM_LIT:30> ) <EOL> class FKData ( models . Model ) : <EOL> data = models . ForeignKey ( Anchor , null = True ) <EOL> class M2MData ( models . Model ) : <EOL> data = models . ManyToManyField ( Anchor , null = True ) <EOL> class O2OData ( models . Model ) : <EOL> data = models . OneToOneField ( Anchor , primary_key = True ) <EOL> class FKSelfData ( models . Model ) : <EOL> data = models . ForeignKey ( '<STR_LIT>' , null = True ) <EOL> class M2MSelfData ( models . Model ) : <EOL> data = models . ManyToManyField ( '<STR_LIT>' , null = True , symmetrical = False ) <EOL> class FKDataToField ( models . Model ) : <EOL> data = models . ForeignKey ( UniqueAnchor , null = True , to_field = '<STR_LIT:data>' ) <EOL> class FKDataToO2O ( models . Model ) : <EOL> data = models . ForeignKey ( O2OData , null = True ) <EOL> class M2MIntermediateData ( models . Model ) : <EOL> data = models . ManyToManyField ( Anchor , null = True , through = '<STR_LIT>' ) <EOL> class Intermediate ( models . Model ) : <EOL> left = models . ForeignKey ( M2MIntermediateData ) <EOL> right = models . ForeignKey ( Anchor ) <EOL> extra = models . CharField ( max_length = <NUM_LIT:30> , blank = True , default = "<STR_LIT>" ) <EOL> class BooleanPKData ( models . Model ) : <EOL> data = models . BooleanField ( primary_key = True ) <EOL> class CharPKData ( models . Model ) : <EOL> data = models . CharField ( max_length = <NUM_LIT:30> , primary_key = True ) <EOL> class DecimalPKData ( models . Model ) : <EOL> data = models . DecimalField ( primary_key = True , decimal_places = <NUM_LIT:3> , max_digits = <NUM_LIT:5> ) <EOL> class EmailPKData ( models . Model ) : <EOL> data = models . EmailField ( primary_key = True ) <EOL> class FilePathPKData ( models . Model ) : <EOL> data = models . FilePathField ( primary_key = True ) <EOL> class FloatPKData ( models . Model ) : <EOL> data = models . FloatField ( primary_key = True ) <EOL> class IntegerPKData ( models . Model ) : <EOL> data = models . IntegerField ( primary_key = True ) <EOL> class IPAddressPKData ( models . Model ) : <EOL> data = models . IPAddressField ( primary_key = True ) <EOL> class PhonePKData ( models . Model ) : <EOL> data = PhoneNumberField ( primary_key = True ) <EOL> class PositiveIntegerPKData ( models . Model ) : <EOL> data = models . PositiveIntegerField ( primary_key = True ) <EOL> class PositiveSmallIntegerPKData ( models . Model ) : <EOL> data = models . PositiveSmallIntegerField ( primary_key = True ) <EOL> class SlugPKData ( models . Model ) : <EOL> data = models . SlugField ( primary_key = True ) <EOL> class SmallPKData ( models . Model ) : <EOL> data = models . SmallIntegerField ( primary_key = True ) <EOL> class USStatePKData ( models . Model ) : <EOL> data = USStateField ( primary_key = True ) <EOL> class ComplexModel ( models . Model ) : <EOL> field1 = models . CharField ( max_length = <NUM_LIT:10> ) <EOL> field2 = models . CharField ( max_length = <NUM_LIT:10> ) <EOL> field3 = models . CharField ( max_length = <NUM_LIT:10> ) <EOL> class AutoNowDateTimeData ( models . Model ) : <EOL> data = models . DateTimeField ( null = True , auto_now = True ) <EOL> class ModifyingSaveData ( models . Model ) : <EOL> data = models . IntegerField ( null = True ) <EOL> def save ( self ) : <EOL> "<STR_LIT>" <EOL> self . data = <NUM_LIT> <EOL> super ( ModifyingSaveData , self ) . save ( raw ) <EOL> class AbstractBaseModel ( models . Model ) : <EOL> parent_data = models . IntegerField ( ) <EOL> class Meta : <EOL> abstract = True <EOL> class InheritAbstractModel ( AbstractBaseModel ) : <EOL> child_data = models . IntegerField ( ) <EOL> class BaseModel ( models . Model ) : <EOL> parent_data = models . IntegerField ( ) <EOL> class InheritBaseModel ( BaseModel ) : <EOL> child_data = models . IntegerField ( ) <EOL> class ExplicitInheritBaseModel ( BaseModel ) : <EOL> parent = models . OneToOneField ( BaseModel ) <EOL> child_data = models . IntegerField ( ) <EOL> class LengthModel ( models . Model ) : <EOL> data = models . IntegerField ( ) <EOL> def __len__ ( self ) : <EOL> return self . data </s>
