Re: [Snowy] OAuth in Snowy



On Mon, Jun 8, 2009 at 1:47 AM, Stuart
Langridge<stuart langridge canonical com> wrote:
> Sandy wrote:
>> And I get  "TemplateDoesNotExist at /oauth/authenticate/
>> piston/authorize_token.html"
>>
>> I'm not sure what to do here.  Any clues?
>>
>> I'm attaching updated patches that apply against latest git master
>> (and have Stuart's correct email address).  I suppose it's possible
>> that in updating the patches, I messed something up, so you might want
>> to review them.
>
> Ahaha. I forgot to mention something else.
>
> It's looking for piston/authorize_token.html because it's using piston's
> default OAuth view. We need to override that. In local_settings.py, add
>
> OAUTH_AUTH_VIEW = "notes.views.note_oauth_auth_view"
>
> and then it'll use our view, the one which works.

Ah, I see, thanks!  After adding this, I saw the page, checked the
"authorize access" checkbox, and clicked the "submit query" button,
but then I received another django error: "'Settings' object has no
attribute 'OAUTH_CALLBACK_VIEW'".  I'm not sure which function to set
this value to.

> My fault, sorry (I don't quite understand why my change there didn't
> appear in the patches, though).

local_settings.py is not under version control, which is undoubtedly
why the change did not appear in the patch.  I'll update the patch to
include this change in local_settings.py.in.  Or, maybe it should go
right in settings.py...I'll check with Brad.

Thanks,
Sandy


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]