This mailing list is for the development of Django itself, not for support using Django. Please use the django-users mailing list for that, or IRC #django on freenode, or a site like Stack Overflow.
On Tue, 26 Mar 2019 at 05:49, Arun S <arun....@gmail.com> wrote: > Hi, > > I have a Model Class which has the Below schema: > > class Pvt_ip_pools(AtlasAuditModel, AtlasBaseHelper): > """ > Represents a private IP Address used for LB Model. > This inherits all the fields from IPAddress model(database table). > """ > # Each data center has its own IP address range > data_center = models.ForeignKey(DataCenter, > verbose_name="Data Center") > ip = models.GenericIPAddressField(verbose_name="PvtIP", > blank=False, > null=False, > unique=True) > prefix_length = models.PositiveSmallIntegerField(blank=False, > null=False, > unique=False) > gateway = models.GenericIPAddressField(blank=False, > null=False, > unique=False) > > > > > > * server_interface = > models.ForeignKey('ServerInterface', > related_name='pvt_ip_pools', > blank=True, > null=True, > default=None, > on_delete=models.SET_NULL)* > ipv6 = models.BooleanField(default=0) > > segment_id = models.IntegerField(default=0, > verbose_name="Segment_ID") > > > > > * ip_status = > models.ForeignKey('IPStatus', > default=None, > null=True, on_delete=models.CASCADE)* > > class Meta: > verbose_name = "[LB]Private IP Address" > verbose_name_plural = "[LB]Private IP Addresses" > > > In this, When a ServerInterface is Deleted, which is a foriegn Key, the > Model here, sets the attribute to NULL. > But, each of these will have a Object "IP_STATUS" which will have a value > assigned ( FREE, USED ..) > *Now On Delete of the ServerInterface Object, How do i reset the Value of > "IP_STATUS" to FREE everytime Server_interface object is deleted?* > > Another Problem observed is that When The ServerINterface Object is > deleted from ADMIN page, offcourse, it will not call the default delete. > > Even in this case > *, how do i reset the value of IP_STATUS? when Object deleted from ADMIN > Page.* > > Any Help is much appreciated. > > > *Cheers* > > *Arun* > > -- > You received this message because you are subscribed to the Google Groups > "Django developers (Contributions to Django itself)" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to django-developers+unsubscr...@googlegroups.com. > To post to this group, send email to django-developers@googlegroups.com. > Visit this group at https://groups.google.com/group/django-developers. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-developers/147aedbd-7dd2-4cef-bfda-7cd79e9b2e2e%40googlegroups.com > <https://groups.google.com/d/msgid/django-developers/147aedbd-7dd2-4cef-bfda-7cd79e9b2e2e%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- Adam -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-developers+unsubscr...@googlegroups.com. To post to this group, send email to django-developers@googlegroups.com. Visit this group at https://groups.google.com/group/django-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAMyDDM3%2B9OYXgiQQqjvBF4ePZWuP42G7wJRFyrjZnRNGDKauhA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.