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
commu on GKE
Search
株式会社Curious Vehicle
February 07, 2025
49
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
commu on GKE
株式会社Curious Vehicle
February 07, 2025
More Decks by 株式会社Curious Vehicle
See All by 株式会社Curious Vehicle
AI Agent Harness 入門
curicle
0
6
クネビンフレームワークで考える最初の一歩
curicle
0
6
AIガバナンス
curicle
0
7
PQCが変える暗号の世界
curicle
0
49
最近流行ってるClaudeについて
curicle
0
17
ElasticsearchのHA構成について
curicle
0
27
機械学習で絶対音感になりたかった
curicle
0
20
BQにおけるSQLアンチパターンとslot消費削減策
curicle
0
35
VibeKanbanについて
curicle
0
16
Featured
See All Featured
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
570
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2.2k
Faster Mobile Websites
deanohume
310
32k
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
330
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
360
Mobile First: as difficult as doing things right
swwweet
225
10k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.4k
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
850
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
320
Discover your Explorer Soul
emna__ayadi
2
1.3k
Google's AI Overviews - The New Search
badams
0
1.6k
Transcript
Commu on GKE 第46回勉強会
なぜGKEなのか micro instance のお値段なんと300円(1ヶ 月)
とりあえずコンテナにする必要がある コンテナ化ならすでにやった ※第36回勉強会の資料を参考。 DBはCloud SQLなり、mysqlのイメージを 使うなりどうにでもなりそう。 いけそうな気がする
できなかった MySQL のconnectorが古すぎてダウンロードできない 他のコネクタはどういうわけか1.7では動かない 影響が少なく済むようDjango 1.8 あたりへの移行しようとしたけど、Python3.5への バージョンアップを余儀無くされる 芋づる式にどんどんと問題が出てくる 結局のところ、Django
2系、Pythonや 周辺ライブラリも極力最新化する方が楽
というわけで
Commu on GKE 第46回勉強会
Commu on GKE 第46回勉強会
Django 1.7 → Django 2.2 マイグレーション 第46回勉強会
調査方法 バージョンの間隔がだいぶ空いてしまっており、まともなマイグレーションガイドはないた め、基本はエラーを出してググるの繰り返し mysql-connector-python→mysql-clientの交換が一部の壁 あとは大体エラーメッセージがどうやればいいか教えてくれる
makemigrationsが必要 特段、変更を加えていないのにmigrationが増える。
ForeignKeyの引数にon_deleteを追加する 必要がある 親が消された時のアクションを指定する必要がある。 数が多く非常に面倒。
DBのbackendを変更 ダウンロードできなくなっていたmysql-connector-python から mysql-clientへDB接続モ ジュールを変更したので、ENGINEの表記を変更
SettingsにTEMPLATESというテンプレート用 の設定を追加 TEMPLATE_XXXという設定値は全てここにまとめられたようです。
SettingsにMIDDLEWAREというミドルウェア 用の設定を追加 MIDDLEWARE_CLASSESという設定値をMIDDLEWAREという名前に変更
URLの設定の仕方が大幅改変 Urlpatternsを配列に変更し、url という関数を re_path という関数に置き換える。 モジュールの指定も文字列ではなく、関数を直接指定。
Model._meta.get_field().defaultが動か なくなっているので、別の方法に変更 特定のモデルを継承したモデルのデフォルト値設定部分を一部書き換える必要がある
ユーザーモデルのis_authenticatedが callableではなくなっている。 関数コールからプロパティの呼び出しに変更する
render_to_responseの仕様変更に伴って、 renderを採用 render_to_responseがcontext_instanceを受け取れなくなっているので、 renderで書き直し
ユーザーのパーミッション指定の方法を 変更 パーミッション指定を直接代入からset関数を利用するよう変更
まとめ Djangoはこまめにバージョンアップした方が結果的に楽そう 年1回程度、ダウンロードできないものがないかをチェックした方が良い カラムのタイプ変更がいつの間にか可能になっていた。 次はこれをベースにGKEをやる予定
ご静聴ありがとうございました