# HG changeset patch # User Brian Neal # Date 1309401030 0 # Node ID 5b2114cec3e30f2c30874c189b79ee0130e20c40 # Parent 532b9c6f248252b5f94c578dfbf1b4ef7786581e Working on #220. Can't test locally, so committing in increments. diff -r 532b9c6f2482 -r 5b2114cec3e3 gpp/gcalendar/admin.py --- a/gpp/gcalendar/admin.py Thu Jun 30 02:22:16 2011 +0000 +++ b/gpp/gcalendar/admin.py Thu Jun 30 02:30:30 2011 +0000 @@ -6,6 +6,7 @@ from django.conf.urls.defaults import * from django.contrib import admin from django.contrib import messages +from django.contrib.sites.models import Site from django.core.urlresolvers import reverse from django.http import HttpResponse from django.http import HttpResponseRedirect @@ -119,7 +120,9 @@ authorize it. """ - callback_url = reverse('admin:gcalendar-get_access_token') + site = Site.objects.get_current() + callback_url = 'http://%s%s' % (site.domain, + reverse('admin:gcalendar-get_access_token')) try: auth_url = oauth.fetch_auth(request, SCOPES, callback_url) except gdata.client.Error, e: