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
This commit is contained in:
Adrian Holovaty 2006-05-16 20:28:50 +00:00
parent a8455bba92
commit 47d18514b0
2 changed files with 13 additions and 1 deletions

View File

@ -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:

View File

@ -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: