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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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
300
Gatsby.jsでWordPressのフロントエンドを作る
dkonishi
0
330
AWS LambdaからSlackに ○○を送る
dkonishi
0
1.3k
Bench京都怖くない
dkonishi
0
240
WordBench京都への関わりと何を得たか
dkonishi
0
190
最近やったCSSの設計と やってみて感じたこと
dkonishi
0
200
Other Decks in Programming
See All in Programming
AmebaブログはKMPから卒業します
kmars0605
0
340
Coding with AI: How to trust the storyteller (AWS Community Day Adria, Ljubljana 2026)
slobodan
0
140
Goコンパイラを作ってGoをもっと理解する / Build a Go compiler to better understand Go
ikura_hamu
0
130
AI時代のIaC入門 〜なぜインフラをコードで管理したいのか?〜 / Introduction to IaC in the AI Era
akihisaikeda
6
1.5k
Apple Intelligenceとオンデバイス時代の到来
yahir0
0
240
ActionController meets Protocol Buffers
sorah
1
800
Python Lambdaにおけるテストしやすい設計とAI支援の活用 / Designing Testable Python Lambda Functions with AI
kitano_yuichi
1
310
クラウドエージェントは、 何がそんなに便利なのか / what makes cloud agents so useful
rkaga
5
810
Getting Started with Vibe Coding
miccheng
0
190
FactoryBotをやめればRSpecは速くなるのか?
yuta_onishi_97
0
1.7k
[JA] Domain Modeling with Vanilla Rails: 「操作」から再考するRailsの設計論
yasaichi
4
1.9k
全ての永続トークンを、生まれる前に消し去りたい!
sylph01
3
1.7k
Featured
See All Featured
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
590
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.4k
Building Applications with DynamoDB
mza
96
7.3k
What does AI have to do with Human Rights?
axbom
PRO
1
2.5k
My Coaching Mixtape
mlcsv
0
380
Everyday Curiosity
cassininazir
0
400
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
660
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
3.1k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.4k
The Invisible Side of Design
smashingmag
301
52k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
1.1k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.9k
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Ͱσʔλ͕ೖΕΒΕͨΒʜ