From da8107c98121a30570139f480746bc7fb089a7bf Mon Sep 17 00:00:00 2001 From: Andrew Williams Date: Wed, 10 Aug 2011 10:58:40 +0100 Subject: [PATCH] Added a more detailed callback view --- app/api/views.py | 5 +++-- app/templates/piston/callback_view.html | 13 +++++++++++++ 2 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 app/templates/piston/callback_view.html diff --git a/app/api/views.py b/app/api/views.py index a160298..a334edb 100644 --- a/app/api/views.py +++ b/app/api/views.py @@ -7,8 +7,9 @@ from django.contrib import messages from piston import forms from piston.models import Token -def oauth_callback_view(request, other): - return HttpResponse("The application you allowed access to didn't request a callback, thats odd and should be fixed") +@login_required +def oauth_callback_view(request, token): + return render_to_response('piston/callback_view.html', {'token': token }) @login_required diff --git a/app/templates/piston/callback_view.html b/app/templates/piston/callback_view.html new file mode 100644 index 0000000..9a0d592 --- /dev/null +++ b/app/templates/piston/callback_view.html @@ -0,0 +1,13 @@ +{% extends "base.html" %} + +{% block title %}OAuth Access Authorization{% endblock %} + +{% block content %} + +

Access Authorization

+ +

Access is now enabled for the requesting application. It seems the application did not provide a way to give it the required information so you need to provide this to it. This has happened either due to it being a desktop application or not being configured properly.

+ +

Token/PIN: {{ token }}

+ +{% endblock %}