Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
django-import-export で マスターデータ管理生活
Search
Daisuke Konishi
December 08, 2019
Programming
280
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
django-import-export で マスターデータ管理生活
PYTHON KANSAI #02
Daisuke Konishi
December 08, 2019
More Decks by Daisuke Konishi
See All by Daisuke Konishi
複数ソースから集めて作る自分サイト
dkonishi
0
130
Kansai WordPress Meetup@京都 近況とこれから
dkonishi
0
180
大阪Pythonの会の紹介@Python Kansai #01
dkonishi
1
220
Netlify Functions 叩き初め
dkonishi
0
290
Gatsby.jsでWordPressのフロントエンドを作る
dkonishi
0
320
AWS LambdaからSlackに ○○を送る
dkonishi
0
1.3k
Bench京都怖くない
dkonishi
0
240
WordBench京都への関わりと何を得たか
dkonishi
0
180
最近やったCSSの設計と やってみて感じたこと
dkonishi
0
200
Other Decks in Programming
See All in Programming
Webの地図
yosuke_furukawa
PRO
6
4.7k
世界の中心で、AI(App Intents)をさけぶ ー App Intents中心設計の実践ガイド
touyou
0
630
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
250
TiDB Cloudのカスタムコントローラーによるオートスケール対応
takaidohigasi
0
130
AHC070解法紹介
eijirou
0
130
スマートフォンでモールス信号を送受信する 〜スマートフォンのLEDとカメラで作る光通信の設計と実装〜
atsuki_seo
0
160
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
220
AI × TiDD / 2026.09.05 Redmine 大阪
tokudiro
1
180
AI が書く Go コードの品質を劇的に向上させる Linter: “declscope”
mpyw
0
380
モデルのリファクタリングが難しいと思ったら、そもそも複雑だったのはビジネス仕様だった ? / is-the-business-domain-the-real-complexity
hatsu38
0
370
市販E-Readerを乗っ取れ 〜Embedded Swiftで電子ペーパーガジェットを制御する〜
trickart
0
200
Security issues being discussed on Web Platforms
petamoriken
0
1k
Featured
See All Featured
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
680
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.6k
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
330
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
530
Product Roadmaps are Hard
iamctodd
55
13k
Six Lessons from altMBA
skipperchong
29
4.5k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
530
So, you think you're a good person
axbom
PRO
2
2.2k
Discover your Explorer Soul
emna__ayadi
2
1.3k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
250
1.3M
How to make the Groovebox
asonas
2
2.4k
Transcript
EKBOHPJNQPSUFYQPSUͰ Ϛελʔσʔλཧੜ׆ %BJTVLF,0/*4)*
%BJTVLF,0/*4)*!TLE@OX ٳ8FCΤϯδχΞ
.FNP%SJQ IUUQTNFNPESJQOFU
None
EKBOHPJNQPSUFYQPSUͷհ
EKBOHPJNQPSUFYQPSUͷհ ཧը໘͔Β$47+40/ͳͲͷΠϯϙʔτΤΫεϙʔτΛ Ͱ͖ΔΑ͏ʹ͢Δ%KBOHPͷϥΠϒϥϦ w ࠩߋ৽มߋͷՄࢹԽΛͯ͘͠ΕΔ w *%ྻࣗͰॻ͔ͳͯ͘ΠϯΫϦϝϯτͯ͘͠ΕΔ Α͏ ʹͰ͖Δ
w ϦϨʔγϣϯΛҙࣝͯ͠*%Λهࡌ͢Δͷਏ͍ https://github.com/django-import-export/django-import-export
͝൧ΛऔΓࠐΉ
from django.db import models class Food(models.Model): name = models.CharField('໊લ', max_length=128)
class Meta: db_table = 'food' verbose_name = '৯' verbose_name_plural = '৯Ұཡ' def __str__(self): return(self.name) GPPENPEFMTQZ
from import_export import resources from .models import Food class FoodResource(resources.ModelResource):
class Meta: model = Food skip_unchanged = True report_skipped = False import_id_fields = ('name', ) from django.contrib import admin from import_export.admin import ImportExportModelAdmin from .foodResources import FoodResource from .models import Food @admin.register(Food) class FoodAdmin(ImportExportModelAdmin): resource_class = FoodResource GPPEBENJOQZ GPPEGPPE3FTPVSDFTQZ
ཧը໘ʹϘλϯ͕૿͑Δ
Πϯϙʔτ࣌ʹࠩදࣔ
Ͳ͏͍͔ͬͯ͘
.FNP%SJQͷ߹ ίʔώʔͷσʔλͱݪ࢈ࠃͷσʔλΛεϓϨουγʔτͰཧɻ $47Ͱు͖ग़ͨ͠ͷΛྲྀ͠ࠐΉΑ͏ʹ͍ͯ͠·͢ɻ
εΫϨΠϐϯάͨ͠σʔλΛ׆༻ ΦʔϓϯσʔλεΫϨΠϐϯάͨ݁͠ՌΛऔΓࠐΉ w αΠτنʹҙ
w άϥϑΛදࣔ͢ΔͳͲ7JFXΛ্ख͘࡞Δ͜ͱ͕Ͱ͖Εɺ ϒϥβͰ৭Μͳਓ͕σʔλΛӾཡՄೳʹ w %KBOHP3&45'SBNFXPSLͰ+40/ΛͬͨΓऔΓ͕ Ͱ͖ΔΑ͏ʹͳΔͷͰɺଞͷΞϓϦέʔγϣϯͱͷ࿈ܞ Մೳʹ %KBOHPͰσʔλ͕ೖΕΒΕͨΒʜ