<s> from django . contrib . auth . models import User <EOL> from django . db import models <EOL> from hackday . assets . models import Attachment , ImageAttachment , Link <EOL> class STATUS ( object ) : <EOL> PENDING = '<STR_LIT:D>' <EOL> APPROVED = '<STR_LIT:P>' <EOL> REJECTED = '<STR_LIT:R>' <EOL> DELETED = '<STR_LIT:X>' <EOL> CHOICES = ( <EOL> ( PENDING , '<STR_LIT>' ) , <EOL> ( APPROVED , '<STR_LIT>' ) , <EOL> ( REJECTED , '<STR_LIT>' ) , <EOL> ( DELETED , '<STR_LIT>' ) , <EOL> ) <EOL> class Charity ( models . Model ) : <EOL> name = models . CharField ( '<STR_LIT>' , max_length = <NUM_LIT:255> , db_index = True , <EOL> unique = True ) <EOL> url = models . CharField ( '<STR_LIT:url>' , max_length = <NUM_LIT:255> ) <EOL> tax_id = models . CharField ( '<STR_LIT>' , max_length = <NUM_LIT:10> , blank = True , null = True ) <EOL> description = models . TextField ( '<STR_LIT>' ) <EOL> status = models . CharField ( max_length = <NUM_LIT:1> , choices = STATUS . CHOICES ) <EOL> attachments = models . ManyToManyField ( Attachment , <EOL> related_name = "<STR_LIT>" , blank = True ) <EOL> images = models . ManyToManyField ( ImageAttachment , <EOL> related_name = "<STR_LIT>" , blank = True ) <EOL> links = models . ManyToManyField ( Link , <EOL> related_name = "<STR_LIT>" , blank = True ) <EOL> suggester = models . ForeignKey ( User ) <EOL> create_date = models . DateTimeField ( '<STR_LIT>' , auto_now_add = True ) <EOL> mod_date = models . DateTimeField ( '<STR_LIT>' , auto_now = True ) <EOL> def __unicode__ ( self ) : <EOL> return self . name <EOL> class Meta : <EOL> verbose_name_plural = "<STR_LIT>" <EOL> ordering = [ '<STR_LIT:name>' ] </s>
