File: models.py

package info (click to toggle)
python-django-pgschemas 1.0.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 848 kB
  • sloc: python: 3,887; makefile: 33; sh: 10; sql: 2
file content (19 lines) | stat: -rw-r--r-- 370 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
from django.conf import settings
from django.db import models

from django_pgschemas.models import TenantModel
from django_pgschemas.routing.models import DomainModel


class Tenant(TenantModel):
    pass


if settings.TENANTS.get("default", {}).get("DOMAIN_MODEL", None) is not None:

    class Domain(DomainModel):
        pass


class Catalog(models.Model):
    pass