私は Django 1.4 を使用しており、次のようなプロジェクトがあります。
project/
__init__.py
app1/
__init__.py
models.py
views.py
management/
__init__.py
commands/
__init__.py
...many commands...
test/
__init__.py
...many tests...
app2/
__init__.py
models.py
management/
__init__.py
commands/
__init__.py
...many commands...
test/
__init__.py
...many tests...
ここで、models.pyofapp2は空のファイルで、 と の両方app1がapp2にリストされていINSTALLED_APPSます。問題は、私が実行するときです
python manage.py --help
のコマンドは次のapp1ようになります。
[app1]
command1
command2
...
commandsn
app2しかし、インストールされていないかのようなものではありませんapp2。そして、app2namedのコマンドを実行しようとすると、エラーが発生app2commandしますUnknown command: 'app2command'。ただし、特に両方のアプリのテストを実行できます。
python manage.py test app2
うまくいく。app2問題は、モデルがないという事実ですか?