summaryrefslogtreecommitdiffstats
path: root/users/models
diff options
context:
space:
mode:
authorAndrew Godwin2022-11-16 21:12:28 -0700
committerAndrew Godwin2022-11-16 21:12:28 -0700
commit1b52acdb56346d939eb2e26ff449697b52fa7142 (patch)
tree222e5a3de47db230c392f18ab983abe69eb94c5d /users/models
parent44af0d4c59eed1c3715e9044e75c159cfddf54cc (diff)
downloadtakahe-1b52acdb56346d939eb2e26ff449697b52fa7142.tar.gz
takahe-1b52acdb56346d939eb2e26ff449697b52fa7142.tar.bz2
takahe-1b52acdb56346d939eb2e26ff449697b52fa7142.zip
Domains management pages
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)