Hello,
I've made a custom management command like this:
$ find -name "*.py*"
./manage.py
./__init__.pyc
./settings.pyc
./urls.py
./urls.pyc
./vortaro/management/commands/import_vortaro.py
./vortaro/management/commands/import_vortaro.pyc
./vortaro/management/commands/__init__.pyc
./vortaro/management/commands/__init__.py
./vortaro/management/__init__.pyc
./vortaro/management/__init__.py
./vortaro/models.py
./vortaro/__init__.pyc
./vortaro/models.pyc
./vortaro/__init__.py
./vortaro/views.py
./__init__.py
./settings.py
and:
$ cat ./vortaro/management/commands/import_vortaro.py
from django.core.management.base import NoArgsCommand
class Command(NoArgsCommand):
help = "Import a set of xml from reta-vortaro."
# args = "[datadir]"
# label = "data directory"
requires_model_validation = True
can_import_settings = True
def handle_noargs(self, **options):
print("Hello world!")
print("Options: %s" % options)
but it is not being picked up. ./manage.py help doesn't list it and:
$ ./manage.py import_vortaro
Unknown command: 'import_vortaro'
Type 'manage.py help' for usage.
With the manage.py shell I can import the command and run it, so
syntactically, everything is correct. I'm running a very recent Django
(r7534). Any ideas what's wrong and/or how to find out?
Thanks.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---