Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Refs #1834 -- Documented include_admin_script tag in admin interface.…

… Thanks to

Matias Hermanrud Fjeld.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@3147 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit c6dc7089a126ba59e712051a49af8d8c26653d3d 1 parent 271083c
Malcolm Tredinnick authored June 19, 2006
13  django/contrib/admin/templatetags/admin_modify.py
@@ -18,6 +18,19 @@ def class_name_to_underscored(name):
18 18
     return '_'.join([s.lower() for s in word_re.findall(name)[:-1]])
19 19
 
20 20
 def include_admin_script(script_path):
  21
+    """
  22
+    Returns an HTML script element for including a script from the admin
  23
+    media url.
  24
+
  25
+    Example usage::
  26
+
  27
+        {% include_admin_script js/calendar.js %}
  28
+
  29
+    could return::
  30
+
  31
+        <script type="text/javascript" src="/media/admin/js/calendar.js">
  32
+    """
  33
+
21 34
     return '<script type="text/javascript" src="%s%s"></script>' % (settings.ADMIN_MEDIA_PREFIX, script_path)
22 35
 include_admin_script = register.simple_tag(include_admin_script)
23 36
 

0 notes on commit c6dc708

Please sign in to comment.
Something went wrong with that request. Please try again.