summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorRussell Keith-Magee <russell@keith-magee.com>2007-08-20 13:24:10 +0000
committerRussell Keith-Magee <russell@keith-magee.com>2007-08-20 13:24:10 +0000
commit88987ed0ac6c29b78e2321e6f6687cb1385510fc (patch)
treeb9b836e4dd3f5ba6567230ab558c945668b67d1c /docs
parentc49f2d21ea055ae3c9b66cfd62a9f527a2f6d3b5 (diff)
Fixed #5211 -- Added paths starting with '/' to the list of paths that are preserved as-is by the widget media framework.
git-svn-id: http://code.djangoproject.com/svn/django/branches/newforms-admin@5986 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs')
-rw-r--r--docs/newforms.txt6
1 files changed, 5 insertions, 1 deletions
diff --git a/docs/newforms.txt b/docs/newforms.txt
index 19820bc5eb..503bd6634f 100644
--- a/docs/newforms.txt
+++ b/docs/newforms.txt
@@ -2139,17 +2139,21 @@ Paths in media definitions
--------------------------
Paths used to specify media can be either relative or absolute. If a path
-starts with 'http://' or 'https://', it will be interpreted as an absolute
+starts with '/', 'http://' or 'https://', it will be interpreted as an absolute
path, and left as-is. All other paths will be prepended with the value of
``settings.MEDIA_URL``. For example, if the MEDIA_URL for your site was
``http://media.example.com/``::
class CalendarWidget(forms.TextInput):
class Media:
+ css = {
+ 'all': ('/css/pretty.css',),
+ }
js = ('animations.js', 'http://othersite.com/actions.js')
>>> w = CalendarWidget()
>>> print w.media
+ <link href="/css/pretty.css" type="text/css" media="all" rel="stylesheet" />
<script type="text/javascript" src="http://media.example.com/animations.js"></script>
<script type="text/javascript" src="http://othersite.com/actions.js"></script>