<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>fgshun</author_name>
  <author_url>https://blog.hatena.ne.jp/fgshun/</author_url>
  <blog_title>銀月の符号</blog_title>
  <blog_url>https://fgshun.hatenablog.com/</blog_url>
  <categories>
    <anon>Python</anon>
    <anon>Django</anon>
  </categories>
  <description>Python 札幌第３回開催直前、便乗 Django ネタ。第２回未参加なので既出かも。 manage.py にオリジナルのコマンドを追加する方法について。また、 manage.py shell インタラクティブシェルで実験したいけれど長くなりそう、というときの代わりにも使える。「アクションを追加する」も参照。コマンド名.py というファイルを作る。雛形は以下。 BaseCommand を継承した Command という名のクラスを作る。そして handle というメソッドを作る。この中に動作を書く。 from django.core.management.base import BaseCo…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ffgshun.hatenablog.com%2Fentry%2F20090712%2F1247369588&quot; title=&quot;manage.py コマンドの追加 - 銀月の符号&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></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2009-07-12 12:33:08</published>
  <title>manage.py コマンドの追加</title>
  <type>rich</type>
  <url>https://fgshun.hatenablog.com/entry/20090712/1247369588</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
