Changes between Initial Version and Version 1 of Ticket #12937


Ignore:
Timestamp:
02/22/2010 03:22:21 PM (5 years ago)
Author:
ramiro
Comment:

reformatted description, please use the Preview feature.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #12937

    • Property Patch needs improvement unset
    • Property Needs tests unset
    • Property Needs documentation unset
  • Ticket #12937 – Description

    initial v1  
    22
    33{{{
    4 bmodels.Contact.objects.select_related('IR_contact','consumer_contact','program','consumer').filter(consumer__file=file).order_by('-
    5 date') }}}
     4bmodels.Contact.objects.select_related('IR_contact','consumer_contact','program','consumer').filter(consumer__file=file).order_by('-date')
     5}}}
    66
    77And the following models:
    88
    99{{{
    10 
    1110class Contact(models.Model):
    1211    program = models.ForeignKey('agency.Program')
    13     consumer =
    14 models.ForeignKey('consumer.Consumer',null=True,blank=True)
     12    consumer = models.ForeignKey('consumer.Consumer',null=True,blank=True)
    1513    date = models.DateField('Contact Date')
    1614    notes = models.TextField()
    1715    date_added = models.DateTimeField(editable=False)
    18     method =
    19 models.CharField(max_length=10,choices=choices.CONTACT_METHOD,\
     16    method = models.CharField(max_length=10,choices=choices.CONTACT_METHOD,\
    2017            null=True,blank=True)
    2118
    2219# consumer_contact
    2320class Contact(basemodels.Contact):
    24     base = models.OneToOneField(basemodels.Contact,
    25 parent_link=True,related_name="consumer_contact")
     21    base = models.OneToOneField(basemodels.Contact, parent_link=True,related_name="consumer_contact")
    2622    service = models.ForeignKey(Service)
    27     confidential = models.BooleanField(default=False,help_text='These
    28 notes will not be visible to general staff')
     23    confidential = models.BooleanField(default=False,help_text='These notes will not be visible to general staff')
    2924    group = models.ForeignKey(Group,null=True,blank=True)
    30     group_contact =
    31 models.ForeignKey('consumer.GroupContact',blank=True,null=True)
     25    group_contact = models.ForeignKey('consumer.GroupContact',blank=True,null=True)
    3226
    3327    def save(self, *args, **kwargs):
     
    4135#ir_contact
    4236class Contact(basemodels.Contact):
    43 
    44 base=models.OneToOneField(BaseContact,parent_link=True,related_name='IR_contact')
     37    base=models.OneToOneField(BaseContact,parent_link=True,related_name='IR_contact')
    4538    IR=models.ForeignKey(IR,blank=True,null=True)
    46 
    47 referred_from=models.ForeignKey(ReferralSource,related_name='IR_referred_from')
    48 
    49 referred_to=models.ManyToManyField(ReferralSource,related_name='IR_referred_to')
    50 
    51 information=models.ManyToManyField(Information,verbose_name='Information
    52 Requested')
    53 
     39    referred_from=models.ForeignKey(ReferralSource,related_name='IR_referred_from')
     40    referred_to=models.ManyToManyField(ReferralSource,related_name='IR_referred_to')
     41    information=models.ManyToManyField(Information,verbose_name='Information Requested')
    5442}}}
    5543
     
    5745
    5846{{{
    59 
    6047SELECT (fields) FROM `base_contact`
    6148
     
    8673
    8774WHERE `consumer_consumer`.`file` = 06-1757 ORDER BY `base_contact`.`date` DESC
    88 
    8975}}}
    9076
Back to Top