summaryrefslogtreecommitdiff
path: root/django/utils
diff options
context:
space:
mode:
Diffstat (limited to 'django/utils')
-rw-r--r--django/utils/datastructures.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/django/utils/datastructures.py b/django/utils/datastructures.py
index b0b449c76d..46f705f747 100644
--- a/django/utils/datastructures.py
+++ b/django/utils/datastructures.py
@@ -391,6 +391,12 @@ class MultiValueDict(dict):
for key, value in kwargs.iteritems():
self.setlistdefault(key, []).append(value)
+ def dict(self):
+ """
+ Returns current object as a dict with singular values.
+ """
+ return dict((key, self[key]) for key in self)
+
class DotExpandedDict(dict):
"""
A special dictionary constructor that takes a dictionary in which the keys