1.1 --- a/WebStack/Django.py Sat Jan 20 23:16:25 2007 +0000
1.2 +++ b/WebStack/Django.py Sun Jan 21 00:32:06 2007 +0000
1.3 @@ -3,7 +3,7 @@
1.4 """
1.5 Django classes.
1.6
1.7 -Copyright (C) 2006 Paul Boddie <paul@boddie.org.uk>
1.8 +Copyright (C) 2006, 2007 Paul Boddie <paul@boddie.org.uk>
1.9
1.10 This library is free software; you can redistribute it and/or
1.11 modify it under the terms of the GNU Lesser General Public
1.12 @@ -167,6 +167,8 @@
1.13 character values.
1.14 """
1.15
1.16 + encoding = encoding or self.default_charset
1.17 +
1.18 return decode_value(self.request.get_full_path(), encoding)
1.19
1.20 def get_path_without_query(self, encoding=None):
1.21 @@ -197,6 +199,8 @@
1.22 character values.
1.23 """
1.24
1.25 + encoding = encoding or self.default_charset
1.26 +
1.27 path_info = self.request.META.get("PATH_INFO") or ""
1.28 return decode_value(path_info, encoding)
1.29
1.30 @@ -246,6 +250,9 @@
1.31 return fields
1.32
1.33 def _get_fields(self, source, encoding=None):
1.34 +
1.35 + encoding = encoding or self.get_content_type().charset or self.default_charset
1.36 +
1.37 fields = {}
1.38 for name in source.keys():
1.39 name = decode_value(name, encoding)