authentik.blueprints.management.commands.export_blueprint
Export blueprint of current authentik install
1"""Export blueprint of current authentik install""" 2 3from django.core.management.base import no_translations 4from structlog.stdlib import get_logger 5 6from authentik.blueprints.v1.exporter import Exporter 7from authentik.tenants.management import TenantCommand 8 9LOGGER = get_logger() 10 11 12class Command(TenantCommand): 13 """Export blueprint of current authentik install""" 14 15 @no_translations 16 def handle_per_tenant(self, *args, **options): 17 """Export blueprint of current authentik install""" 18 exporter = Exporter() 19 self.stdout.write(exporter.export_to_string())
LOGGER =
<BoundLoggerLazyProxy(logger=None, wrapper_class=None, processors=None, context_class=None, initial_values={}, logger_factory_args=())>
13class Command(TenantCommand): 14 """Export blueprint of current authentik install""" 15 16 @no_translations 17 def handle_per_tenant(self, *args, **options): 18 """Export blueprint of current authentik install""" 19 exporter = Exporter() 20 self.stdout.write(exporter.export_to_string())
Export blueprint of current authentik install
def
handle_per_tenant(*args, **kwargs):
106 def wrapper(*args, **kwargs): 107 from django.utils import translation 108 109 saved_locale = translation.get_language() 110 translation.deactivate_all() 111 try: 112 res = handle_func(*args, **kwargs) 113 finally: 114 if saved_locale is not None: 115 translation.activate(saved_locale) 116 return res
The type of the None singleton.