mirror of
https://github.com/django/django.git
synced 2024-12-25 18:46:22 +00:00
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:
parent
a8455bba92
commit
47d18514b0
@ -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:
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user