Closed 4b11b4 closed 5 years ago
Yep pretty much. The steps I follow when adding a new pip package to a project is:
workon potify
pip install djangorestframework
pip freeze > requirements.txt
(from the appropriate directory)git add requirements.txt
.. git commit
etc, so that the new package gets tracked appropriatelyI did the steps above, seems to have installed successfully, and pushed the requirements.txt. If you changed to this branch and pulled the branch tip, that only updates the requirements.txt.
from: https://www.django-rest-framework.org/
Add 'rest_framework' to your INSTALLED_APPS setting.
INSTALLED_APPS = ( ... 'rest_framework', )
This code is located in: potify/potify/settings.py
I added the 'rest_framework' to DJANGO_APPS, above INSTALLED_APPS.
Is this the correct location?
Ah yea nice catch, I missed that step, that's correct location.
The DJANGO_APPS vs LOCAL_APPS separation is a recommendation from two scoops of django (I believe), and DJANGO_APPS is where any django packages that are being imported for use in the project live.
What's the proper way to install this?
For this issue I am strictly talking about installation, not setting up urls or anything within django.
pip install djangorestframework