miércoles, 27 de enero de 2016

Django, where are the INSTALLED_APPS saved? How to debug them?

This is a brief comment about where are the django INSTALLED_APPS installed.

So basically when you are installing a new app that you are planning to us, django-undriendly for example, it can be installed with easy install with follow premises:

a) You have to execute it in the virtual environment (virtualenv) of your project
b)  do not execute easy_install with sudo.

Now, where are the INSTALLED_APPS?

For example , mi virtual environment is located at:

/home/my_user/dd/

then the INSTALLED_APPS are at:

/home/my_user/dd/lib/python2.7/site-packages/django_unfriendly-0.4.1-py2.7.egg/

There you are!!!


Ok, now a little tip. You probably want to debug the INSTALLED_APPS cause there is a bug or they are not doing something you want to. 

Inside that directory are couple of subdirectories: EGG-INFO  unfriendly

EGG-INFO has the dependencies, package info, name of the APP, etc.

'unfriendly' has  views.py and all the APP views, you can add traces like: print "THIS IS MY TRACE MESSAGE" 


Enjoy!
P.S.  Do you want to hear some music from the animalflag band?



No hay comentarios:

Publicar un comentario en la entrada