i’m creating a django application inside a virtualenv. I have a directory structure like below:
/proj
/apps
/polls
/config
/lib
Currently, i’m using absolute imports everywhere, so for example if I wanted to load lib/utils.py from polls, i’d use ‘from proj.lib import utils’.
This is a bit of a pain though because it seems I need to create a symlink in my site-packages directory to ‘proj’ so that it can resolve where proj points to. How can I make is so I don’t need to create this symlink?
I was going to convert everything to use relative imports, but for some reason PEP008 discourages them. Why is that, and how can I get avoid having to create a symlink?
Thanks
You don’t need to create a symlink. Django will do all to work for you in
manage.py.