<s> from django . db import models <EOL> import mptt <EOL> class Category ( models . Model ) : <EOL> name = models . CharField ( max_length = <NUM_LIT:50> ) <EOL> parent = models . ForeignKey ( '<STR_LIT>' , null = True , blank = True , related_name = '<STR_LIT>' ) <EOL> def __unicode__ ( self ) : <EOL> return self . name <EOL> class Genre ( models . Model ) : <EOL> name = models . CharField ( max_length = <NUM_LIT:50> , unique = True ) <EOL> parent = models . ForeignKey ( '<STR_LIT>' , null = True , blank = True , related_name = '<STR_LIT>' ) <EOL> def __unicode__ ( self ) : <EOL> return self . name <EOL> class Insert ( models . Model ) : <EOL> parent = models . ForeignKey ( '<STR_LIT>' , null = True , blank = True , related_name = '<STR_LIT>' ) <EOL> class Node ( models . Model ) : <EOL> parent = models . ForeignKey ( '<STR_LIT>' , null = True , blank = True , related_name = '<STR_LIT>' ) <EOL> class OrderedInsertion ( models . Model ) : <EOL> name = models . CharField ( max_length = <NUM_LIT:50> ) <EOL> parent = models . ForeignKey ( '<STR_LIT>' , null = True , blank = True , related_name = '<STR_LIT>' ) <EOL> def __unicode__ ( self ) : <EOL> return self . name <EOL> class Tree ( models . Model ) : <EOL> parent = models . ForeignKey ( '<STR_LIT>' , null = True , blank = True , related_name = '<STR_LIT>' ) <EOL> mptt . register ( Category ) <EOL> mptt . register ( Genre ) <EOL> mptt . register ( Insert ) <EOL> mptt . register ( Node , left_attr = '<STR_LIT>' , right_attr = '<STR_LIT>' , level_attr = '<STR_LIT>' , <EOL> tree_id_attr = '<STR_LIT>' ) <EOL> mptt . register ( OrderedInsertion , order_insertion_by = '<STR_LIT:name>' ) <EOL> mptt . register ( Tree ) </s>
