読み込むことが可能なcsv。一番最後に,をつけないと生合成が取れない謎。完全にバグ
"住所CD","都道府県CD","市区町村CD","町域CD","郵便番号","事業所フラグ","廃止フラグ","都道府県","都道府県カナ","市区町村","市区町村カナ","町域","町域カナ","町域補足","京都通り名","字丁目","字丁目カナ","補足","事業所名","事業所名カナ","事業所住所","新住所CD"
60000000,1,1101,11010000,"060-0000",0,0,"北海道","ホッカイドウ","札幌市中央区","サッポロシチュウオウク",," ","(該当なし)",,,,,,,,,
60840600,1,1101,11010000,"060-8406",1,0,"北海道","ホッカイドウ","札幌市中央区","サッポロシチュウオウク",," ","(該当なし)",,,,,"北海道テレビ放送 株式会社","ホツカイドウテレビホウソウ カブシキカイシヤ","北1条西1丁目6番地",,
準備
>>> pip install django-csvimport
...
... INSTALLED_APPS = (
... ...
... 'csvimport.app.CSVImportConf', # use AppConfig for django >=1.7 csvimport >=2.2
... )
pip install messytables
pip uninstall python-magic
pip install python-magic-bin==0.4.14
html5lib
も古いとエラーが出る。
undefined _baseと出て、正しくはbaseになるらしいけど。
ライブラリは修正したくないしな。
>>> makemigrations your_app
>>> migrate