Thursday, March 28, 2013

management commands in namespaced apps

Hi all,
I'm having a hard time making management commands defined in a
namespaced app available to "manage.py".

I have a namespace python package "dja.skel.core" that provides some
functionality and a namespace app "dja.skel.django_skel" which defines
functionality specific to django, a management command named "skel".

"dja.skel.django_skel" is in INSTALLED_APPS but when I run "python
manage.py help" the "skel" management command is not listed.

Tracking down the problem it seems to be caused by the
"imp.find_module()" function in
"django.core.management.find_management_module()".

When calling imp.find_module("dja", None) it returns
'/home/alex/prog/dja_skel/dja.skel.core/dja' for the path, so locating
"dja.skel.django_skel.management" will fail as it is being searched for
in "dja.skel.core".

So my question is if is this a bug or namespace apps are no supported by
django in the way I'm trying to use them?



Thanks in advance

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment