Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chapter 4: Best Practices #405

Open
Gatasso opened this issue Dec 1, 2024 · 1 comment
Open

Chapter 4: Best Practices #405

Gatasso opened this issue Dec 1, 2024 · 1 comment
Labels

Comments

@Gatasso
Copy link

Gatasso commented Dec 1, 2024

I just want to know if its better to insert config.py and model.py into respective directories config and model.

And in case that this is better, must I create an __init__.py in these directories so then I work with them as packages?

@miguelgrinberg
Copy link
Owner

It really makes no difference. A sub-package is normally used when you have more than one file. For example, if your models.py gets large you can split it into multiple parts and put all the parts inside a models sub-package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants