File: whowill.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 (11 lines) | stat: -rw-r--r-- 386 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
from django_pgschemas.schema import Schema

from . import SchemaCommand


class Command(SchemaCommand):
    help = "Displays which schemas would be used based on the passed schema selectors"

    def handle_schema(self, schema: Schema, *args, **options):
        if options["verbosity"] >= 1:
            self.stdout.write(str(schema.routing) if schema.routing else schema.schema_name)