Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Ported over to Python 2.4

  • Loading branch information...
commit 76645aa8bf355734f448f364cd1a266dcf367f52 1 parent 33dfe2c
Antti Rasinen authored jacobian committed
2  README
@@ -6,7 +6,7 @@ This is a suite of template tags to assist in generating charts using Google's
6 6
 for that.
7 7
 
8 8
 Currently the library is long on code, and short on testing and documentation.
9  
-It's only been tested against Django 1.1 and Python 2.5.
  9
+It's only been tested against Django 1.1 and Pythons 2.4 and 2.5.
10 10
 
11 11
 For example usage, see ``docs/examples.html``.
12 12
 
10  googlecharts/templatetags/charts.py
... ...
@@ -1,6 +1,5 @@
1 1
 import sys
2 2
 import inspect
3  
-import functools
4 3
 import colorsys
5 4
 
6 5
 from django import template
@@ -892,9 +891,12 @@ def smart_join(sep, *args):
892 891
 
893 892
 def urlencode(query, safe="/:,|"):
894 893
     '''Omit any options that begin with _; for internal use'''
895  
-    q = functools.partial(quote_plus, safe=safe)
896  
-    query = query.items() if hasattr(query, "items") else query
897  
-    qlist = ["%s=%s" % (q(k), q(v)) for (k,v) in query if not k.startswith('_')]
  894
+
  895
+    if hasattr(query, "items"):
  896
+        query = query.items()
  897
+
  898
+    qlist = ["%s=%s" % (quote_plus(k, safe=safe), quote_plus(v, safe=safe))
  899
+             for (k,v) in query if not k.startswith('_')]
898 900
     return "&".join(qlist)
899 901
     
900 902
 def flatten(iterator):

0 notes on commit 76645aa

Please sign in to comment.
Something went wrong with that request. Please try again.