我的Windows应用程序使用PostgreSQL作为存储库。
启动时,它会动态设置环境变量python manage.py migrate
Operations to perform:
Synchronize unmigrated apps: adminactions, raven_compat, staticfiles, boot, filebrowser_safe, djrill, sitemaps, compressor, django_countries, django_extensions, rest_framework, mailchimp, grappelli_safe, thumbnail, localflavor
Apply all migrations: shop, core, redirects, generic, django_comments, sessions, admin, report_builder, twitter, galleries, swingtime, sites, auth, blog, brochure, contenttypes, conf, forms, cities_light, checkout, pages
Synchronizing apps without migrations:
Creating tables...
Running deferred SQL...
Installing custom SQL...
Running migrations:
Rendering model states...Traceback (most recent call last):
File "manage.py", line 22, in <module>
execute_from_command_line(sys.argv)
File "/Users/VinayManeti/Documents/hedgehog_lab_projects/backend/venv/latest_gs/lib/python2.7/site-packages/django/core/management/__init__.py", line 338, in execute_from_command_line
utility.execute()
File "/Users/VinayManeti/Documents/hedgehog_lab_projects/backend/venv/latest_gs/lib/python2.7/site-packages/django/core/management/__init__.py", line 330, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/Users/VinayManeti/Documents/hedgehog_lab_projects/backend/venv/latest_gs/lib/python2.7/site-packages/django/core/management/base.py", line 390, in run_from_argv
self.execute(*args, **cmd_options)
File "/Users/VinayManeti/Documents/hedgehog_lab_projects/backend/venv/latest_gs/lib/python2.7/site-packages/django/core/management/base.py", line 441, in execute
output = self.handle(*args, **options)
File "/Users/VinayManeti/Documents/hedgehog_lab_projects/backend/venv/latest_gs/lib/python2.7/site-packages/django/core/management/commands/migrate.py", line 221, in handle
executor.migrate(targets, plan, fake=fake, fake_initial=fake_initial)
File "/Users/VinayManeti/Documents/hedgehog_lab_projects/backend/venv/latest_gs/lib/python2.7/site-packages/django/db/migrations/executor.py", line 104, in migrate
state = migration.mutate_state(state, preserve=do_run)
File "/Users/VinayManeti/Documents/hedgehog_lab_projects/backend/venv/latest_gs/lib/python2.7/site-packages/django/db/migrations/migration.py", line 83, in mutate_state
operation.state_forwards(self.app_label, new_state)
File "/Users/VinayManeti/Documents/hedgehog_lab_projects/backend/venv/latest_gs/lib/python2.7/site-packages/django/db/migrations/operations/fields.py", line 51, in state_forwards
state.reload_model(app_label, self.model_name_lower)
File "/Users/VinayManeti/Documents/hedgehog_lab_projects/backend/venv/latest_gs/lib/python2.7/site-packages/django/db/migrations/state.py", line 97, in reload_model
related_models = get_related_models_recursive(old_model)
File "/Users/VinayManeti/Documents/hedgehog_lab_projects/backend/venv/latest_gs/lib/python2.7/site-packages/django/db/migrations/state.py", line 57, in get_related_models_recursive
rel_app_label, rel_model_name = rel_mod._meta.app_label, rel_mod._meta.model_name
AttributeError: 'NoneType' object has no attribute '_meta'
,以便无需密码验证即可登录。
@ Question
如何禁止任何本地/远程连接? 我只是希望我的应用程序能够登录。