23👍
To see where your django installation resides, run this at the command line:
python -c "
import sys
sys.path = sys.path[1:]
import django
print(django.__path__)"
On my system, this returns
['/usr/local/lib/python2.7/site-packages/django']
Source: Django Docs
3👍
You should not mess with your system-specific python setup because it is used as a dependency for other programs (which are use python). For example, a manual update of a package in /usr/lib/python2.7/site-packages/ can break a program and also requires root permissions.
Instead, you should create a virtualenv and install django in it:
# create an isolated python environment
virtualenv ~/your_env
# activate this environment, this means that you don't need to mess with your /usr system anymore
source ~/your_env/bin/activate
# use python's standard package manager to install django in the virtualenv
# does not require special permissions
pip install Django
# it will install in: ~/your_env/lib/python2.7/site-packages/
virtualenvs are isolated, safe, and work with your regular user permissions.
- Django Inline Formsets using custom form
- Celerybeat not executing periodic tasks
- Using APITestCase with django-rest-framework
- How to print pretty JSON on a html page from a django template?
0👍
I think you should be looking in site-packages
. Assuming you’re using django 1.4 it should be –
/usr/lib/python2.7/site-packages/django/contrib/admin/templates
- Django template for loop
- Django & the "TemplateDoesNotExist" error
- No web processes running Django in heroku
0👍
Since, everyone is posting my comment’s suggestion, might as well post it myself. Try looking at:
/usr/lib/python2.6/site-packages/django/
0👍
If you are using Python3, Django is located at your venv. In my case templates are located at <project_root>/venv/lib/python3.5/site-packages/django/contrib/admin/templates/
.