Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed #1834 -- Added docstrings to admin template tags. Thanks, ubern…

…ostrum

git-svn-id: http://code.djangoproject.com/svn/django/trunk@2920 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 47d18514b07fa59ea8b092eb319f6fd60a502ec7 1 parent a8455bb
Adrian Holovaty adrianholovaty authored
11 django/contrib/admin/templatetags/adminapplist.py
View
@@ -53,7 +53,16 @@ def render(self, context):
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:
3  django/contrib/admin/templatetags/adminmedia.py
View
@@ -3,6 +3,9 @@
register = Library()
def admin_media_prefix():
+ """
+ Returns the string contained in the setting ADMIN_MEDIA_PREFIX.
+ """
try:
from django.conf import settings
except ImportError:
Please sign in to comment.
Something went wrong with that request. Please try again.