Changes between Initial Version and Version 1 of Ticket #25486
- Timestamp:
- Sep 30, 2015, 5:17:04 PM (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #25486
- Property Resolution → duplicate
- Property Status new → closed
-
Ticket #25486 – Description
initial v1 32 32 #!python 33 33 class Contact(models.Model): 34 first_name = models.CharField(blank=True, max_length=50) 35 last_name = models.CharField(blank=True, max_length=50) 34 36 35 first_name = models.CharField(blank=True, max_length=50) 36 last_name = models.CharField(blank=True, max_length=50) 37 38 class Meta: 39 ordering = ('last_name','first_name') 40 41 pass 37 class Meta: 38 ordering = ('last_name', 'first_name') 42 39 43 40 class Dealer(models.Model): 44 45 contacts = models.ManyToManyField('Contact', through='DealerContact', related_name='dealers') 46 47 name = models.CharField(db_index=True, max_length=250) 48 49 pass 41 contacts = models.ManyToManyField('Contact', through='DealerContact', related_name='dealers') 42 name = models.CharField(db_index=True, max_length=250) 50 43 51 44 class DealerContact(models.Model): 45 dealer = models.ForeignKey('Dealer', related_name='dealercontacts+', on_delete=models.CASCADE) 46 contact = models.ForeignKey('Contact', related_name='+', on_delete=models.CASCADE) 47 roles = models.ManyToManyField('Role', through='DealerContactRole', related_name='+') 52 48 53 dealer = models.ForeignKey('Dealer', related_name='dealercontacts+', on_delete=models.CASCADE) 54 contact = models.ForeignKey('Contact', related_name='+', on_delete=models.CASCADE) 55 roles = models.ManyToManyField('Role', through='DealerContactRole', related_name='+') 56 57 class Meta: 58 unique_together = ('dealer','contact') 59 60 pass 49 class Meta: 50 unique_together = ('dealer', 'contact') 61 51 62 52 class DealerContactRole(models.Model): 53 dealercontact = models.ForeignKey('DealerContact', related_name='+', on_delete=models.CASCADE) 54 role = models.ForeignKey('Role', related_name='+') 63 55 64 dealercontact = models.ForeignKey('DealerContact', related_name='+', on_delete=models.CASCADE) 65 role = models.ForeignKey('Role', related_name='+') 66 67 class Meta: 68 unique_together = ('dealercontact','role') 69 70 pass 56 class Meta: 57 unique_together = ('dealercontact', 'role') 71 58 72 59 class Role(models.Model): 60 name = models.CharField(db_index=True, max_length=100) 73 61 74 name = models.CharField(db_index=True, max_length=100) 75 76 class Meta: 77 ordering = ('name',) 78 79 pass 62 class Meta: 63 ordering = ('name',) 80 64 }}}