... ます: >>> w = CalendarWidget () >>> print ( w . media ) <link href="https://static.example.com/pretty.css" media="all" rel="stylesheet"> <script src="https://static.example.com/animations.js"></script> <script src="https://static.example.com/actions.js"></s ... レンダリングすると、次のようなHTMLになります: < link href = "https://static.example.com/pretty.css" media = "screen" rel = "stylesheet" > < link href = "https://static.example.com/lo_res.css" media = "tv,projector" rel = "stylesheet" > < link href = "https: ... //static.example.com/newspaper.css" media = "print" rel = "stylesheet" > Stylesheet objects ¶ New in Django 6.1. class Stylesheet ( href , ** attributes ) [ソース] ¶ Represents a stylesheet li ... ... ます: >>> w = CalendarWidget () >>> print ( w . media ) <link href="https://static.example.com/pretty.css" media="all" rel="stylesheet"> <script src="https://static.example.com/animations.js"></script> <script src="https://static.example.com/actions.js"></s ... レンダリングすると、次のようなHTMLになります: < link href = "https://static.example.com/pretty.css" media = "screen" rel = "stylesheet" > < link href = "https://static.example.com/lo_res.css" media = "tv,projector" rel = "stylesheet" > < link href = "https: ... //static.example.com/newspaper.css" media = "print" rel = "stylesheet" > Stylesheet objects ¶ New in Django 6.1. class Stylesheet ( href , ** attributes ) [ソース] ¶ Represents a stylesheet li ... ... ng. """ def ttl ( self ): """ Returns the feed's TTL as a normal Python string. """ ttl = 600 # Hard-coded Time To Live. # STYLESHEETS -- Optional. To set, provide one of the following three. # The framework looks for them in this order. def stylesheets ( ... self , obj ): """ Takes the object returned by get_object() and returns the feed's stylesheets (as URL strings or as Stylesheet instances). """ def stylesheets ( self ): """ Returns the feed's stylesheets (as URL str ... ings or Stylesheet instances). """ # Hardcoded stylesheets. stylesheets = [ "/stylesheet1.xsl" , "stylesheet2.xsl" ] # ITEMS -- One of the fo ... ... ng. """ def ttl ( self ): """ Returns the feed's TTL as a normal Python string. """ ttl = 600 # Hard-coded Time To Live. # STYLESHEETS -- Optional. To set, provide one of the following three. # The framework looks for them in this order. def stylesheets ( ... self , obj ): """ Takes the object returned by get_object() and returns the feed's stylesheets (as URL strings or as Stylesheet instances). """ def stylesheets ( self ): """ Returns the feed's stylesheets (as URL str ... ings or Stylesheet instances). """ # Hardcoded stylesheets. stylesheets = [ "/stylesheet1.xsl" , "stylesheet2.xsl" ] # ITEMS -- One of the fo ... ... {{ csp_nonce }} " > // This inline JavaScript will be allowed. </ script > For external <script src="..."> and <link rel="stylesheet"> elements, use the csp_nonce_attr template tag: < script src = "/path/to/script.js" {% csp_nonce_attr %} ></ script > < l ... ink rel = "stylesheet" href = "/path/to/style.css" {% csp_nonce_attr %} > To render a Media object's assets with the nonce applied to each eleme ... ... {{ csp_nonce }} " > // This inline JavaScript will be allowed. </ script > For external <script src="..."> and <link rel="stylesheet"> elements, use the csp_nonce_attr template tag: < script src = "/path/to/script.js" {% csp_nonce_attr %} ></ script > < l ... ink rel = "stylesheet" href = "/path/to/style.css" {% csp_nonce_attr %} > To render a Media object's assets with the nonce applied to each eleme ... ... yth of RSS compatibility . get_tag_uri ( url , date ) [ソース] ¶ TagURI を作成します。 See How to make a good ID in Atom . Stylesheet ¶ class Stylesheet ( url , mimetype = '' , media = 'screen' ) [ソース] ¶ RSS スタイルシートを表します。 url [ソース] ¶ 必須 ... 数です。スタイルシートが配置される URL を意味します。 mimetype [ソース] ¶ An optional string containing the MIME type of the stylesheet. If not specified, Django will attempt to guess it by using Python's mimetypes.guess_type() . Use mimetype=None if you don ... 't want your stylesheet to have a MIME type specified. media ¶ スタイルシートの media 属性として使用される任意の文字列。デフォルトは "screen" です ... ... yth of RSS compatibility . get_tag_uri ( url , date ) [ソース] ¶ TagURI を作成します。 See How to make a good ID in Atom . Stylesheet ¶ class Stylesheet ( url , mimetype = '' , media = 'screen' ) [ソース] ¶ RSS スタイルシートを表します。 url [ソース] ¶ 必須 ... 数です。スタイルシートが配置される URL を意味します。 mimetype [ソース] ¶ An optional string containing the MIME type of the stylesheet. If not specified, Django will attempt to guess it by using Python's mimetypes.guess_type() . Use mimetype=None if you don ... 't want your stylesheet to have a MIME type specified. media ¶ スタイルシートの media 属性として使用される任意の文字列。デフォルトは "screen" です ... ... {{ csp_nonce }} " > // This inline JavaScript will be allowed. </ script > For external <script src="..."> and <link rel="stylesheet"> elements, use the csp_nonce_attr template tag: < script src = "/path/to/script.js" {% csp_nonce_attr %} ></ script > < l ... ink rel = "stylesheet" href = "/path/to/style.css" {% csp_nonce_attr %} > To render a Media object's assets with the nonce applied, pass the obj ... ... {{ csp_nonce }} " > // This inline JavaScript will be allowed. </ script > For external <script src="..."> and <link rel="stylesheet"> elements, use the csp_nonce_attr template tag: < script src = "/path/to/script.js" {% csp_nonce_attr %} ></ script > < l ... ink rel = "stylesheet" href = "/path/to/style.css" {% csp_nonce_attr %} > To render a Media object's assets with the nonce applied, pass the obj ... 2026年10月08日