Django
ファイルの文字コードをutf-8にしてで保存する http://stackoverflow.com/questions/11072478/python-unicodedecodeerror-utf8-codec-cant-decode-byte-unexpected-code-byt http://advweb.seesaa.net/article/3074705.html
http://stackoverflow.com/questions/3852104/select-distinct-individual-columns-in-django
objects.all().delete()でエラー C:\Users\shohaya\tf-manager\tfmanager\db>python initteam.py Traceback (most recent call last): File "initteam.py", line 60, in init_team() File "initteam.py", line 49, in init_team obj.delete() File "C:\Anaco…
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. 環境変数…
http://a-records.info/2014/09/29/18/
~/TFManager/tfmanager $ python manage.py migrate --list Traceback (most recent call last): File "manage.py", line 10, in execute_from_command_line(sys.argv) File "/Users/shohayakawa/anaconda/lib/python2.7/site-packages/django/core/manageme…
macではできないっぽい http://dba.stackexchange.com/questions/62513/sql-server-on-mac linuxではできる? http://msdn.microsoft.com/en-us/library/hh568451%28v=sql.110%29.aspx
Error creating new content types. Please make sure contenttypes is migrated before trying to migrate apps individually djangoでmigrationのラベルを指定してmigrateしようとした時のエラー。このときはDB移行した時の最初のmigrateだったのでcontent…
Windows Azure SQL Database 管理ポータルから接続文字列をコピーしてきて使う場合は、SQL Server Native Client 11 の場合、ODBC 接続において Driver 指定を、{SQL Server Native Client 10.0} → {SQL Server Native Client 11.0} に書き換える必要あり ht…
ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified in SSRS odbcのエラー settings.pyで指定しているODBCの名前が違うことによるエラーだった。 あとSQL Server Expressをインストールしていない…
pipでインストール時にUnicodeDecodeError C:\> pip install django-pyodbc-azure Downloading/unpacking django-pyodbc-azure Cleaning up... Exception: Traceback (most recent call last): File "C:\Anaconda\lib\site-packages\pip\basecommand.py", li…
$ sudo pip install django-pyodbc-azure Password: Requirement already satisfied (use --upgrade to upgrade): django-pyodbc-azure in /Users/shohayakawa/anaconda/lib/python2.7/site-packages Downloading/unpacking Django>=1.7.1 (from django-pyod…
n file included from /private/tmp/pip_build_root/pyodbc/src/buffer.cpp:12: /private/tmp/pip_build_root/pyodbc/src/pyodbc.h:52:10: fatal error: 'sql.h' file not found #include sql.h ^ 1 error generated. error: command 'gcc' failed with exit…
調べてみるとmodelを変更した後にalter tableしないといけないとあったが、しなくてもできたっぽい。 ①model変更②makemigrations③migrate python manage.py makemigrations python manage.py migrate http://i2bskn.hateblo.jp/entry/20120616/1339852257 ht…
①Modelにクラス追加 ②makemigrations python manage.py makemigrations ③migrate python manage.py migrate
$ python manage.py migrate --list 上記のコマンドでmigrationの状態を確認 admin [X] 0001_initial auth [X] 0001_initial contenttypes [X] 0001_initial login [X] 0001_initial manager [X] 0001_initial [X] 0002_auto_20140922_1937 [ ] 0003_auto_20…
http://ameblo.jp/ekispresso/entry-11485508958.html
AttributeError: Manager isn't available; User has been swapped for 'login.User' http://stackoverflow.com/questions/17873855/manager-isnt-available-user-has-been-swapped-for-pet-person