import - rancher organization linked deploy --> with dashboards of cooperative management oage

This commit is contained in:
2025-12-22 14:38:52 +03:30
parent 65a826ab7f
commit 5eb810893b
9 changed files with 272 additions and 24 deletions

View File

@@ -146,3 +146,24 @@ class Rancher(BaseModel):
def save(self, *args, **kwargs):
return super(Rancher, self).save(*args, **kwargs)
class RancherOrganizationLink(BaseModel):
organization = models.ForeignKey(
Organization,
on_delete=models.CASCADE,
related_name='rancher_links',
null=True
)
rancher = models.ForeignKey(
Rancher,
on_delete=models.CASCADE,
related_name='organization_links',
null=True
)
def __str__(self):
return f'rancher: {self.rancher.id} - organization: {self.organization.id}'
def save(self, *args, **kwargs):
return super(RancherOrganizationLink, self).save(*args, **kwargs)