summaryrefslogtreecommitdiffstats
path: root/users/models
diff options
context:
space:
mode:
Diffstat (limited to 'users/models')
-rw-r--r--users/models/domain.py7
-rw-r--r--users/models/identity.py1
2 files changed, 8 insertions, 0 deletions
diff --git a/users/models/domain.py b/users/models/domain.py
index d2b17e2..af0bbab 100644
--- a/users/models/domain.py
+++ b/users/models/domain.py
@@ -1,5 +1,6 @@
from typing import Optional
+import urlman
from django.db import models
@@ -47,6 +48,12 @@ class Domain(models.Model):
created = models.DateTimeField(auto_now_add=True)
updated = models.DateTimeField(auto_now=True)
+ class urls(urlman.Urls):
+ root = "/settings/system/domains/"
+ create = "/settings/system/domains/create/"
+ edit = "/settings/system/domains/{self.domain}/"
+ delete = "/settings/system/domains/{self.domain}/delete/"
+
@classmethod
def get_remote_domain(cls, domain: str) -> "Domain":
return cls.objects.get_or_create(domain=domain, local=False)[0]
diff --git a/users/models/identity.py b/users/models/identity.py
index 15caef4..d97f5f0 100644
--- a/users/models/identity.py
+++ b/users/models/identity.py
@@ -67,6 +67,7 @@ class Identity(StatorModel):
blank=True,
null=True,
on_delete=models.PROTECT,
+ related_name="identities",
)
name = models.CharField(max_length=500, blank=True, null=True)