ich stehe nach einer Migration meiner Django-Anwendung auf Version 1.7.1 irgendwie auf dem Schlauch.
In einer App "config" meines Projekts habe ich mir in der Vergangenheit meine Django Custom Commands aus der App "main" immer mittels folgendem Code rausgesucht:
Code: Alles auswählen
def GetCustomCommands():
from django.core.management import find_management_module, find_commands, load_command_class
commands = [(0, '-- bitte waehlen --')]
index = 1
app_name = "main"
command_names = find_commands(find_management_module(app_name))
for command_name in command_names:
help_text = load_command_class(app_name, command_name).help
print "%s\n\t%s (%s)\n" % (command_name, help_text, app_name)
index = index + 1
commands.append((index, command_name))
return commands
Verwendete Python-Version: 2.7
Django-Version: 1.7.1
Läuft alles in der virtualenv.
Ich hoffe, ich habe keine wichtige Information ausgelassen. Danke vorab!