Django path in your system depends upon on how you have installed Django in your system. If you have installed Django through pip installer then it should be like '/usr/local/lib/python2.7/dist-packages/django/
If you have installed Django manually i.e. by downloading Django-X.Y.tar.gz file then Django will be installed in you python installation directory under /site-packages/ directory Finding Django pathThere different ways you can find that out. the django path may vary depending upon the OS you are using,following examples are for ubuntu12.04.
>>> import django
>>> print django.__file__
'/usr/local/lib/python2.7/dist-packages/django/__init__.py'
or>> import inspect
>> import django
>> print inspect.getabsfile(django) '/usr/local/lib/python2.7/dist-packages/django/__init__.py'
or
>> import django
>> import django
>>django
or
>> import django
>>django.__path__
No comments:
Post a Comment