changed configurations

parent 835a41a0
......@@ -4,7 +4,7 @@ from fastapi import FastAPI
from tortoise.contrib.fastapi import register_tortoise
TORTOISE_ORM = {
'connections': {'default': os.environ.get('database_url')},
'connections': {'default': os.environ.get('DATABASE_URL')},
'apps': {
'models': {
'models': ['src.app.db.models', 'aerich.models'],
......@@ -17,7 +17,7 @@ TORTOISE_ORM = {
def init_db(app: FastAPI) -> None:
register_tortoise(
app,
db_url=os.environ.get('database_url'),
db_url=os.environ.get('DATABASE_URL'),
modules={"models": ["db.models"]},
generate_schemas=False,
add_exception_handlers=True,
......
......@@ -3,4 +3,4 @@ import os
import pydantic
database_url = pydantic.PostgresDsn(os.getenv('database_url'))
database_url = pydantic.PostgresDsn(os.getenv('DATABASE_URL'))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment