settings読み込みエラー
django.core.exceptions.ImproperlyConfigured: Requested setting CACHES, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.
環境変数にsettingsファイルを設定したら解決
DJANGO_SETTINGS_MODULE mysite.settings
http://www.djangoproject.jp/doc/ja/1.0/topics/settings.html https://docs.djangoproject.com/en/dev/topics/settings/
django.db.utils.Error: ('00000', '[00000] [iODBC][Driver Manager]dlopen({SQL Server Native Client 10.0}, 6): image not found (0) (SQLDriverConnect)')
~/TFManager/tfmanager $ python manage.py migrate --list Traceback (most recent call last): File "manage.py", line 10, inexecute_from_command_line(sys.argv) File "/Users/shohayakawa/anaconda/lib/python2.7/site-packages/django/core/management/__init__.py", line 385, in execute_from_command_line utility.execute() File "/Users/shohayakawa/anaconda/lib/python2.7/site-packages/django/core/management/__init__.py", line 377, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/Users/shohayakawa/anaconda/lib/python2.7/site-packages/django/core/management/base.py", line 288, in run_from_argv self.execute(*args, **options.__dict__) File "/Users/shohayakawa/anaconda/lib/python2.7/site-packages/django/core/management/base.py", line 338, in execute output = self.handle(*args, **options) File "/Users/shohayakawa/anaconda/lib/python2.7/site-packages/django/core/management/commands/migrate.py", line 60, in handle return self.show_migration_list(connection, args) File "/Users/shohayakawa/anaconda/lib/python2.7/site-packages/django/core/management/commands/migrate.py", line 307, in show_migration_list loader = MigrationLoader(connection) File "/Users/shohayakawa/anaconda/lib/python2.7/site-packages/django/db/migrations/loader.py", line 48, in __init__ self.build_graph() File "/Users/shohayakawa/anaconda/lib/python2.7/site-packages/django/db/migrations/loader.py", line 179, in build_graph self.applied_migrations = recorder.applied_migrations() File "/Users/shohayakawa/anaconda/lib/python2.7/site-packages/django/db/migrations/recorder.py", line 59, in applied_migrations self.ensure_schema() File "/Users/shohayakawa/anaconda/lib/python2.7/site-packages/django/db/migrations/recorder.py", line 49, in ensure_schema if self.Migration._meta.db_table in self.connection.introspection.get_table_list(self.connection.cursor()): File "/Users/shohayakawa/anaconda/lib/python2.7/site-packages/django/db/backends/__init__.py", line 165, in cursor cursor = self.make_debug_cursor(self._cursor()) File "/Users/shohayakawa/anaconda/lib/python2.7/site-packages/django/db/backends/__init__.py", line 138, in _cursor self.ensure_connection() File "/Users/shohayakawa/anaconda/lib/python2.7/site-packages/django/db/backends/__init__.py", line 133, in ensure_connection self.connect() File "/Users/shohayakawa/anaconda/lib/python2.7/site-packages/django/db/utils.py", line 94, in __exit__ six.reraise(dj_exc_type, dj_exc_value, traceback) File "/Users/shohayakawa/anaconda/lib/python2.7/site-packages/django/db/backends/__init__.py", line 133, in ensure_connection self.connect() File "/Users/shohayakawa/anaconda/lib/python2.7/site-packages/django/db/backends/__init__.py", line 122, in connect self.connection = self.get_new_connection(conn_params) File "/Users/shohayakawa/anaconda/lib/python2.7/site-packages/sql_server/pyodbc/base.py", line 225, in get_new_connection conn = Database.connect(connstr, unicode_results=unicode_results) django.db.utils.Error: ('00000', '[00000] [iODBC][Driver Manager]dlopen({SQL Server Native Client 10.0}, 6): image not found (0) (SQLDriverConnect)') ~/TFManager/tfmanager $
Error creating new content types. Please make sure contenttypes is migrated before trying to migrate apps individually
Error creating new content types. Please make sure contenttypes is migrated before trying to migrate apps individually
djangoでmigrationのラベルを指定してmigrateしようとした時のエラー。
このときはDB移行した時の最初のmigrateだったのでcontenttypesがmigrateされていなかった。
contenttypes -> プロジェクト内のモデルを追跡するアプリケーション
http://www.djangoproject.jp/doc/ja/1.0/ref/contrib/contenttypes.html
Windows Azure SQL Database 管理ポータルから接続文字列をコピーしてきて使う場合
Windows Azure SQL Database 管理ポータルから接続文字列をコピーしてきて使う場合は、SQL Server Native Client 11 の場合、ODBC 接続において Driver 指定を、{SQL Server Native Client 10.0} → {SQL Server Native Client 11.0} に書き換える必要あり
http://blogs.msdn.com/b/jpsql/archive/2013/07/18/windows-azure-web-sql-server-native-client.aspx