Reputation:
For kind of a Hello World application I did this before deploying to heroku:
pip freeze > requirements.txt
and got over 50 dependencies. I figure that's a lot, even so I'd removed the redundant dependencies from setting.py so now it looks like:
INSTALLED_APPS = (
'django.contrib.contenttypes',
'django.contrib.staticfiles',
'app1'
)
MIDDLEWARE_CLASSES = (
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware'
)
What else can I do?
Upvotes: 0
Views: 3254
Reputation: 2790
The pip freeze
command is for things you have installed through the pip
utility.
It has nothing to do with the installed apps you put in the settings.py
. Those are just apps for Django to use. The packages installed via pip
are python packages used by your environment.
Removing packages through pip
might break other projects you are working on or other utilities that need the packages installed in your "global" environment.
It is suggested that you use a separate virtualenv
for every project you do with Python, so each has its own packages installations, own pip utility and python interpreter.
More here in virtualenv
: http://docs.python-guide.org/en/latest/dev/virtualenvs/
Upvotes: 2