I'm not in front of my code at the moment, but I'm pretty sure there's no magic involved, and it works just fine. When I do a runserver from my (completely decoupled) project, the root urlconf sends everything to umbrella.urls, which then delegates once again to umbrella.app.urls, which knows where to find the views, and the views know where to find the models. Everything just looks for the parts they need, relative to umbrella. That's not magic, is it? Seems to me, it's pretty much just like it used to work before, just with one more layer of indirection in the url resolution. And it's still decoupled, because any user can just bypass the default urlconf that I provide, and go directly to umbrella.app.urls from their project urlconf, if they wish.
In any case, I will try the umbrella.* thing. Will that try to put things like umbrella.urls and umbrella.templates into INSTALLED_APPS, too? On Oct 8, 7:38 am, Carl Meyer <[EMAIL PROTECTED]> wrote: > On Oct 7, 10:28 pm, Brent Hagany <[EMAIL PROTECTED]> wrote: > > > 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. > > This can't be working as you describe it, unless you're doing some > other magic you aren't telling us about to get your models loaded. > The same problem you're having with tests you should be having with > models as well; Django will look for your models in umbrella.models, > not umbrella.app.models, because you just have "umbrella" in > INSTALLED_APPS. > > The solution to both problems is to include "umbrella.*" in > INSTALLED_APPS. This will include every app inside the umbrella > package, without you having to list them all separately. > > Carl --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected] 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 -~----------~----~----~----~------~----~------~--~---

