It's actually pretty bad form what they did. __init__py
in this case is a symlink to postres.py
. When you open it on github it just shows the file it points at, because this is how symlinks look when coerced to display. It's not the same as just creating a file yourself and adding a line with a filename.
However, it's not good to actually commit symlinks, because they don't work on all operating systems. Additionally, the whole point here is to allow you to switch between postgres or sqlite3 settings, but if you remove __init__.py
and create a new symlink to sqlite.py
you've actually altered the source code at that point (because it was commited), and you wouldn't be able to pull new changes without reverting back to the original postgres.py
symlink.
However, __init__.py
has to be there or Python won't recognize it as a module. What they should have done is something like:
# __init__.py
from local import *
And, then create a symlink to whatever database settings file they wanted to use at local.py
. That file, then, doesn't get committed, and there's no issues.