When I start a Django 2 project using Pycharm Pro it automatically creates a virtual environment for my project. It sets up a basic Django app with a functional admin app (and some others "apps" apparently I haven't got to yet) Am I supposed to create additional virtual environments for each Django app I build in a sub directory?
Asked
Active
Viewed 103 times
1 Answers
0
I am using also virtualenv for every Django project (not app) . create a distinct virtual_env Folder outside your Django Project.
├── mydjangoproject # --all the Django Stuff
│ ├─ mydjangproject /
│ ├─ myapp1 /
│ └─ <...>
└── mydjango_env / # -- the environment
I recommend to work with a requirement txt so you can keep track of what you installed inside your virtual environment. Especially when you later use third party stuff inside your Django Project. Some Environments may have - from time to time - some Issues with your Project, when you for example update some libraries inside the Environment - at least my xperience. With a requirement txt you can always see what you changed and go back.

black_hole_sun
- 908
- 11
- 41