-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ecf3986
commit 93ac49e
Showing
10 changed files
with
68 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
from masonite.environment import LoadEnvironment, env | ||
from masoniteorm.connections import ConnectionResolver | ||
|
||
# Loads in the environment variables when this page is imported. | ||
LoadEnvironment() | ||
|
||
""" | ||
The connections here don't determine the database but determine the "connection". | ||
They can be named whatever you want. | ||
""" | ||
DATABASES = { | ||
"default": env("DB_CONNECTION", "sqlite"), | ||
"sqlite": { | ||
"driver": "sqlite", | ||
"database": env("SQLITE_DB_DATABASE", "masonite.sqlite3"), | ||
"prefix": "", | ||
"log_queries": env("DB_LOG"), | ||
}, | ||
"mysql": { | ||
"driver": "mysql", | ||
"host": env("DB_HOST"), | ||
"user": env("DB_USERNAME"), | ||
"password": env("DB_PASSWORD"), | ||
"database": env("DB_DATABASE"), | ||
"port": env("DB_PORT"), | ||
"prefix": "", | ||
"grammar": "mysql", | ||
"options": { | ||
"charset": "utf8mb4", | ||
}, | ||
"log_queries": env("DB_LOG"), | ||
}, | ||
"postgres": { | ||
"driver": "postgres", | ||
"host": env("DB_HOST"), | ||
"user": env("DB_USERNAME"), | ||
"password": env("DB_PASSWORD"), | ||
"database": env("DB_DATABASE"), | ||
"port": env("DB_PORT"), | ||
"prefix": "", | ||
"grammar": "postgres", | ||
"log_queries": env("DB_LOG"), | ||
}, | ||
"mssql": { | ||
"driver": "mssql", | ||
"host": env("MSSQL_DATABASE_HOST"), | ||
"user": env("MSSQL_DATABASE_USER"), | ||
"password": env("MSSQL_DATABASE_PASSWORD"), | ||
"database": env("MSSQL_DATABASE_DATABASE"), | ||
"port": env("MSSQL_DATABASE_PORT"), | ||
"prefix": "", | ||
"log_queries": env("DB_LOG"), | ||
}, | ||
} | ||
|
||
DB = ConnectionResolver().set_connection_details(DATABASES) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
masonite>=4,<5 | ||
masonite-orm>=2,<3 | ||
black==22.3.0 | ||
flake8==4.0.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
# flake8: noqa F401 | ||
from .providers.instant_article_provider import InstantArticleProvider |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
# flake8: noqa F401 | ||
from .instant_article_provider import InstantArticleProvider |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
# flake8: noqa F401 | ||
from .route import ROUTES |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters