Skip to content

Commit

Permalink
modify models.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Menghua1 committed Jun 19, 2024
1 parent 3163c23 commit 4bbbb01
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion templates/todo/api/python/todo/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ def __init__(self, *args, **kwargs):
credential = DefaultAzureCredential()
keyvault_client = SecretClient(self.AZURE_KEY_VAULT_ENDPOINT, credential)
for secret in keyvault_client.list_properties_of_secrets():
if secret.name == "AZURE-COSMOS-CONNECTION-STRING":
setattr(
self,
keyvault_name_as_attr(secret.name),
Expand All @@ -32,6 +31,13 @@ def __init__(self, *args, **kwargs):
AZURE_KEY_VAULT_ENDPOINT: Optional[str] = None
APPLICATIONINSIGHTS_CONNECTION_STRING: Optional[str] = None
APPLICATIONINSIGHTS_ROLENAME: Optional[str] = "API"
PRIMARY_WRITE_KEY: str = ""
PRIMARY_READONLY_KEY: str = ""
SECONDARY_WRITE_CONNECTIONSTRING: str = ""
PRIMARY_READONLY_CONNECTIONSTRING: str = ""
SECONDARY_WRITE_KEY: str = ""
SECONDARY_READONLY_KEY: str = ""
SECONDARY_READONLY_CONNECTIONSTRING: str = ""

class Config:
env_file = ".env"
Expand Down

0 comments on commit 4bbbb01

Please sign in to comment.