create plugins have access to project name

This commit is contained in:
Jakub Trllo 2022-07-08 10:49:35 +02:00
parent a88b1f1a33
commit 14acec63c2
2 changed files with 10 additions and 0 deletions

View file

@ -748,6 +748,10 @@ class CreateContext:
def host_name(self):
return os.environ["AVALON_APP"]
@property
def project_name(self):
return self.dbcon.active_project()
@property
def log(self):
"""Dynamic access to logger."""

View file

@ -92,6 +92,12 @@ class BaseCreator:
"""Family that plugin represents."""
pass
@property
def project_name(self):
"""Family that plugin represents."""
self.create_context.project_name
@property
def log(self):
if self._log is None: