<s> """<STR_LIT>""" <EOL> from django . conf import settings <EOL> from django . db import models <EOL> from open_connect . connect_core . utils . models import TimestampModel <EOL> from open_connect . connectmessages . models import Message , MESSAGE_STATUSES <EOL> class ModerationAction ( TimestampModel ) : <EOL> """<STR_LIT>""" <EOL> moderator = models . ForeignKey ( settings . AUTH_USER_MODEL ) <EOL> comment = models . TextField ( blank = True ) <EOL> class Meta ( object ) : <EOL> """<STR_LIT>""" <EOL> verbose_name = '<STR_LIT>' <EOL> verbose_name_plural = '<STR_LIT>' <EOL> ordering = [ '<STR_LIT>' ] <EOL> def __unicode__ ( self ) : <EOL> """<STR_LIT>""" <EOL> return u"<STR_LIT>" % self . moderator <EOL> class MessageModerationAction ( ModerationAction ) : <EOL> """<STR_LIT>""" <EOL> message = models . ForeignKey ( Message ) <EOL> newstatus = models . CharField ( <EOL> default = '<STR_LIT>' , choices = MESSAGE_STATUSES , max_length = <NUM_LIT:50> ) <EOL> class Meta ( object ) : <EOL> """<STR_LIT>""" <EOL> verbose_name = '<STR_LIT>' <EOL> verbose_name_plural = '<STR_LIT>' <EOL> def __unicode__ ( self ) : <EOL> """<STR_LIT>""" <EOL> return u"<STR_LIT>" % ( self . message , self . moderator ) <EOL> class Flag ( TimestampModel ) : <EOL> """<STR_LIT>""" <EOL> flagged_by = models . ForeignKey ( settings . AUTH_USER_MODEL ) <EOL> moderation_action = models . ForeignKey ( <EOL> ModerationAction , blank = True , null = True ) </s>
