Fix fetching config from ORM
See original GitHub issue@josephmancuso how do you plan to fetch database config ?
Right now it is :
from config.database import DATABASES
Should we replace it by something like:
from masonite.helpers import config
DATABASES = config("database.databases")
I got some issue with latest version when running masonite-orm command:
ModuleNotFoundError
No module named 'config'
at ~/.virtualenvs/masonite_pingcrm/lib/python3.8/site-packages/masoniteorm/connections/ConnectionFactory.py:48 in make
44│
45│ Returns:
46│ masonite.orm.connection.BaseConnection -- Returns an instance of a BaseConnection class.
47│ """
→ 48│ from config.database import DATABASES
49│
50│ if key == "default":
51│ connection_details = DATABASES.get(DATABASES.get("default"))
52│ connection = self._connections.get(connection_details.get("driver"))
I know a lot of a refactoring is in progress and I don’t if the “masonite config integration” has not been done yet or if it’s a bug. Thanks 👍
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (10 by maintainers)
Top Results From Across the Web
Spring Config server - cant fetch properties - Stack Overflow
I am having trouble fetching the properties form a spring config server with another spring application. I can fetch it with the browser...
Read more >Spring-cloud-config-server not fetching properties file from git ...
The config-server that i have written is not fetching properties files form github when using spring-boot-version 2.0.1.
Read more >Spring Cloud - Bootstrapping - Baeldung
This article shows how to bootstrap spring cloud application by employing four common microservices, the config, the discovery, ...
Read more >2. Spring Cloud Config Server
As Spring Cloud Config Server has a clone of the remote git repository after check-outing branch to local repo (e.g fetching properties by...
Read more >ORM Configuration - SQLAlchemy 1.4 Documentation
I'm getting a warning or error about “Implicitly combining column X under ... The SQLAlchemy ORM, in order to map to a particular...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

we may have to lazy load masonite so it doesn’t conflict with people who don’t have Masonite installed
I will do that in a PR