For may first django app, I used the following process to create app.
$ virtualenv --no-site-packages django-env
$ source django-env/bin/activate
(django-env)$ pip install django
(django-env)$ django-admin.py startproject myproject
Now I have two folders
django-env
myproject
Do I need to include django-env
in git repo (git init), or just myproject. When deploy, how the dependencies are handled.
Don't add the env to the repo. Instead, before deploying, run command pip freeze
and save the output in a text file say requirements.txt. This file should be in the repo. To install dependencies in a fresh virtualenv when deploying:
pip install -r requirements.txt
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With