<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>heaven2023</author_name>
  <author_url>https://blog.hatena.ne.jp/heaven2023/</author_url>
  <blog_title>iimon TECH BLOG</blog_title>
  <blog_url>https://tech.iimon.co.jp/</blog_url>
  <categories>
  </categories>
  <description>こんにちは、ideです。 SQLを使って手動でデータを変更する場合、どんな単純な作業でも手順ミスは起こりえるかなと思います。 そこで今回は、Django上で選択した内容に応じてSQLを作成して実行し、結果を実行ログとして残すまでの 一連の流れをまとめました。 UIはDjangoに統合する形にしています。 今回は新規権限をリリースしたあと、基準となる権限が付与されているアカウント全てに、新規権限を一括付与する といったユースケースを想定しています。 前提 Python 3.13 / Django 5.2（管理ユーザー作成済み） この記事で実装するもの 権限付与のフォーム 管理画面と同じ見た目で表…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftech.iimon.co.jp%2Fentry%2F2025%2F08%2F19%2F151722&quot; title=&quot;Djangoで独自SQLを実行し、実行履歴を残す - iimon TECH BLOG&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url>https://cdn-ak.f.st-hatena.com/images/fotolife/h/heaven2023/20250817/20250817230322.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2025-08-19 15:17:22</published>
  <title>Djangoで独自SQLを実行し、実行履歴を残す</title>
  <type>rich</type>
  <url>https://tech.iimon.co.jp/entry/2025/08/19/151722</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
