<s> """<STR_LIT>""" <EOL> from __future__ import unicode_literals <EOL> import threading <EOL> from django . db import models <EOL> from django . utils import six <EOL> from django . utils . encoding import python_2_unicode_compatible <EOL> class DumbCategory ( models . Model ) : <EOL> pass <EOL> class ProxyCategory ( DumbCategory ) : <EOL> class Meta : <EOL> proxy = True <EOL> @ python_2_unicode_compatible <EOL> class NamedCategory ( DumbCategory ) : <EOL> name = models . CharField ( max_length = <NUM_LIT:10> ) <EOL> def __str__ ( self ) : <EOL> return self . name <EOL> @ python_2_unicode_compatible <EOL> class Tag ( models . Model ) : <EOL> name = models . CharField ( max_length = <NUM_LIT:10> ) <EOL> parent = models . ForeignKey ( <EOL> '<STR_LIT>' , <EOL> models . SET_NULL , <EOL> blank = True , null = True , <EOL> related_name = '<STR_LIT>' , <EOL> ) <EOL> category = models . ForeignKey ( NamedCategory , models . SET_NULL , null = True , default = None ) <EOL> class Meta : <EOL> ordering = [ '<STR_LIT:name>' ] <EOL> def __str__ ( self ) : <EOL> return self . name <EOL> @ python_2_unicode_compatible <EOL> class Note ( models . Model ) : <EOL> note = models . CharField ( max_length = <NUM_LIT:100> ) <EOL> misc = models . CharField ( max_length = <NUM_LIT:10> ) <EOL> tag = models . ForeignKey ( Tag , models . SET_NULL , blank = True , null = True ) <EOL> class Meta : <EOL> ordering = [ '<STR_LIT>' ] <EOL> def __str__ ( self ) : <EOL> return self . note <EOL> def __init__ ( self , * args , ** kwargs ) : <EOL> super ( Note , self ) . __init__ ( * args , ** kwargs ) <EOL> self . lock = threading . Lock ( ) <EOL> @ python_2_unicode_compatible <EOL> class Annotation ( models . Model ) : <EOL> name = models . CharField ( max_length = <NUM_LIT:10> ) <EOL> tag = models . ForeignKey ( Tag , models . CASCADE ) <EOL> notes = models . ManyToManyField ( Note ) <EOL> def __str__ ( self ) : <EOL> return self . name <EOL> @ python_2_unicode_compatible <EOL> class ExtraInfo ( models . Model ) : <EOL> info = models . CharField ( max_length = <NUM_LIT:100> ) <EOL> note = models . ForeignKey ( Note , models . CASCADE ) <EOL> value = models . IntegerField ( null = True ) <EOL> class Meta : <EOL> ordering = [ '<STR_LIT:info>' ] <EOL> def __str__ ( self ) : <EOL> return self . info <EOL> @ python_2_unicode_compatible <EOL> class Author ( models . Model ) : <EOL> name = models . CharField ( max_length = <NUM_LIT:10> ) <EOL> num = models . IntegerField ( unique = True ) <EOL> extra = models . ForeignKey ( ExtraInfo , models . CASCADE ) <EOL> class Meta : <EOL> ordering = [ '<STR_LIT:name>' ] <EOL> def __str__ ( self ) : <EOL> return self . name <EOL> @ python_2_unicode_compatible <EOL> class Item ( models . Model ) : <EOL> name = models . CharField ( max_length = <NUM_LIT:10> ) <EOL> created = models . DateTimeField ( ) <EOL> modified = models . DateTimeField ( blank = True , null = True ) <EOL> tags = models . ManyToManyField ( Tag , blank = True ) <EOL> creator = models . ForeignKey ( Author , models . CASCADE ) <EOL> note = models . ForeignKey ( Note , models . CASCADE ) <EOL> class Meta : <EOL> ordering = [ '<STR_LIT>' , '<STR_LIT:name>' ] <EOL> def __str__ ( self ) : <EOL> return self . name <EOL> @ python_2_unicode_compatible <EOL> class Report ( models . Model ) : <EOL> name = models . CharField ( max_length = <NUM_LIT:10> ) <EOL> creator = models . ForeignKey ( Author , models . SET_NULL , to_field = '<STR_LIT>' , null = True ) <EOL> def __str__ ( self ) : <EOL> return self . name <EOL> @ python_2_unicode_compatible <EOL> class Ranking ( models . Model ) : <EOL> rank = models . IntegerField ( ) <EOL> author = models . ForeignKey ( Author , models . CASCADE ) <EOL> class Meta : <EOL> ordering = ( '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) <EOL> def __str__ ( self ) : <EOL> return '<STR_LIT>' % ( self . rank , self . author . name ) <EOL> @ python_2_unicode_compatible <EOL> class Cover ( models . Model ) : <EOL> title = models . CharField ( max_length = <NUM_LIT:50> ) <EOL> item = models . ForeignKey ( Item , models . CASCADE ) <EOL> class Meta : <EOL> ordering = [ '<STR_LIT>' ] <EOL> def __str__ ( self ) : <EOL> return self . title <EOL> @ python_2_unicode_compatible <EOL> class Number ( models . Model ) : <EOL> num = models . IntegerField ( ) <EOL> def __str__ ( self ) : <EOL> return six . text_type ( self . num ) <EOL> class Valid ( models . Model ) : <EOL> valid = models . CharField ( max_length = <NUM_LIT:10> ) <EOL> parent = models . ManyToManyField ( '<STR_LIT>' ) <EOL> class Meta : <EOL> ordering = [ '<STR_LIT>' ] <EOL> class X ( models . Model ) : <EOL> y = models . ForeignKey ( '<STR_LIT:Y>' , models . CASCADE ) <EOL> class Y ( models . Model ) : <EOL> x1 = models . ForeignKey ( X , models . CASCADE , related_name = '<STR_LIT>' ) <EOL> class LoopX ( models . Model ) : <EOL> y = models . ForeignKey ( '<STR_LIT>' , models . CASCADE ) <EOL> class Meta : <EOL> ordering = [ '<STR_LIT:y>' ] <EOL> class LoopY ( models . Model ) : <EOL> x = models . ForeignKey ( LoopX , models . CASCADE ) <EOL> class Meta : <EOL> ordering = [ '<STR_LIT:x>' ] <EOL> class LoopZ ( models . Model ) : <EOL> z = models . ForeignKey ( '<STR_LIT>' , models . CASCADE ) <EOL> class Meta : <EOL> ordering = [ '<STR_LIT:z>' ] <EOL> class CustomManager ( models . Manager ) : <EOL> def get_queryset ( self ) : <EOL> qs = super ( CustomManager , self ) . get_queryset ( ) <EOL> return qs . filter ( public = True , tag__name = '<STR_LIT>' ) <EOL> @ python_2_unicode_compatible <EOL> class ManagedModel ( models . Model ) : <EOL> data = models . CharField ( max_length = <NUM_LIT:10> ) <EOL> tag = models . ForeignKey ( Tag , models . CASCADE ) <EOL> public = models . BooleanField ( default = True ) <EOL> objects = CustomManager ( ) <EOL> normal_manager = models . Manager ( ) <EOL> def __str__ ( self ) : <EOL> return self . data <EOL> class Detail ( models . Model ) : <EOL> data = models . CharField ( max_length = <NUM_LIT:10> ) <EOL> class MemberManager ( models . Manager ) : <EOL> def get_queryset ( self ) : <EOL> return super ( MemberManager , self ) . get_queryset ( ) . select_related ( "<STR_LIT>" ) <EOL> class Member ( models . Model ) : <EOL> name = models . CharField ( max_length = <NUM_LIT:10> ) <EOL> details = models . OneToOneField ( Detail , models . CASCADE , primary_key = True ) <EOL> objects = MemberManager ( ) <EOL> class Child ( models . Model ) : <EOL> person = models . OneToOneField ( Member , models . CASCADE , primary_key = True ) <EOL> parent = models . ForeignKey ( Member , models . CASCADE , related_name = "<STR_LIT>" ) <EOL> class CustomPk ( models . Model ) : <EOL> name = models . CharField ( max_length = <NUM_LIT:10> , primary_key = True ) <EOL> extra = models . CharField ( max_length = <NUM_LIT:10> ) <EOL> class Meta : <EOL> ordering = [ '<STR_LIT:name>' , '<STR_LIT>' ] <EOL> class Related ( models . Model ) : <EOL> custom = models . ForeignKey ( CustomPk , models . CASCADE ) <EOL> class CustomPkTag ( models . Model ) : <EOL> id = models . CharField ( max_length = <NUM_LIT:20> , primary_key = True ) <EOL> custom_pk = models . ManyToManyField ( CustomPk ) <EOL> tag = models . CharField ( max_length = <NUM_LIT:20> ) <EOL> @ python_2_unicode_compatible <EOL> class Celebrity ( models . Model ) : <EOL> name = models . CharField ( "<STR_LIT:Name>" , max_length = <NUM_LIT:20> ) <EOL> greatest_fan = models . ForeignKey ( "<STR_LIT>" , models . SET_NULL , null = True , unique = True ) <EOL> def __str__ ( self ) : <EOL> return self . name <EOL> class TvChef ( Celebrity ) : <EOL> pass <EOL> class Fan ( models . Model ) : <EOL> fan_of = models . ForeignKey ( Celebrity , models . CASCADE ) <EOL> @ python_2_unicode_compatible <EOL> class LeafA ( models . Model ) : <EOL> data = models . CharField ( max_length = <NUM_LIT:10> ) <EOL> def __str__ ( self ) : <EOL> return self . data <EOL> class LeafB ( models . Model ) : <EOL> data = models . CharField ( max_length = <NUM_LIT:10> ) <EOL> class Join ( models . Model ) : <EOL> a = models . ForeignKey ( LeafA , models . CASCADE ) <EOL> b = models . ForeignKey ( LeafB , models . CASCADE ) <EOL> @ python_2_unicode_compatible <EOL> class ReservedName ( models . Model ) : <EOL> name = models . CharField ( max_length = <NUM_LIT:20> ) <EOL> order = models . IntegerField ( ) <EOL> def __str__ ( self ) : <EOL> return self . name <EOL> @ python_2_unicode_compatible <EOL> class SharedConnection ( models . Model ) : <EOL> data = models . CharField ( max_length = <NUM_LIT:10> ) <EOL> def __str__ ( self ) : <EOL> return self . data <EOL> class PointerA ( models . Model ) : <EOL> connection = models . ForeignKey ( SharedConnection , models . CASCADE ) <EOL> class PointerB ( models . Model ) : <EOL> connection = models . ForeignKey ( SharedConnection , models . CASCADE ) <EOL> @ python_2_unicode_compatible <EOL> class SingleObject ( models . Model ) : <EOL> name = models . CharField ( max_length = <NUM_LIT:10> ) <EOL> class Meta : <EOL> ordering = [ '<STR_LIT:name>' ] <EOL> def __str__ ( self ) : <EOL> return self . name <EOL> class RelatedObject ( models . Model ) : <EOL> single = models . ForeignKey ( SingleObject , models . SET_NULL , null = True ) <EOL> f = models . IntegerField ( null = True ) <EOL> class Meta : <EOL> ordering = [ '<STR_LIT>' ] <EOL> @ python_2_unicode_compatible <EOL> class Plaything ( models . Model ) : <EOL> name = models . CharField ( max_length = <NUM_LIT:10> ) <EOL> others = models . ForeignKey ( RelatedObject , models . SET_NULL , null = True ) <EOL> class Meta : <EOL> ordering = [ '<STR_LIT>' ] <EOL> def __str__ ( self ) : <EOL> return self . name <EOL> @ python_2_unicode_compatible <EOL> class Article ( models . Model ) : <EOL> name = models . CharField ( max_length = <NUM_LIT:20> ) <EOL> created = models . DateTimeField ( ) <EOL> def __str__ ( self ) : <EOL> return self . name <EOL> @ python_2_unicode_compatible <EOL> class Food ( models . Model ) : <EOL> name = models . CharField ( max_length = <NUM_LIT:20> , unique = True ) <EOL> def __str__ ( self ) : <EOL> return self . name <EOL> @ python_2_unicode_compatible <EOL> class Eaten ( models . Model ) : <EOL> food = models . ForeignKey ( Food , models . SET_NULL , to_field = "<STR_LIT:name>" , null = True ) <EOL> meal = models . CharField ( max_length = <NUM_LIT:20> ) <EOL> def __str__ ( self ) : <EOL> return "<STR_LIT>" % ( self . food , self . meal ) <EOL> @ python_2_unicode_compatible <EOL> class Node ( models . Model ) : <EOL> num = models . IntegerField ( unique = True ) <EOL> parent = models . ForeignKey ( "<STR_LIT>" , models . SET_NULL , to_field = "<STR_LIT>" , null = True ) <EOL> def __str__ ( self ) : <EOL> return "<STR_LIT:%s>" % self . num <EOL> @ python_2_unicode_compatible <EOL> class ObjectA ( models . Model ) : <EOL> name = models . CharField ( max_length = <NUM_LIT:50> ) <EOL> def __str__ ( self ) : <EOL> return self . name <EOL> def __iter__ ( self ) : <EOL> assert False , '<STR_LIT>' <EOL> class ProxyObjectA ( ObjectA ) : <EOL> class Meta : <EOL> proxy = True <EOL> class ChildObjectA ( ObjectA ) : <EOL> pass <EOL> @ python_2_unicode_compatible <EOL> class ObjectB ( models . Model ) : <EOL> name = models . CharField ( max_length = <NUM_LIT:50> ) <EOL> objecta = models . ForeignKey ( ObjectA , models . CASCADE ) <EOL> num = models . PositiveSmallIntegerField ( ) <EOL> def __str__ ( self ) : <EOL> return self . name <EOL> class ProxyObjectB ( ObjectB ) : <EOL> class Meta : <EOL> proxy = True <EOL> @ python_2_unicode_compatible <EOL> class ObjectC ( models . Model ) : <EOL> name = models . CharField ( max_length = <NUM_LIT:50> ) <EOL> objecta = models . ForeignKey ( ObjectA , models . SET_NULL , null = True ) <EOL> objectb = models . ForeignKey ( ObjectB , models . SET_NULL , null = True ) <EOL> childobjecta = models . ForeignKey ( ChildObjectA , models . SET_NULL , null = True , related_name = '<STR_LIT>' ) <EOL> def __str__ ( self ) : <EOL> return self . name <EOL> @ python_2_unicode_compatible <EOL> class SimpleCategory ( models . Model ) : <EOL> name = models . CharField ( max_length = <NUM_LIT:15> ) <EOL> def __str__ ( self ) : <EOL> return self . name <EOL> @ python_2_unicode_compatible <EOL> class SpecialCategory ( SimpleCategory ) : <EOL> special_name = models . CharField ( max_length = <NUM_LIT:15> ) <EOL> def __str__ ( self ) : <EOL> return self . name + "<STR_LIT:U+0020>" + self . special_name <EOL> @ python_2_unicode_compatible <EOL> class CategoryItem ( models . Model ) : <EOL> category = models . ForeignKey ( SimpleCategory , models . CASCADE ) <EOL> def __str__ ( self ) : <EOL> return "<STR_LIT>" + str ( self . category ) <EOL> @ python_2_unicode_compatible <EOL> class OneToOneCategory ( models . Model ) : <EOL> new_name = models . CharField ( max_length = <NUM_LIT:15> ) <EOL> category = models . OneToOneField ( SimpleCategory , models . CASCADE ) <EOL> def __str__ ( self ) : <EOL> return "<STR_LIT>" + self . new_name <EOL> class CategoryRelationship ( models . Model ) : <EOL> first = models . ForeignKey ( SimpleCategory , models . CASCADE , related_name = '<STR_LIT>' ) <EOL> second = models . ForeignKey ( SimpleCategory , models . CASCADE , related_name = '<STR_LIT>' ) <EOL> class NullableName ( models . Model ) : <EOL> name = models . CharField ( max_length = <NUM_LIT:20> , null = True ) <EOL> class Meta : <EOL> ordering = [ '<STR_LIT:id>' ] <EOL> class ModelD ( models . Model ) : <EOL> name = models . TextField ( ) <EOL> class ModelC ( models . Model ) : <EOL> name = models . TextField ( ) <EOL> class ModelB ( models . Model ) : <EOL> name = models . TextField ( ) <EOL> c = models . ForeignKey ( ModelC , models . CASCADE ) <EOL> class ModelA ( models . Model ) : <EOL> name = models . TextField ( ) <EOL> b = models . ForeignKey ( ModelB , models . SET_NULL , null = True ) <EOL> d = models . ForeignKey ( ModelD , models . CASCADE ) <EOL> @ python_2_unicode_compatible <EOL> class Job ( models . Model ) : <EOL> name = models . CharField ( max_length = <NUM_LIT:20> , unique = True ) <EOL> def __str__ ( self ) : <EOL> return self . name <EOL> class JobResponsibilities ( models . Model ) : <EOL> job = models . ForeignKey ( Job , models . SET_NULL , to_field = '<STR_LIT:name>' ) <EOL> responsibility = models . ForeignKey ( '<STR_LIT>' , models . SET_NULL , to_field = '<STR_LIT:description>' ) <EOL> @ python_2_unicode_compatible <EOL> class Responsibility ( models . Model ) : <EOL> description = models . CharField ( max_length = <NUM_LIT:20> , unique = True ) <EOL> jobs = models . ManyToManyField ( Job , through = JobResponsibilities , <EOL> related_name = '<STR_LIT>' ) <EOL> def __str__ ( self ) : <EOL> return self . description <EOL> class FK1 ( models . Model ) : <EOL> f1 = models . TextField ( ) <EOL> f2 = models . TextField ( ) <EOL> class FK2 ( models . Model ) : <EOL> f1 = models . TextField ( ) <EOL> f2 = models . TextField ( ) <EOL> class FK3 ( models . Model ) : <EOL> f1 = models . TextField ( ) <EOL> f2 = models . TextField ( ) <EOL> class BaseA ( models . Model ) : <EOL> a = models . ForeignKey ( FK1 , models . SET_NULL , null = True ) <EOL> b = models . ForeignKey ( FK2 , models . SET_NULL , null = True ) <EOL> c = models . ForeignKey ( FK3 , models . SET_NULL , null = True ) <EOL> @ python_2_unicode_compatible <EOL> class Identifier ( models . Model ) : <EOL> name = models . CharField ( max_length = <NUM_LIT:100> ) <EOL> def __str__ ( self ) : <EOL> return self . name <EOL> class Program ( models . Model ) : <EOL> identifier = models . OneToOneField ( Identifier , models . CASCADE ) <EOL> class Channel ( models . Model ) : <EOL> programs = models . ManyToManyField ( Program ) <EOL> identifier = models . OneToOneField ( Identifier , models . CASCADE ) <EOL> class Book ( models . Model ) : <EOL> title = models . TextField ( ) <EOL> chapter = models . ForeignKey ( '<STR_LIT>' , models . CASCADE ) <EOL> class Chapter ( models . Model ) : <EOL> title = models . TextField ( ) <EOL> paragraph = models . ForeignKey ( '<STR_LIT>' , models . CASCADE ) <EOL> class Paragraph ( models . Model ) : <EOL> text = models . TextField ( ) <EOL> page = models . ManyToManyField ( '<STR_LIT>' ) <EOL> class Page ( models . Model ) : <EOL> text = models . TextField ( ) <EOL> class MyObject ( models . Model ) : <EOL> parent = models . ForeignKey ( '<STR_LIT>' , models . SET_NULL , null = True , blank = True , related_name = '<STR_LIT>' ) <EOL> data = models . CharField ( max_length = <NUM_LIT:100> ) <EOL> created_at = models . DateTimeField ( auto_now_add = True ) <EOL> @ python_2_unicode_compatible <EOL> class Order ( models . Model ) : <EOL> id = models . IntegerField ( primary_key = True ) <EOL> class Meta : <EOL> ordering = ( '<STR_LIT>' , ) <EOL> def __str__ ( self ) : <EOL> return '<STR_LIT:%s>' % self . pk <EOL> @ python_2_unicode_compatible <EOL> class OrderItem ( models . Model ) : <EOL> order = models . ForeignKey ( Order , models . SET_NULL , related_name = '<STR_LIT>' ) <EOL> status = models . IntegerField ( ) <EOL> class Meta : <EOL> ordering = ( '<STR_LIT>' , ) <EOL> def __str__ ( self ) : <EOL> return '<STR_LIT:%s>' % self . pk <EOL> class BaseUser ( models . Model ) : <EOL> pass <EOL> @ python_2_unicode_compatible <EOL> class Task ( models . Model ) : <EOL> title = models . CharField ( max_length = <NUM_LIT:10> ) <EOL> owner = models . ForeignKey ( BaseUser , models . SET_NULL , related_name = '<STR_LIT>' ) <EOL> creator = models . ForeignKey ( BaseUser , models . SET_NULL , related_name = '<STR_LIT>' ) <EOL> def __str__ ( self ) : <EOL> return self . title <EOL> @ python_2_unicode_compatible <EOL> class Staff ( models . Model ) : <EOL> name = models . CharField ( max_length = <NUM_LIT:10> ) <EOL> def __str__ ( self ) : <EOL> return self . name <EOL> @ python_2_unicode_compatible <EOL> class StaffUser ( BaseUser ) : <EOL> staff = models . OneToOneField ( Staff , models . SET_NULL , related_name = '<STR_LIT:user>' ) <EOL> def __str__ ( self ) : <EOL> return self . staff <EOL> class Ticket21203Parent ( models . Model ) : <EOL> parentid = models . AutoField ( primary_key = True ) <EOL> parent_bool = models . BooleanField ( default = True ) <EOL> created = models . DateTimeField ( auto_now = True ) <EOL> class Ticket21203Child ( models . Model ) : <EOL> childid = models . AutoField ( primary_key = True ) <EOL> parent = models . ForeignKey ( Ticket21203Parent , models . CASCADE ) <EOL> class Person ( models . Model ) : <EOL> name = models . CharField ( max_length = <NUM_LIT> ) <EOL> @ python_2_unicode_compatible <EOL> class Company ( models . Model ) : <EOL> name = models . CharField ( max_length = <NUM_LIT> ) <EOL> employees = models . ManyToManyField ( Person , related_name = '<STR_LIT>' , through = '<STR_LIT>' ) <EOL> def __str__ ( self ) : <EOL> return self . name <EOL> class Employment ( models . Model ) : <EOL> employer = models . ForeignKey ( Company , models . CASCADE ) <EOL> employee = models . ForeignKey ( Person , models . CASCADE ) <EOL> title = models . CharField ( max_length = <NUM_LIT> ) <EOL> class School ( models . Model ) : <EOL> pass <EOL> class Student ( models . Model ) : <EOL> school = models . ForeignKey ( School , models . CASCADE ) <EOL> class Classroom ( models . Model ) : <EOL> school = models . ForeignKey ( School , models . CASCADE ) <EOL> students = models . ManyToManyField ( Student , related_name = '<STR_LIT>' ) <EOL> class Ticket23605AParent ( models . Model ) : <EOL> pass <EOL> class Ticket23605A ( Ticket23605AParent ) : <EOL> pass <EOL> class Ticket23605B ( models . Model ) : <EOL> modela_fk = models . ForeignKey ( Ticket23605A , models . CASCADE ) <EOL> modelc_fk = models . ForeignKey ( "<STR_LIT>" , models . CASCADE ) <EOL> field_b0 = models . IntegerField ( null = True ) <EOL> field_b1 = models . BooleanField ( default = False ) <EOL> class Ticket23605C ( models . Model ) : <EOL> field_c0 = models . FloatField ( ) <EOL> class Individual ( models . Model ) : <EOL> alive = models . BooleanField ( ) <EOL> class Meta : <EOL> db_table = '<STR_LIT>' <EOL> class RelatedIndividual ( models . Model ) : <EOL> related = models . ForeignKey ( Individual , models . CASCADE , related_name = '<STR_LIT>' ) <EOL> class Meta : <EOL> db_table = '<STR_LIT>' </s>
