views:

59

answers:

2

Can some one please highlight what should be the process of incorporating reusable django app in a project without using setup.py.

Can we simply move app into project directory and start using it?

+4  A: 

As long as it's on sys.path, it will be found by Django. And yes, you can move it to project's directory.

PiotrLegnica
+1  A: 

To add to that: if you are pretty sure you are only going to use an app once, it may be easiest just to drop it in the project directory; however, I have found that for apps I use more than once, it is easier to put in the sys.path (as mentioned).

Since most apps are availabale via svn or git, I tend to grab the source (trunk) this way, and then create a symbolic link into my site-packages folders (which is on sys.path). This way I can continue to pull updates to the app in this folder.

I do this with the django trunk as well.

For example, I have: ~/src/django-notification and ~/src/django-trunk. And I have then symbolically linked onto my python path.

sudo ln -s ~/src/django-notification/notification /usr/lib/python2.5/site-packages/notification

This way all my projects can import the app easily and I can continue to get updates.

thornomad
But wont you end up having non stable version of apps if you use development version directly?
Software Enthusiastic
Sure could - but you also get the latest features. Django trunk seems to be very stable to me and the apps I use don't get updated that often (only with bug fixes). I am also not using this method on a production machine ... just on my development server. I wouldn't just go about pulling new revisions on a production server without first testing them on the development server.
thornomad