try:
request_url = provider_class.prepare_authentication_request(request,
- reverse('auth_provider_done',
+ reverse('auth_provider_done', prefix='/',
kwargs={'provider': provider}))
return HttpResponseRedirect(request_url)
if request.user.is_authenticated():
messages.info(request, _("Your question is pending until you %s.") % html.hyperlink(
- reverse('send_validation_email'), _("validate your email")
+ django_settings.APP_URL + reverse('send_validation_email', prefix='/'), _("validate your email")
))
return HttpResponseRedirect(reverse('index'))
else:
if request.user.is_authenticated():
messages.info(request, _("Your answer is pending until you %s.") % html.hyperlink(
- reverse('send_validation_email'), _("validate your email")
+ django_settings.APP_URL + reverse('send_validation_email', prefix='/'), _("validate your email")
))
return HttpResponseRedirect(question.get_absolute_url())
else:
from django.conf import settings as django_settings
from django.utils.encoding import smart_unicode
+from django.core.urlresolvers import reverse
from django.utils.translation import ugettext as _
import settings
def process_authentication_request(self, request):
try:
- args = dict(client_id=settings.FB_API_KEY, redirect_uri="%s%s" % (django_settings.APP_URL, request.path))
+ redirect_uri = "%s%s" % (django_settings.APP_URL, reverse('auth_provider_done', prefix='/', kwargs={'provider': 'facebook'}))
+ args = dict(client_id=settings.FB_API_KEY, redirect_uri=redirect_uri)
args["client_secret"] = settings.FB_APP_SECRET #facebook APP Secret
parameters = {}
# If the installation is configured to automatically redirect to the Twitter provider done page -- do it.
if bool(TWITTER_AUTO_CALLBACK_REDIRECT):
- callback_url = '%s%s' % (APP_URL, reverse('auth_provider_done', kwargs={ 'provider' : 'twitter', }))
+ callback_url = '%s%s' % (APP_URL, reverse('auth_provider_done', prefix='/', kwargs={'provider' : 'twitter'}))
# Pass
parameters.update({
'oauth_callback' : callback_url,