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}/"
|
base = "/org/{self.slug}/"
|
||||||
details = "{base}details/"
|
details = "{base}details/"
|
||||||
services = "{base}services/"
|
services = "{base}services/"
|
||||||
|
services = "{base}instances/"
|
||||||
|
|
||||||
@cached_property
|
@cached_property
|
||||||
def slug(self):
|
def slug(self):
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import kubernetes
|
import kubernetes
|
||||||
|
import urlman
|
||||||
from django.core.cache import cache
|
from django.core.cache import cache
|
||||||
from django.core.exceptions import ValidationError
|
from django.core.exceptions import ValidationError
|
||||||
from django.db import models
|
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
|
# Names are unique per de-facto namespace, which is defined by the
|
||||||
# Organization + ServiceDefinition (group, version) + the ControlPlane.
|
# Organization + ServiceDefinition (group, version) + the ControlPlane.
|
||||||
unique_together = [("name", "organization", "context")]
|
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