On Wed, Jan 5, 2011 at 4:15 AM, Nils Fredrik Gjerull <[email protected]> wrote:
> Hi, Django folks!
>
> This is my first time posting on the Django developer list. Thanks for
> an amazing framework.
>
> The Distribute build system supports namespaced packages
> (http://packages.python.org/distribute/setuptools.html#namespace-packages).
>
> I have found namespaced packages to be of great help for my use case. A
> project I am working on started out with some apps that were specific
> for that project. Now I need to create a sub-site that uses only some of
> the apps of the original project. I pulled out two of the apps and
> created two separate packages for them. Because the apps had quite
> common package names I did not want to occupy my namespace with them, so
> I put them in a namespace package. This appeared to work correctly until
> I tried to put a management command into one of them. The command were
> not discovered. I traced this to the find_management_module function in
> the django.core.management module.
>
> I have found a way to discover all management packages without having to
> import all the app modules. I tried to do it by importing, but the
> manage.py script were running noticeably slower. I have also made a test
> case.
>
> The code is in:
> https://github.com/nilsfr/django/blob/pht/django/core/management/__init__.py
> https://github.com/nilsfr/django/blob/pht/django/utils/importlib.py
> https://github.com/nilsfr/django/tree/pht/tests/regressiontests/admin_scripts
>
> I do not intend to use this for including different apps with the same
> name, in the same project. Only to avoid occupying the namespace with
> common names, so I can use the same app name for different projects.

A similar request was made in ticket #14087. I closed that ticket as
wontfix because allowing multiple applications with the same name is
fundamentally problematic; however, you have highlighted that that
this problem isn't tied to having two apps with the same name in a
project.

Even better, you've provided a test case that demonstrates the problem
within normal usage.

So - I'm happy to reopen this ticket, and use your github branch as an
RFC patch. The core team is able to pull from github, but If you could
upload a raw patch version to Trac, that would also be helpful.

Yours,
Russ Magee %-)

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" 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-developers?hl=en.

Reply via email to