Don't try to log into a nonexisting clickthrus table for now
authorMagnus Hagander <magnus@hagander.net>
Sun, 27 Nov 2011 18:08:05 +0000 (19:08 +0100)
committerMagnus Hagander <magnus@hagander.net>
Sun, 27 Nov 2011 18:08:05 +0000 (19:08 +0100)
pgweb/downloads/views.py

index 14223398415d7a9767e6c0d42cdd3413ab8996e4..6247bbfeeb761e8cea95fcb7b1e2f41007d612ca 100644 (file)
@@ -111,16 +111,16 @@ def mirrorselect(request, path):
 # them to our master mirrors again.
 def _mirror_redirect_internal(request, scheme, host, path):
        # Log the access
-       curs = connection.cursor()
-       curs.execute("""INSERT INTO clickthrus (scheme, host, path, country)
-VALUES (%(scheme)s, %(host)s, %(path)s, (
-SELECT countrycode FROM iptocountry WHERE %(ip)s BETWEEN startip and endip LIMIT 1))""", {
-               'scheme': scheme,
-               'host': host,
-               'path': path,
-               'ip': _get_numeric_ip(request),
-})
-       transaction.commit_unless_managed()
+#      curs = connection.cursor()
+#      curs.execute("""INSERT INTO clickthrus (scheme, host, path, country)
+#VALUES (%(scheme)s, %(host)s, %(path)s, (
+#SELECT countrycode FROM iptocountry WHERE %(ip)s BETWEEN startip and endip LIMIT 1))""", {
+#              'scheme': scheme,
+#              'host': host,
+#              'path': path,
+#              'ip': _get_numeric_ip(request),
+#})
+#      transaction.commit_unless_managed()
 
        # Redirect!
        newurl = "%s://%s/%s" % (scheme, host, path)