diff mbox

[Branch,~linaro-validation/lava-server/trunk] Rev 421: Fix top-level domain extraction from site name. Reviewed by milo.

Message ID 20130813122832.5884.32294.launchpad@ackee.canonical.com
State Accepted
Headers show

Commit Message

Stevan Radakovic Aug. 13, 2013, 12:28 p.m. UTC
Merge authors:
  Stevan Radaković (stevanr)
Related merge proposals:
  https://code.launchpad.net/~stevanr/lava-server/google-analytics-domain-fix/+merge/179716
  proposed by: Stevan Radaković (stevanr)
  review: Approve - Milo Casagrande (milo)
------------------------------------------------------------
revno: 421 [merge]
committer: Stevan Radakovic <stevan.radakovic@linaro.org>
branch nick: trunk
timestamp: Tue 2013-08-13 14:28:03 +0200
message:
  Fix top-level domain extraction from site name. Reviewed by milo.
modified:
  google_analytics/templatetags/analytics.py


--
lp:lava-server
https://code.launchpad.net/~linaro-validation/lava-server/trunk

You are subscribed to branch lp:lava-server.
To unsubscribe from this branch go to https://code.launchpad.net/~linaro-validation/lava-server/trunk/+edit-subscription
diff mbox

Patch

=== modified file 'google_analytics/templatetags/analytics.py'
--- google_analytics/templatetags/analytics.py	2013-07-24 11:50:02 +0000
+++ google_analytics/templatetags/analytics.py	2013-08-12 14:28:57 +0000
@@ -46,7 +46,7 @@ 
             t = loader.get_template('google_analytics/analytics_template.html')
             c = Context({
                 'analytics_code': code,
-                'domain': '.'.join(self.site.domain.split('.')[2:])
+                'domain': '.'.join(self.site.domain.split('.')[-2:])
             })
             return t.render(c)
         else: