Add success url to instance model
This commit is contained in:
parent
174837a870
commit
4e44b283b1
2 changed files with 6 additions and 0 deletions
|
@ -49,6 +49,7 @@ class Organization(ServalaModelMixin, models.Model):
|
|||
base = "/org/{self.slug}/"
|
||||
details = "{base}details/"
|
||||
services = "{base}services/"
|
||||
services = "{base}instances/"
|
||||
|
||||
@cached_property
|
||||
def slug(self):
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import kubernetes
|
||||
import urlman
|
||||
from django.core.cache import cache
|
||||
from django.core.exceptions import ValidationError
|
||||
from django.db import models
|
||||
|
@ -452,3 +453,7 @@ class ServiceInstance(ServalaModelMixin, models.Model):
|
|||
# Names are unique per de-facto namespace, which is defined by the
|
||||
# Organization + ServiceDefinition (group, version) + the ControlPlane.
|
||||
unique_together = [("name", "organization", "context")]
|
||||
|
||||
class urls(urlman.Urls):
|
||||
base = "{self.organization.urls.instances}{self.name}/"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue