Answer the question
In order to leave comments, you need to log in
Are empty __init__.py needed?
As of Python 3.3+, `__init__.py` is no longer required to indicate that a directory is a package. But Django, when creating projects and applications, still creates these files, if they are deleted - the project works as if nothing had happened. But why do I need these files if I don't plan to add logic there? Maybe it's better to remove them, guided by YAGNI(KISS?)?
Answer the question
In order to leave comments, you need to log in
mkone112 do they bother you a lot? I don't)
And here's another thing, let's think, here you do not want to add logic to __init__, but in another place you want to add, and then what?
I completely agree with Ruslan Gilfanov , I do it myself. If you don’t define apps.py inside the application, then it’s trite even to not declare signals. Therefore, for me, the __init__.py file with such content is the default template.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question