From 47d18514b07fa59ea8b092eb319f6fd60a502ec7 Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Tue, 16 May 2006 20:28:50 +0000 Subject: [PATCH] Fixed #1834 -- Added docstrings to admin template tags. Thanks, ubernostrum git-svn-id: http://code.djangoproject.com/svn/django/trunk@2920 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/contrib/admin/templatetags/adminapplist.py | 11 ++++++++++- django/contrib/admin/templatetags/adminmedia.py | 3 +++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/django/contrib/admin/templatetags/adminapplist.py b/django/contrib/admin/templatetags/adminapplist.py index f672481d26..5e544fe19f 100644 --- a/django/contrib/admin/templatetags/adminapplist.py +++ b/django/contrib/admin/templatetags/adminapplist.py @@ -53,7 +53,16 @@ class AdminApplistNode(template.Node): def get_admin_app_list(parser, token): """ - {% get_admin_app_list as app_list %} + Returns a list of installed applications and models for which the current user + has at least one permission. + + Syntax:: + + {% get_admin_app_list as [context_var_containing_app_list] %} + + Example usage:: + + {% get_admin_app_list as admin_app_list %} """ tokens = token.contents.split() if len(tokens) < 3: diff --git a/django/contrib/admin/templatetags/adminmedia.py b/django/contrib/admin/templatetags/adminmedia.py index 266c017e3d..77863435d4 100644 --- a/django/contrib/admin/templatetags/adminmedia.py +++ b/django/contrib/admin/templatetags/adminmedia.py @@ -3,6 +3,9 @@ from django.template import Library register = Library() def admin_media_prefix(): + """ + Returns the string contained in the setting ADMIN_MEDIA_PREFIX. + """ try: from django.conf import settings except ImportError: