2017-10-16 4 views
0

마이 그 레이션을 실행하려고하면 "Migration urls in app *** has no Migration class"이 표시됩니까? 방금 새 앱을 추가했습니다.응용 프로그램의 마이 그 레이션 URL에 마이 그 레이션 클래스가 없습니다

어떤 방향으로 보일지 몰라. 역 추적 : 상기 응용 프로그램 ("비용")의 "migrations/" 디렉토리 파일 ("urls.py")를 포함하는 경우 예외 BadMigrationError: "Migration *** in app *** has no Migration class"가 발생

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 

답변

1

유효한 마이그레이션 파일을하지 않습니다.

관련 문제