tortoise / tortoise/tortoise-orm
Add a modules folder name instead of file names into config_file
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 5.6k
- Forks
- 516
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 9
Description
I am using the json config_file approach for Tortoise ORM setup.
This is a part of the working file:
'apps': {
'my_app': {
'models': ['my_models.users', 'my_models.teams'],
'default_connection': 'default',
}
},
my_models is the folder and users.py and teams.py are its files.
I would like to put just the my_models folder name into the config file and not to have to put my_models.users, my_models.teams etc.
This could be the desired result:
'apps': {
'my_app': {
'models': ['my_models.*'],
'default_connection': 'default',
}
},
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how the JSON config_file loads and resolves the models list; the issue does not name a source file or test. Check how dotted module names are currently handled, then add coverage showing that a folder pattern such as my_models.* discovers its modules and that the configured models still initialize correctly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend, databases
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100