We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5b6cad2 commit 0587be1Copy full SHA for 0587be1
1 file changed
xadmin/plugins/utils.py
@@ -2,6 +2,12 @@
2
3
4
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
11
if isinstance(context, RequestContext):
12
ctx = {}
13
map(ctx.update, context.dicts)
0 commit comments