app中的迁移网址没有迁移类

时间:2017-10-16 00:37:52

标签: django django-migrations

当我尝试运行迁移时,我得到C:\Users\PAPA\DEV\liberty\lib\site-packages\django\db\models\__init__.py:55: RemovedInDjango19Warning: The utilities in django.db.models.loading are deprecated in favor of the new application loading system. from . import loading Traceback (most recent call last): File "manage.py", line 22, in <module> execute_from_command_line(sys.argv) File "...\django\core\management\__init__.py", line 338, in execute_from_command_line utility.execute() File "...\django\core\management\__init__.py", line 330, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "...\django\core\management\base.py", line 390, in run_from_argv self.execute(*args, **cmd_options) File "...\django\core\management\base.py", line 441, in execute output = self.handle(*args, **options) File "...\django\core\management\commands\makemigrations.py", line 63, in handle loader = MigrationLoader(None, ignore_no_migrations=True) File "...\django\db\migrations\loader.py", line 47, in __init__ self.build_graph() File "...\django\db\migrations\loader.py", line 174, in build_graph self.load_disk() File "...\django\db\migrations\loader.py", line 109, in load_disk "Migration %s in app %s has no Migration class" % (migration_name, app_config.label) django.db.migrations.loader.BadMigrationError: Migration urls in app expense has no Migration class ?我刚刚添加了新应用。

不知道要看什么方向。回溯:

AR -o .build_release/lib/libcaffe.a 
LD -o .build_release/lib/libcaffe.so.1.0.0
/usr/bin/ld: cannot find -lhdf5_hl
/usr/bin/ld: cannot find -lhdf5
collect2: error: ld returned 1 exit status 
Makefile:572: recipe for target '.build_release/lib/libcaffe.so.1.0.0' failed
make: *** [.build_release/lib/libcaffe.so.1.0.0] Error 1 

1 个答案:

答案 0 :(得分:5)

如果上述应用程序中的BadMigrationError: "Migration *** in app *** has no Migration class"目录(&#34;费用&#34;)包含一个文件(&#34; urls.py&#34;),则会引发异常"migrations/" 不是有效的迁移文件