나는 실행이 오류를 얻고있다와 장고 응용 프로그램을 마이그레이션하려고 할 때 "이전 ./manage.py APP_NAME"나는 확신오류 남쪽
While loading migration 'whatever.0001_initial':
Traceback (most recent call last):
File "manage.py", line 14, in <module> execute_manager(settings)
...tons of other stuff..
raise KeyError("The model '%s' from the app '%s' is not available in this migration." % (model, app))
KeyError: "The model 'appuser' from the app 'whatever' is not available in this migration."
모델 "APPUSER은"모두 응용 프로그램 models.py에 있음 그리고 models.py에서 0001_initial.py
APPUSER 모델 :
class AppUser(models.Model):
person = models.OneToOneField('Person')
user = models.ForeignKey(User, unique=True)
class Meta:
permissions = (
('is_one', 'one'),
('is_two', 'two')
)
def __unicode__(self):
return self.person.__unicode__()
APPUSER 모델 0001_initial.py에서 :
# Adding model 'AppUser'
db.create_table('app_appuser', (
('person', models.OneToOneField(orm.Person)),
('id', models.AutoField(primary_key=True)),
('user', models.ForeignKey(orm['auth.User'], unique=True)),
))
db.send_create_signal('app', ['AppUser'])
...
'app.appuser': {
'Meta': {'permissions': "(('is_one','one'),('is_two','two'))"},
'id': ('models.AutoField', [], {'primary_key': 'True'}),
'person': ('models.OneToOneField', ["'Person'"], {}),
'user': ('models.ForeignKey', ['User'], {'unique': 'True'})
},
빈 데이터베이스 (예 : 아니오 "app_ *"같은 테이블) :
manage.py migrate app
이 보인다 맥 OS, 우분투/파이썬 2.6
질문에 아무 probs에만 파이썬 2.5에서 발생하는 수 - 어떻게 해결 하는가?
감사합니다.