<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>yuheiomori0718</author_name>
  <author_url>https://blog.hatena.ne.jp/yuheiomori0718/</author_url>
  <blog_title>メモ置き場</blog_title>
  <blog_url>https://y0m0r.hateblo.jp/</blog_url>
  <categories>
    <anon>django</anon>
  </categories>
  <description>djangoで入力エラーのとき、input項目にclass=&quot;error&quot;のようにして、デザインを変えたい場合。 フォームで動的にセットするにはどうすればいいか、調べてやってみました。 from django import forms class ContactForm(forms.Form): name = forms.CharField(max_length=10) email = forms.EmailField(widget=forms.TextInput(attrs={'class': 'mail'})) def __init__(self, *args, **kwargs): su…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fy0m0r.hateblo.jp%2Fentry%2F20130328%2F1364482731&quot; title=&quot;Djangoのformエラーのinput要素にclassを付与する - メモ置き場&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>2013-03-28 23:58:51</published>
  <title>Djangoのformエラーのinput要素にclassを付与する</title>
  <type>rich</type>
  <url>https://y0m0r.hateblo.jp/entry/20130328/1364482731</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
