My apologies if this has been brought up before on this group - my
searching did not turn up anything, but my search skills are
notoriously suspect.

I have been reorganizing my code so that it does not depend on the
project (mostly with success) after watching James Bennet's talk at
Djangocon about reusable apps.  I've chosen to follow the model James
talks about with respect to Ellington - that is, I have a bunch of
interdependent apps that are all under the umbrella of one python
module.  Right now, I actually have one umbrella "app", with a bunch
of proper apps underneath it, so that I only have to put the umbrella
module in INSTALLED_APPS, rather than each sub-app.  I'm not quite
sure if that's the best way to do this, but more on that in a bit.

The only things I don't have working again are my unit tests, and I'd
like to get some feedback on what would be the best way to get them to
work with this sort of setup.  The problem is that my tests and models
are currently in umbrella.app.tests/models, but the test runner
expects them to be in umbrella.tests/models.  Here are a few ways to
get this done, that I can see:

1. Move all my models and tests from umbrella.app to umbrella.  This
almost completely undoes the benefits of breaking the application into
small apps.

2. Rather than just putting umbrella in INSTALLED_APPS, put every
umbrella.app in.  This just seems silly to me, since these apps are
too interdependent to be very useful apart from each other.

3. Write a new test runner that looks in the correct places.  This
makes it harder than just "manage.py test" for other people to test
the app themselves.

If you've dealt with this kind of thing before, or have a good idea/
recommendation, please let me know.  I doubt that there is a
completely satisfactory solution (to me), but I'd like some opinions
on what sucks less.

Thanks,
Brent

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to