When I try to create the database I get the following error:
python3 manage.py migrate --fake-initial
Using config.settings.local configurations
Operations to perform:
Apply all migrations: account, admin, admin_honeypot, apis, auth, authtoken, contenttypes, events, fitbit, sessions, sites, socialaccount, supplements, users, vendors
Running migrations:
Applying contenttypes.0001_initial... OK
Applying contenttypes.0002_remove_content_type_name... OK
Applying auth.0001_initial... OK
Applying auth.0002_alter_permission_name_max_length... OK
Applying auth.0003_alter_user_email_max_length... OK
Applying auth.0004_alter_user_username_opts... OK
Applying auth.0005_alter_user_last_login_null... OK
Applying auth.0006_require_contenttypes_0002... OK
Applying users.0001_squashed_0014_rename_phone_number_model... OK
Applying account.0001_initial... OK
Applying account.0002_email_max_length... OK
Applying admin.0001_initial... OK
Applying admin.0002_logentry_remove_auto_add... OK
Applying admin_honeypot.0001_initial... OK
Applying admin_honeypot.0002_auto_20160208_0854... OK
Applying apis.0001_initial... OK
Applying apis.0002_auto_20170812_0504... OK
Applying auth.0007_alter_validators_add_error_messages... OK
Applying auth.0008_alter_user_username_max_length... OK
Applying authtoken.0001_initial... OK
Applying authtoken.0002_auto_20160226_1747... OK
Applying vendors.0001_initial... OK
Applying supplements.0001_squashed_0007_auto_20171023_0402... OK
Applying events.0001_squashed_0028_auto_20171113_0332...Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/django/apps/config.py", line 169, in get_model
return self.models[model_name.lower()]
KeyError: 'sleepeventlog'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "manage.py", line 22, in
execute_from_command_line(sys.argv)
File "/usr/local/lib/python3.6/dist-packages/django/core/management/init.py", line 364, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python3.6/dist-packages/django/core/management/init.py", line 356, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/local/lib/python3.6/dist-packages/django/core/management/base.py", line 283, in run_from_argv
self.execute(*args, *cmd_options)
File "/usr/local/lib/python3.6/dist-packages/django/core/management/base.py", line 330, in execute
output = self.handle(args, options)
File "/usr/local/lib/python3.6/dist-packages/django/core/management/commands/migrate.py", line 204, in handle
fake_initial=fake_initial,
File "/usr/local/lib/python3.6/dist-packages/django/db/migrations/executor.py", line 115, in migrate
state = self._migrate_all_forwards(state, plan, full_plan, fake=fake, fake_initial=fake_initial)
File "/usr/local/lib/python3.6/dist-packages/django/db/migrations/executor.py", line 145, in _migrate_all_forwards
state = self.apply_migration(state, migration, fake=fake, fake_initial=fake_initial)
File "/usr/local/lib/python3.6/dist-packages/django/db/migrations/executor.py", line 238, in apply_migration
applied, state = self.detect_soft_applied(state, migration)
File "/usr/local/lib/python3.6/dist-packages/django/db/migrations/executor.py", line 331, in detect_soft_applied
model = apps.get_model(migration.app_label, operation.name)
File "/usr/local/lib/python3.6/dist-packages/django/apps/registry.py", line 205, in get_model
return app_config.get_model(model_name, require_ready=require_ready)
File "/usr/local/lib/python3.6/dist-packages/django/apps/config.py", line 172, in get_model
"App '%s' doesn't have a '%s' model." % (self.label, model_name))
LookupError: App 'events' doesn't have a 'SleepEventLog' model.**
Hi Jeff,
When I try to create the database I get the following error:
python3 manage.py migrate --fake-initial Using config.settings.local configurations Operations to perform: Apply all migrations: account, admin, admin_honeypot, apis, auth, authtoken, contenttypes, events, fitbit, sessions, sites, socialaccount, supplements, users, vendors Running migrations: Applying contenttypes.0001_initial... OK Applying contenttypes.0002_remove_content_type_name... OK Applying auth.0001_initial... OK Applying auth.0002_alter_permission_name_max_length... OK Applying auth.0003_alter_user_email_max_length... OK Applying auth.0004_alter_user_username_opts... OK Applying auth.0005_alter_user_last_login_null... OK Applying auth.0006_require_contenttypes_0002... OK Applying users.0001_squashed_0014_rename_phone_number_model... OK Applying account.0001_initial... OK Applying account.0002_email_max_length... OK Applying admin.0001_initial... OK Applying admin.0002_logentry_remove_auto_add... OK Applying admin_honeypot.0001_initial... OK Applying admin_honeypot.0002_auto_20160208_0854... OK Applying apis.0001_initial... OK Applying apis.0002_auto_20170812_0504... OK Applying auth.0007_alter_validators_add_error_messages... OK Applying auth.0008_alter_user_username_max_length... OK Applying authtoken.0001_initial... OK Applying authtoken.0002_auto_20160226_1747... OK Applying vendors.0001_initial... OK Applying supplements.0001_squashed_0007_auto_20171023_0402... OK Applying events.0001_squashed_0028_auto_20171113_0332...Traceback (most recent call last): File "/usr/local/lib/python3.6/dist-packages/django/apps/config.py", line 169, in get_model return self.models[model_name.lower()] KeyError: 'sleepeventlog'
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "manage.py", line 22, in
execute_from_command_line(sys.argv)
File "/usr/local/lib/python3.6/dist-packages/django/core/management/init.py", line 364, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python3.6/dist-packages/django/core/management/init.py", line 356, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/local/lib/python3.6/dist-packages/django/core/management/base.py", line 283, in run_from_argv
self.execute(*args, *cmd_options)
File "/usr/local/lib/python3.6/dist-packages/django/core/management/base.py", line 330, in execute
output = self.handle(args, options)
File "/usr/local/lib/python3.6/dist-packages/django/core/management/commands/migrate.py", line 204, in handle
fake_initial=fake_initial,
File "/usr/local/lib/python3.6/dist-packages/django/db/migrations/executor.py", line 115, in migrate
state = self._migrate_all_forwards(state, plan, full_plan, fake=fake, fake_initial=fake_initial)
File "/usr/local/lib/python3.6/dist-packages/django/db/migrations/executor.py", line 145, in _migrate_all_forwards
state = self.apply_migration(state, migration, fake=fake, fake_initial=fake_initial)
File "/usr/local/lib/python3.6/dist-packages/django/db/migrations/executor.py", line 238, in apply_migration
applied, state = self.detect_soft_applied(state, migration)
File "/usr/local/lib/python3.6/dist-packages/django/db/migrations/executor.py", line 331, in detect_soft_applied
model = apps.get_model(migration.app_label, operation.name)
File "/usr/local/lib/python3.6/dist-packages/django/apps/registry.py", line 205, in get_model
return app_config.get_model(model_name, require_ready=require_ready)
File "/usr/local/lib/python3.6/dist-packages/django/apps/config.py", line 172, in get_model
"App '%s' doesn't have a '%s' model." % (self.label, model_name))
LookupError: App 'events' doesn't have a 'SleepEventLog' model.**
Thanks,