Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
T
task_treker
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Мырзабеков Бекайдар
task_treker
Commits
6727f5eb
Commit
6727f5eb
authored
Dec 04, 2023
by
Мырзабеков Бекайдар
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changed configurations
parent
835a41a0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
conf.py
src/app/db/conf.py
+2
-2
settings.py
src/app/settings.py
+1
-1
No files found.
src/app/db/conf.py
View file @
6727f5eb
...
...
@@ -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
,
...
...
src/app/settings.py
View file @
6727f5eb
...
...
@@ -3,4 +3,4 @@ import os
import
pydantic
database_url
=
pydantic
.
PostgresDsn
(
os
.
getenv
(
'
database_url
'
))
database_url
=
pydantic
.
PostgresDsn
(
os
.
getenv
(
'
DATABASE_URL
'
))
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment