snowy authorization problems (and how to fix them)

View: New views
7 Messages — Rating Filter:   Alert me  

snowy authorization problems (and how to fix them)

by Christian Betz :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I followed the INSTALL in Snowy for the most part. I am on ubuntu 9.04
and was able to apt-get install all dependencies except pytz (had to
use easy_install for that one). I just wanted to add in a very
important item that is missing:

You need to Add a consumer via the Django Admin Panel. Go to
http://localhost:8000/admin and 'Add a Consumer'. Previous emails on
this list indicated that the credentials were a mix of
abcdefg/1234567.  It took some digging around in the actual code for
the addin to discover this has been changed. Currently you have to use
anyone/anyone/anyone for name/key/secret. (NOTE: I am using the latest
snowy and tomboy from git)

 I was really thrown for a loop because I thought I would be able to
set the consumer/key/secret in a preferences window (via the Addin
preferences dialog). I spent some time figuring out why the
'Preferences' button was greyed out. Is there supposed to be a
settable preference for this (someday)?

I have attached a patch to snowy's INSTALL for a developer to peruse
and apply if they so choose ;)

Last but not least: Great work. I've been waiting for an online Tomboy forever!

Christian

[snowy_INSTALL.patch]

diff --git a/INSTALL b/INSTALL
index afbfafe..2826401 100644
--- a/INSTALL
+++ b/INSTALL
@@ -30,10 +30,17 @@ Running Snowy From Your Git Checkout
  Domain name:  localhost:8000
  Display name: Snowy
 
+ - In the Piston table, click Consumers and add a consumer.
+
+ Name: anyone
+ Key: anyone
+ Secret: anyone
+ Status: Accepted
+ User: myusername    
+
 6. Play with snowy:
  http://localhost:8000/myusername/notes (for example)
 
-
 Installing/Deploying Snowy
 --
 TODO


_______________________________________________
Tomboy-list mailing list
Tomboy-list@...
http://lists.beatniksoftware.com/listinfo.cgi/tomboy-list-beatniksoftware.com

Re: snowy authorization problems (and how to fix them)

by Sandy Armstrong :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Sun, Sep 6, 2009 at 9:44 AM, Christian Betz<christian.betz@...> wrote:

> I followed the INSTALL in Snowy for the most part. I am on ubuntu 9.04
> and was able to apt-get install all dependencies except pytz (had to
> use easy_install for that one). I just wanted to add in a very
> important item that is missing:
>
> You need to Add a consumer via the Django Admin Panel. Go to
> http://localhost:8000/admin and 'Add a Consumer'. Previous emails on
> this list indicated that the credentials were a mix of
> abcdefg/1234567.  It took some digging around in the actual code for
> the addin to discover this has been changed. Currently you have to use
> anyone/anyone/anyone for name/key/secret. (NOTE: I am using the latest
> snowy and tomboy from git)

If you are using Django 1.1, this consumer key/secret pair should be
added automatically when you run manage.py syncdb.  When you run that
command, I believe you'll see a message about a fixture from
"api/fixtures/initial_data.json" being applied.  What version of
Django are you using?

By the way, I announced the anyone/anyone change yesterday on
snowy-list [0], where we try to keep snowy-specific conversation.  I
probably should have CC'd tomboy-list, sorry.  But if you're playing
with snowy, you should probably join that list.  ;-)

>  I was really thrown for a loop because I thought I would be able to
> set the consumer/key/secret in a preferences window (via the Addin
> preferences dialog). I spent some time figuring out why the
> 'Preferences' button was greyed out. Is there supposed to be a
> settable preference for this (someday)?

This is not configurable right now.  I guess a hidden gconf preference
wouldn't hurt, but there is absolutely no use case for changing this
right now, so I don't intend to add it.  If you read the snowy-list
email [1], you'll see that supporting anyone/anyone is now part of the
web sync spec (though I haven't documented it yet).  If you've got an
idea for why it should be configurable, please let me know.

So far, no sync add-ins have preferences that are accessed via the
Add-in tab.  They are all completely configured in the Sync tab.
Maybe we should make that button active, and have it change tabs?  I
can see how that would be confusing.

> I have attached a patch to snowy's INSTALL for a developer to peruse
> and apply if they so choose ;)

We should add a step encouraging users to double-check it, but I'd
still like to know why it didn't automatically work for you (like it
does for me in Django 1.1).

> Last but not least: Great work. I've been waiting for an online Tomboy forever!

Thanks!  With everybody's help, we should be able to have this up at
tomboy-online.org in no time.  :-)

Sandy

[0] http://mail.gnome.org/mailman/listinfo/snowy-list
[1] http://mail.gnome.org/archives/snowy-list/2009-September/msg00006.html
_______________________________________________
Tomboy-list mailing list
Tomboy-list@...
http://lists.beatniksoftware.com/listinfo.cgi/tomboy-list-beatniksoftware.com

Parent Message unknown Re: snowy authorization problems (and how to fix them)

by Christian Betz :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks Sandy!

The problem may have been this part of the INSTALL:

    svn co http://code.djangoproject.com/svn/django/trunk/ django

Which, AFAICT, currently installs Django 1.2 (?).

Here is what I get when i run syncdb:

x@xtian:~/codefoo/snowy$ python manage.py syncdb
Syncing...

Synced:
 > accounts
 > notes
 > django.contrib.admin
 > django.contrib.auth
 > django.contrib.contenttypes
 > django.contrib.sessions
 > django.contrib.sites
 > registration
 > south
 > reversion
 > gravatar
 > pagination
 > piston

Not synced (use migrations):
 -
(use ./manage.py migrate to migrate these)

Thanks for pointing me to snowy-list! Signing up now...

Christian
_______________________________________________
Tomboy-list mailing list
Tomboy-list@...
http://lists.beatniksoftware.com/listinfo.cgi/tomboy-list-beatniksoftware.com

Parent Message unknown Re: [Snowy] snowy authorization problems (and how to fix them)

by Sandy Armstrong :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Sun, Sep 6, 2009 at 10:18 AM, Benoit
Garret<benoit.garret_gnome@...> wrote:

> On Sun, Sep 6, 2009 at 7:08 PM, Sandy
> Armstrong<sanfordarmstrong@...> wrote:
>> On Sun, Sep 6, 2009 at 9:44 AM, Christian Betz<christian.betz@...> wrote:
>>> You need to Add a consumer via the Django Admin Panel. Go to
>>> http://localhost:8000/admin and 'Add a Consumer'. Previous emails on
>>> this list indicated that the credentials were a mix of
>>> abcdefg/1234567.  It took some digging around in the actual code for
>>> the addin to discover this has been changed. Currently you have to use
>>> anyone/anyone/anyone for name/key/secret. (NOTE: I am using the latest
>>> snowy and tomboy from git)
>>
>> If you are using Django 1.1, this consumer key/secret pair should be
>> added automatically when you run manage.py syncdb.  When you run that
>> command, I believe you'll see a message about a fixture from
>> "api/fixtures/initial_data.json" being applied.  What version of
>> Django are you using?
>
> I've never seen the consumer being added automatically and always
> thought you had to add it manually on the first run. This being with
> an install of django 1.1 straight from the tarball.

Weird, I recently uninstalled my old SVN checkout and installed 1.1
from the tarball, and the fixture is working fine.  Perhaps I've done
something wrong in that process.

Anyway, yeah, I'll add something to INSTALL.  Thanks guys.

Sandy
_______________________________________________
Tomboy-list mailing list
Tomboy-list@...
http://lists.beatniksoftware.com/listinfo.cgi/tomboy-list-beatniksoftware.com

Re: snowy authorization problems (and how to fix them)

by Sandy Armstrong :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Sun, Sep 6, 2009 at 10:37 AM, Christian Betz<christian.betz@...> wrote:
> Thanks Sandy!
>
> The problem may have been this part of the INSTALL:
>
>    svn co http://code.djangoproject.com/svn/django/trunk/ django
>
> Which, AFAICT, currently installs Django 1.2 (?).

Fixed in INSTALL, thanks.  Now recommending 1.1 in INSTALL, but of
course if you want to test with latest SVN, please keep us informed of
any incompatibilities that may come up.  :-)

> Here is what I get when i run syncdb:
>
> x@xtian:~/codefoo/snowy$ python manage.py syncdb
> Syncing...
>
> Synced:
>  > accounts
>  > notes
>  > django.contrib.admin
>  > django.contrib.auth
>  > django.contrib.contenttypes
>  > django.contrib.sessions
>  > django.contrib.sites
>  > registration
>  > south
>  > reversion
>  > gravatar
>  > pagination
>  > piston
>
> Not synced (use migrations):
>  -
> (use ./manage.py migrate to migrate these)

Did you already have a snowy.db when you ran this command? I wonder if
it makes a difference if you delete snowy.db first.  Oh, and I guess
I'm assuming here that you're using the default sqlite db setup...

I also wonder if either of these commands work after you run syncdb
(then I could put it in the INSTALL):

python manage.py loaddata api
...or...
python manage.py loaddata api/fixtures/initial_data.json

> Thanks for pointing me to snowy-list! Signing up now...

Cool!  I think my latest push for INSTALL should resolve most of the confusion.

Thanks,
Sandy
_______________________________________________
Tomboy-list mailing list
Tomboy-list@...
http://lists.beatniksoftware.com/listinfo.cgi/tomboy-list-beatniksoftware.com

Re: snowy authorization problems (and how to fix them)

by Christian Betz :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

This did the trick, btw:

python manage.py loaddata api/fixtures/initial_data.json

I did try running syncdb after deleting snowy.db, no luck. FWIW, the
only reason i am running SVN django is b/c the snowy INSTALL told me
to ;) I'll try 1.1 and see how it goes. I really appreciate your help.

One more thing: I think I found a very minor bug (in snowy).
the following note title:
Who's Got the Ball?
shows up in left sidebar as:
Who's Got the Ball?

(The title in the note itself displays just fine)

If there is a bug tracker i would be happy to file it.

christian

On Sun, Sep 6, 2009 at 3:58 PM, Sandy
Armstrong<sanfordarmstrong@...> wrote:

> On Sun, Sep 6, 2009 at 10:37 AM, Christian Betz<christian.betz@...> wrote:
>> Thanks Sandy!
>>
>> The problem may have been this part of the INSTALL:
>>
>>    svn co http://code.djangoproject.com/svn/django/trunk/ django
>>
>> Which, AFAICT, currently installs Django 1.2 (?).
>
> Fixed in INSTALL, thanks.  Now recommending 1.1 in INSTALL, but of
> course if you want to test with latest SVN, please keep us informed of
> any incompatibilities that may come up.  :-)
>
>> Here is what I get when i run syncdb:
>>
>> x@xtian:~/codefoo/snowy$ python manage.py syncdb
>> Syncing...
>>
>> Synced:
>>  > accounts
>>  > notes
>>  > django.contrib.admin
>>  > django.contrib.auth
>>  > django.contrib.contenttypes
>>  > django.contrib.sessions
>>  > django.contrib.sites
>>  > registration
>>  > south
>>  > reversion
>>  > gravatar
>>  > pagination
>>  > piston
>>
>> Not synced (use migrations):
>>  -
>> (use ./manage.py migrate to migrate these)
>
> Did you already have a snowy.db when you ran this command? I wonder if
> it makes a difference if you delete snowy.db first.  Oh, and I guess
> I'm assuming here that you're using the default sqlite db setup...
>
> I also wonder if either of these commands work after you run syncdb
> (then I could put it in the INSTALL):
>
> python manage.py loaddata api
> ...or...
> python manage.py loaddata api/fixtures/initial_data.json
>
>> Thanks for pointing me to snowy-list! Signing up now...
>
> Cool!  I think my latest push for INSTALL should resolve most of the confusion.
>
> Thanks,
> Sandy
>



--
"I'd rather have a bottle in front of me, than a frontal lobotomy." --
Dorothy Parker
_______________________________________________
Tomboy-list mailing list
Tomboy-list@...
http://lists.beatniksoftware.com/listinfo.cgi/tomboy-list-beatniksoftware.com

Re: snowy authorization problems (and how to fix them)

by Sandy Armstrong :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Sun, Sep 6, 2009 at 4:37 PM, Christian Betz<christian.betz@...> wrote:
> This did the trick, btw:
>
> python manage.py loaddata api/fixtures/initial_data.json

Ah, good. :-)

> I did try running syncdb after deleting snowy.db, no luck. FWIW, the
> only reason i am running SVN django is b/c the snowy INSTALL told me
> to ;) I'll try 1.1 and see how it goes. I really appreciate your help.
>
> One more thing: I think I found a very minor bug (in snowy).
> the following note title:
> Who's Got the Ball?
> shows up in left sidebar as:
> Who's Got the Ball?
>
> (The title in the note itself displays just fine)
>
> If there is a bug tracker i would be happy to file it.

http://bugzilla.gnome.org/browse.cgi?product=snowy

Sandy
_______________________________________________
Tomboy-list mailing list
Tomboy-list@...
http://lists.beatniksoftware.com/listinfo.cgi/tomboy-list-beatniksoftware.com