1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

【メモ】django-csvimport

Last updated at Posted at 2019-06-18

読み込むことが可能な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

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?