1

I have no bin and lib next to my root directory, which I have in another project but i'm not sure how I got them.

So this is my app tree right now:

Desktop | project | app >      |  
        |         | db.sqlite3 | init.py
        |         | manage.py  | views.py
        |         | templates  | settings.py
        |         |            | urls.py

And my other app has:

Desktop | project | app        | app>        |  
        |         | bin        | init.py     | init.py
        |         | db.sqlite3 | db.sqlite3  | settings.py
        |         | include    | manage.py   | urls.py
        |         | lib        | templates   | views.py

So is one of these improperly configured?/which one is the better option?

Zorgan
  • 8,227
  • 23
  • 106
  • 207

1 Answers1

1

Bin, Lib and Include (which you've shown there too) are all from creating a virtualenv. So likely you've created a Virtualenv and Django project with the exact same name in the same directory.

I'd say you should keep the virtual env and Django project separate so when you push your code to other servers your environment is not going with it.

Hope this helps.

beerandsmiles
  • 134
  • 3
  • 12
  • But the `lib` contains site packages (`lib > python3.5 > site-packages`), so if there's no `lib` where do the site packages go? – Zorgan Apr 18 '17 at 12:09
  • If you're not using a virtual environment to run your application, as in `source Desktop\project\bin\activate`, then your packages are getting installed globally. (you can find the actual directory depending on which os your using) You're right you can manage the packages in this way. I personally prefer not to and to set up each server with fresh installs of the required packages. – beerandsmiles Apr 18 '17 at 12:54
  • This might help if you're looking for installed packages outside of a virtual environment: http://stackoverflow.com/questions/122327/how-do-i-find-the-location-of-my-python-site-packages-directory – beerandsmiles Apr 18 '17 at 13:00