Skip to content

Commit 0587be1

Browse files
committed
Doc.
1 parent 5b6cad2 commit 0587be1

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

xadmin/plugins/utils.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33

44
def get_context_dict(context):
5+
"""
6+
Contexts in django version 1.9+ must be dictionaries. As xadmin has a legacy with older versions of django,
7+
the function helps the transition by converting the [RequestContext] object to the dictionary when necessary.
8+
:param context: RequestContext
9+
:return: dict
10+
"""
511
if isinstance(context, RequestContext):
612
ctx = {}
713
map(ctx.update, context.dicts)

0 commit comments

Comments
 (0)