My favorites | Sign in
Project Logo
          
Search
for
Updated Nov 18, 2008 by camron.flanders
Labels: Featured, Phase-Implementation, Phase-Deploy
Settings  
This is what you need to add to your settings.py

Introduction

This is how you 'install' agro.

Details

In your installed apps, add "agro". Somewhere in your settings.py file, add the following, and then run syncdb.

    AGRO_SETTINGS = {
        # the sources you add here are up to you, these are the names of the files in your sources directory
        'source_list': ('flickr', 'twitter', 'delicious', 'lastfm',),

        # here is where you add login details
        # for a single user, these will be strings, for multiple users, it's a tuple of user information, except flickr. flickr requires a tuple, even for single users.
        'accounts': {
                        'twitter':'camflan',
                        'lastfm':'camflan',
                        'delicious':'camflan',
                        'flickr':(('camflan', '90123960@N00'),)
                    },

        # for services that require an API key, they are added like so
        # note that last.fm also requires a secret, so we add it's api key and secret as a tuple
        'api_keys': {
                        'flickr': ('api_key',)
                        'lastfm': ('api_key', 'secret',),
                    },
    }


    # this is an example with multiple last.fm and flickr users. you can add multiple users to any service in a similar manner

    AGRO_SETTINGS = {
        'accounts': {
                        'twitter':'camflan',
                        'delicious':'camflan',
                        'lastfm': ('camflan', 'otheruser',),
                        'flickr': (('camflan', '90123960@N00',), ('otheruser', 'otheruserid@N00',),),
                    },
    }

If you want to get original secrets or images that are not CC/public then we must make an authenticated call to flickr. To do this, we need to generate a token for you. visit the link on the the googlecode homepage. After you get this information, you will put it in your setting file as shown below. This is also shown to you on my site when we give you the information

    AGRO_SETTINGS = {
        'api_keys': {
                        'flickr': (('api_key', 'secret', 'token'),),
                    },
    }

Comment by jachinls, Nov 18, 2008

Any chance this document could be updated to reflect the new settings block AGRO_SETTINGS?

Comment by camron.flanders, Nov 18, 2008

Sorry about that, this should work. Let me know if it doesn't!

Comment by Kugutsu.Hiruko, Oct 31, 2009

hi.. i try agro and eror like this

File "/var/lib/python-support/python2.5/MySQLdb/connections.py", line 35, in defaulterrorhandler
raise errorclass, errorvalue

mysql_exceptions.OperationalError?: (1071, 'Specified key was too long; max key length is 1000 bytes'

regards


Sign in to add a comment
Hosted by Google Code