<s> """<STR_LIT>""" <EOL> from django . db import models <EOL> from django . core . urlresolvers import reverse <EOL> from treeio . core . models import User , Object <EOL> from datetime import datetime <EOL> class ChangeSetStatus ( Object ) : <EOL> "<STR_LIT>" <EOL> name = models . CharField ( max_length = <NUM_LIT> ) <EOL> details = models . TextField ( blank = True , null = True ) <EOL> active = models . BooleanField ( default = True ) <EOL> hidden = models . BooleanField ( default = False ) <EOL> searchable = False <EOL> def __unicode__ ( self ) : <EOL> return self . name <EOL> def get_absolute_url ( self ) : <EOL> "<STR_LIT>" <EOL> return reverse ( '<STR_LIT>' , args = [ self . id ] ) <EOL> class Meta : <EOL> "<STR_LIT>" <EOL> ordering = ( '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT:name>' ) <EOL> class ChangeSet ( models . Model ) : <EOL> """<STR_LIT>""" <EOL> name = models . CharField ( max_length = <NUM_LIT:255> ) <EOL> object = models . ForeignKey ( Object , related_name = '<STR_LIT>' ) <EOL> author = models . ForeignKey ( <EOL> User , null = True , blank = True , related_name = '<STR_LIT>' , on_delete = models . SET_NULL ) <EOL> resolved_by = models . ForeignKey ( <EOL> User , null = True , blank = True , on_delete = models . SET_NULL ) <EOL> resolved_on = models . DateTimeField ( null = True , blank = True ) <EOL> status = models . ForeignKey ( ChangeSetStatus ) <EOL> details = models . TextField ( null = True , blank = True ) <EOL> date_created = models . DateTimeField ( default = datetime . now ) <EOL> def __unicode__ ( self ) : <EOL> return self . name <EOL> def get_absolute_url ( self ) : <EOL> "<STR_LIT>" <EOL> return reverse ( '<STR_LIT>' , args = [ self . id ] ) <EOL> class Meta : <EOL> "<STR_LIT>" <EOL> ordering = ( '<STR_LIT>' , '<STR_LIT:name>' ) <EOL> class Change ( models . Model ) : <EOL> """<STR_LIT>""" <EOL> change_set = models . ForeignKey ( ChangeSet ) <EOL> change_type = models . CharField ( max_length = <NUM_LIT:255> , null = True , blank = True ) <EOL> field = models . CharField ( max_length = <NUM_LIT:255> , null = True , blank = True ) <EOL> change_from = models . TextField ( null = True , blank = True ) <EOL> change_to = models . TextField ( null = True , blank = True ) <EOL> date_created = models . DateTimeField ( default = datetime . now ) <EOL> def __unicode__ ( self ) : <EOL> return self . status <EOL> def get_absolute_url ( self ) : <EOL> "<STR_LIT>" <EOL> return reverse ( '<STR_LIT>' , args = [ self . id ] ) <EOL> class Meta : <EOL> "<STR_LIT>" <EOL> ordering = [ '<STR_LIT>' ] </s>
