├── examples
├── openid
│ ├── __init__.py
│ ├── djopenid
│ │ ├── __init__.py
│ │ ├── server
│ │ │ ├── __init__.py
│ │ │ ├── models.py
│ │ │ ├── urls.py
│ │ │ └── tests.py
│ │ ├── consumer
│ │ │ ├── __init__.py
│ │ │ ├── models.py
│ │ │ └── urls.py
│ │ ├── templates
│ │ │ ├── consumer
│ │ │ │ ├── request_form.html
│ │ │ │ └── index.html
│ │ │ ├── server
│ │ │ │ ├── endpoint.html
│ │ │ │ ├── idPage.html
│ │ │ │ ├── pape_request_info.html
│ │ │ │ ├── index.html
│ │ │ │ └── trust.html
│ │ │ ├── xrds.xml
│ │ │ └── index.html
│ │ ├── urls.py
│ │ ├── views.py
│ │ ├── manage.py
│ │ ├── README
│ │ └── settings.py
│ ├── discover
│ └── README
├── appengine
│ ├── djangodemo
│ │ ├── __init__.py
│ │ ├── yosdemo
│ │ │ ├── __init__.py
│ │ │ ├── models.py
│ │ │ └── views.py
│ │ ├── manage.py
│ │ ├── urls.py
│ │ └── settings.py
│ ├── media
│ │ ├── img
│ │ │ ├── nrm-grey.png
│ │ │ ├── indicator.gif
│ │ │ └── lo-y-gsmall.gif
│ │ ├── js
│ │ │ └── simpleauth.js
│ │ └── css
│ │ │ └── common.css
│ ├── app.yml
│ ├── index.yaml
│ ├── templates
│ │ ├── index.html
│ │ ├── simpleauth.html
│ │ └── social.html
│ └── djangodemo.py
├── opensocial
│ ├── gifts
│ │ ├── public
│ │ │ ├── grail.png
│ │ │ ├── snakes.png
│ │ │ ├── dictator.png
│ │ │ ├── style.css
│ │ │ └── gadget.xml
│ │ └── app.yaml
│ ├── oauthbox
│ │ ├── app.yaml
│ │ └── main.py
│ └── friends
│ │ ├── app.yaml
│ │ └── main.py
└── yql.py
├── src
├── oauthlib
│ ├── __init__.py
│ └── LICENSE
├── openid
│ ├── extensions
│ │ ├── draft
│ │ │ └── __init__.py
│ │ ├── __init__.py
│ │ └── oauth.py
│ ├── consumer
│ │ └── __init__.py
│ ├── server
│ │ └── __init__.py
│ ├── sreg.py
│ ├── store
│ │ ├── __init__.py
│ │ ├── nonce.py
│ │ └── memstore.py
│ ├── yadis
│ │ ├── constants.py
│ │ ├── __init__.py
│ │ └── services.py
│ ├── dh.py
│ ├── __init__.py
│ ├── extension.py
│ └── kvform.py
├── simplejson
│ ├── LICENSE
│ ├── jsonfilter.py
│ └── scanner.py
├── opensocial
│ ├── simplejson
│ │ ├── LICENSE
│ │ ├── jsonfilter.py
│ │ └── scanner.py
│ ├── oauth
│ │ └── LICENSE
│ ├── test_data.py
│ ├── errors.py
│ ├── mock_http.py
│ └── data.py
└── yahoo
│ ├── LICENSE
│ ├── yql.py
│ └── __init__.py
├── test
├── unit
│ ├── openid
│ │ ├── __init__.py
│ │ ├── data
│ │ │ ├── test_etxrd
│ │ │ │ ├── not-xrds.xml
│ │ │ │ ├── no-xrd.xml
│ │ │ │ ├── status222.xrds
│ │ │ │ ├── README
│ │ │ │ ├── spoof1.xrds
│ │ │ │ ├── spoof2.xrds
│ │ │ │ ├── spoof3.xrds
│ │ │ │ ├── delegated-20060809.xrds
│ │ │ │ ├── valid-populated-xrds.xml
│ │ │ │ ├── delegated-20060809-r1.xrds
│ │ │ │ ├── delegated-20060809-r2.xrds
│ │ │ │ ├── prefixsometimes.xrds
│ │ │ │ ├── sometimesprefix.xrds
│ │ │ │ └── subsegments.xrds
│ │ │ ├── openid-1.2-consumer-sqlitestore.db
│ │ │ ├── test_discover
│ │ │ │ ├── yadis_no_delegate.xml
│ │ │ │ ├── openid_no_delegate.html
│ │ │ │ ├── openid2_xrds_no_local_id.xml
│ │ │ │ ├── yadis_0entries.xml
│ │ │ │ ├── openid2_xrds.xml
│ │ │ │ ├── yadis_idp.xml
│ │ │ │ ├── openid.html
│ │ │ │ ├── openid2.html
│ │ │ │ ├── openid_1_and_2.html
│ │ │ │ ├── yadis_idp_delegate.xml
│ │ │ │ ├── yadis_another_delegate.xml
│ │ │ │ ├── openid_and_yadis.html
│ │ │ │ ├── yadis_2_bad_local_id.xml
│ │ │ │ ├── openid_1_and_2_xrds.xml
│ │ │ │ ├── openid_1_and_2_xrds_bad_delegate.xml
│ │ │ │ ├── yadis_2entries_idp.xml
│ │ │ │ └── yadis_2entries_delegate.xml
│ │ │ ├── example-xrds.xml
│ │ │ ├── test1-discover.txt
│ │ │ ├── accept.txt
│ │ │ └── test1-parsehtml.txt
│ │ ├── test_pape.py
│ │ ├── test_htmldiscover.py
│ │ ├── test_services.py
│ │ ├── test_symbol.py
│ │ ├── test_extension.py
│ │ ├── test_urinorm.py
│ │ ├── datadriven.py
│ │ ├── test_xrires.py
│ │ ├── dh.py
│ │ ├── support.py
│ │ ├── urinorm.txt
│ │ ├── trustroot.py
│ │ ├── test_parsehtml.py
│ │ ├── linkparse.py
│ │ ├── cryptutil.py
│ │ ├── test_nonce.py
│ │ ├── test_accept.py
│ │ └── test_xri.py
│ ├── opensocial
│ │ ├── opensocial_tests
│ │ │ ├── __init__.py
│ │ │ ├── oauth_test.py
│ │ │ ├── google_sandbox_test.py
│ │ │ ├── myspace_test.py
│ │ │ ├── orkut_test.py
│ │ │ └── partuza_test.py
│ │ ├── run_all_tests.py
│ │ ├── run_unit_tests.py
│ │ ├── run_system_tests.py
│ │ └── module_test_runner.py
│ └── yahoo
│ │ └── test_yql.py
└── run_unit_tests.py
├── CHANGELOG
├── setup.py
└── LICENSE
/examples/openid/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/oauthlib/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/unit/openid/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/examples/openid/djopenid/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/examples/appengine/djangodemo/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/examples/openid/djopenid/server/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/openid/extensions/draft/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/examples/openid/djopenid/consumer/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/examples/appengine/djangodemo/yosdemo/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/test/unit/openid/data/test_etxrd/not-xrds.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 | {{ error|escape }} 11 |
12 | {% endif %} 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /test/unit/openid/data/test_discover/yadis_no_delegate.xml: -------------------------------------------------------------------------------- 1 | 2 |foo
9 | 10 | 11 | -------------------------------------------------------------------------------- /test/unit/openid/data/test_discover/openid2_xrds_no_local_id.xml: -------------------------------------------------------------------------------- 1 | 2 |foo
10 | 11 | 12 | -------------------------------------------------------------------------------- /test/unit/openid/data/test_discover/openid2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |foo
10 | 11 | 12 | -------------------------------------------------------------------------------- /examples/openid/djopenid/templates/xrds.xml: -------------------------------------------------------------------------------- 1 | 2 |foo
10 | 11 | 12 | -------------------------------------------------------------------------------- /test/unit/openid/data/test_discover/yadis_idp_delegate.xml: -------------------------------------------------------------------------------- 1 | 2 |12 | This is the identity page for the OpenID that this server serves. 13 |
14 | {% endblock %} 15 | -------------------------------------------------------------------------------- /test/unit/openid/data/test_discover/yadis_another_delegate.xml: -------------------------------------------------------------------------------- 1 | 2 |foo
11 | 12 | 13 | -------------------------------------------------------------------------------- /src/openid/yadis/constants.py: -------------------------------------------------------------------------------- 1 | __all__ = ['YADIS_HEADER_NAME', 'YADIS_CONTENT_TYPE', 'YADIS_ACCEPT_HEADER'] 2 | from openid.yadis.accept import generateAcceptHeader 3 | 4 | YADIS_HEADER_NAME = 'X-XRDS-Location' 5 | YADIS_CONTENT_TYPE = 'application/xrds+xml' 6 | 7 | # A value suitable for using as an accept header when performing YADIS 8 | # discovery, unless the application has special requirements 9 | YADIS_ACCEPT_HEADER = generateAcceptHeader( 10 | ('text/html', 0.3), 11 | ('application/xhtml+xml', 0.5), 12 | (YADIS_CONTENT_TYPE, 1.0), 13 | ) 14 | -------------------------------------------------------------------------------- /test/unit/openid/data/test_discover/yadis_2_bad_local_id.xml: -------------------------------------------------------------------------------- 1 | 2 |7 | This is a Django package which implements both an OpenID server 8 | and an OpenID consumer. These examples are provided with the 9 | OpenID library so you can learn how to use it in your own 10 | applications. 11 |
12 | 13 |14 | To begin, click one of these links: 15 |
16 | 17 | 21 | 22 |23 | Note: If you want to test the example consumer 24 | using the example server, you must start a separate server process 25 | for each application. 26 |
27 | 28 | 29 | -------------------------------------------------------------------------------- /examples/opensocial/gifts/public/style.css: -------------------------------------------------------------------------------- 1 | body { 2 | font-family: helvetica, arial, sans-serif; 3 | font-size: 10pt; 4 | } 5 | 6 | td { 7 | font-size: 10pt; 8 | } 9 | 10 | .gift { 11 | width: 48px; 12 | height: 48px; 13 | border: 1px solid green; 14 | } 15 | 16 | .thumbnail { 17 | width: 48px; 18 | height: 48px; 19 | border: 1px solid black; 20 | } 21 | 22 | .layout { 23 | } 24 | 25 | .layout td { 26 | text-align: center; 27 | vertical-align: top; 28 | } 29 | 30 | .list { 31 | border: 1px solid black; 32 | } 33 | 34 | .list td { 35 | padding: 4px; 36 | font-size: 8pt; 37 | text-align: center; 38 | vertical-align: middle; 39 | } 40 | 41 | .list .header { 42 | background-color: #CCDDFF; 43 | text-align: center; 44 | font-weight: bold; 45 | font-size: 10pt; 46 | } 47 | 48 | .list .sub-header td { 49 | text-align: center; 50 | font-weight: bold; 51 | font-size: 10pt; 52 | } 53 | -------------------------------------------------------------------------------- /examples/appengine/templates/simpleauth.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 |39 | This is an example server built for the Django framework. It only 40 | authenticates one OpenID, which is also served by this 41 | application. The OpenID it serves is 42 | 43 |
44 | {{ user_url }} 45 |46 | 47 | 48 |

The site {{ trust_root|escape }} has requested verification 8 | of your OpenID.
9 | 10 | {% include "server/pape_request_info.html" %} 11 | {% endifequal %} 12 | {% ifequal trust_root_valid "Invalid" %} 13 |This request claims to be from {{ trust_root|escape }} but I have 15 | determined that it is a pack of lies. Beware, if you release 16 | information to them, they are likely to do unconscionable things with it, 17 | being the lying liars that they are.
18 |Please tell the real {{ trust_root|escape }} that someone is 19 | trying to abuse your trust in their good name.
20 |The site {{ trust_root|escape }} has requested verification 24 | of your OpenID. I have failed to reach it and thus cannot vouch for its 25 | authenticity. Perhaps it is on your local network.
26 | {% endifequal %} 27 | {% ifequal trust_root_valid "DISCOVERY_FAILED" %} 28 |The site {{ trust_root|escape }} has requested verification 29 | of your OpenID. However, {{ trust_root|escape }} does not 30 | implement OpenID 2.0's relying party verification mechanism. Please use 31 | extra caution in deciding whether to release information to this party, 32 | and ask {{ trust_root|escape }} to implement relying party 33 | verification for your future transactions.
34 | 35 | {% include "server/pape_request_info.html" %} 36 | {% endifequal %} 37 | 38 | 39 | 40 |Blah blah blah blah blah blah blah
13 | 14 | 15 | 16 | header 17 | Status: 200 OK 18 | Content-Type: text/html 19 | YADIS_HEADER: URL_BASE/xrds 20 | 21 | 22 | 23 |Blah blah blah blah blah blah blah
28 | 29 | 30 | xrds 31 | Status: 200 OK 32 | Content-Type: application/xrds+xml 33 | 34 |Blah blah blah blah blah blah blah
101 | 102 | 103 | 404_server_response 104 | Status: 404 Not Found 105 | 106 | EEk! 107 | 108 | 500_server_response 109 | Status: 500 Server error 110 | 111 | EEk! 112 | 113 | 201_server_response 114 | Status: 201 Created 115 | 116 | EEk! 117 | 118 | 404_with_header 119 | Status: 404 Not Found 120 | YADIS_HEADER: URL_BASE/xrds 121 | 122 | EEk! 123 | 124 | 404_with_meta 125 | Status: 404 Not Found 126 | Content-Type: text/html 127 | 128 | 129 | 130 | 131 |Blah blah blah blah blah blah blah
136 | 137 | 138 | -------------------------------------------------------------------------------- /src/opensocial/simplejson/scanner.py: -------------------------------------------------------------------------------- 1 | """ 2 | Iterator based sre token scanner 3 | """ 4 | # NOTE(kgibbs): This line must be added to make this file work under 5 | # Python 2.2, which is commonly used at Google. 6 | from __future__ import generators 7 | # NOTE(kgibbs): End changes. 8 | import sre_parse, sre_compile, sre_constants 9 | from sre_constants import BRANCH, SUBPATTERN 10 | from re import VERBOSE, MULTILINE, DOTALL # NOTE(guido): Was 'from sre ...' 11 | import re 12 | 13 | __all__ = ['Scanner', 'pattern'] 14 | 15 | FLAGS = (VERBOSE | MULTILINE | DOTALL) 16 | class Scanner(object): 17 | def __init__(self, lexicon, flags=FLAGS): 18 | self.actions = [None] 19 | # combine phrases into a compound pattern 20 | s = sre_parse.Pattern() 21 | s.flags = flags 22 | p = [] 23 | # NOTE(kgibbs): These lines must be added to make this file work under 24 | # Python 2.2, which is commonly used at Google. 25 | def enumerate(obj): 26 | i = -1 27 | for item in obj: 28 | i += 1 29 | yield i, item 30 | # NOTE(kgibbs): End changes. 31 | for idx, token in enumerate(lexicon): 32 | phrase = token.pattern 33 | try: 34 | subpattern = sre_parse.SubPattern(s, 35 | [(SUBPATTERN, (idx + 1, sre_parse.parse(phrase, flags)))]) 36 | except sre_constants.error: 37 | raise 38 | p.append(subpattern) 39 | self.actions.append(token) 40 | 41 | s.groups = len(p)+1 # NOTE(guido): Added to make SRE validation work 42 | p = sre_parse.SubPattern(s, [(BRANCH, (None, p))]) 43 | self.scanner = sre_compile.compile(p) 44 | 45 | 46 | def iterscan(self, string, idx=0, context=None): 47 | """ 48 | Yield match, end_idx for each match 49 | """ 50 | match = self.scanner.scanner(string, idx).match 51 | actions = self.actions 52 | lastend = idx 53 | end = len(string) 54 | while True: 55 | m = match() 56 | if m is None: 57 | break 58 | matchbegin, matchend = m.span() 59 | if lastend == matchend: 60 | break 61 | action = actions[m.lastindex] 62 | if action is not None: 63 | rval, next_pos = action(m, context) 64 | if next_pos is not None and next_pos != matchend: 65 | # "fast forward" the scanner 66 | matchend = next_pos 67 | match = self.scanner.scanner(string, matchend).match 68 | yield rval, matchend 69 | lastend = matchend 70 | 71 | def pattern(pattern, flags=FLAGS): 72 | def decorator(fn): 73 | fn.pattern = pattern 74 | fn.regex = re.compile(pattern, flags) 75 | return fn 76 | return decorator 77 | -------------------------------------------------------------------------------- /examples/openid/djopenid/settings.py: -------------------------------------------------------------------------------- 1 | # Django settings for djopenid project. 2 | 3 | import os 4 | import sys 5 | import warnings 6 | 7 | try: 8 | import openid 9 | except ImportError, e: 10 | warnings.warn("Could not import OpenID library. Please consult the djopenid README.") 11 | sys.exit(1) 12 | 13 | DEBUG = True 14 | TEMPLATE_DEBUG = DEBUG 15 | 16 | ADMINS = ( 17 | # ('Your Name', 'your_email@domain.com'), 18 | ) 19 | 20 | MANAGERS = ADMINS 21 | 22 | DATABASE_ENGINE = 'sqlite3' # 'postgresql', 'mysql', 'sqlite3' or 'ado_mssql'. 23 | DATABASE_NAME = '/tmp/test.db' # Or path to database file if using sqlite3. 24 | DATABASE_USER = '' # Not used with sqlite3. 25 | DATABASE_PASSWORD = '' # Not used with sqlite3. 26 | DATABASE_HOST = '' # Set to empty string for localhost. Not used with sqlite3. 27 | DATABASE_PORT = '' # Set to empty string for default. Not used with sqlite3. 28 | 29 | # Local time zone for this installation. All choices can be found here: 30 | # http://www.postgresql.org/docs/current/static/datetime-keywords.html#DATETIME-TIMEZONE-SET-TABLE 31 | TIME_ZONE = 'America/Chicago' 32 | 33 | # Language code for this installation. All choices can be found here: 34 | # http://www.w3.org/TR/REC-html40/struct/dirlang.html#langcodes 35 | # http://blogs.law.harvard.edu/tech/stories/storyReader$15 36 | LANGUAGE_CODE = 'en-us' 37 | 38 | SITE_ID = 1 39 | 40 | # Absolute path to the directory that holds media. 41 | # Example: "/home/media/media.lawrence.com/" 42 | MEDIA_ROOT = '' 43 | 44 | # URL that handles the media served from MEDIA_ROOT. 45 | # Example: "http://media.lawrence.com" 46 | MEDIA_URL = '' 47 | 48 | # URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a 49 | # trailing slash. 50 | # Examples: "http://foo.com/media/", "/media/". 51 | ADMIN_MEDIA_PREFIX = '/media/' 52 | 53 | # Make this unique, and don't share it with anybody. 54 | SECRET_KEY = 'u^bw6lmsa6fah0$^lz-ct$)y7x7#ag92-z+y45-8!(jk0lkavy' 55 | 56 | # List of callables that know how to import templates from various sources. 57 | TEMPLATE_LOADERS = ( 58 | 'django.template.loaders.filesystem.load_template_source', 59 | 'django.template.loaders.app_directories.load_template_source', 60 | # 'django.template.loaders.eggs.load_template_source', 61 | ) 62 | 63 | MIDDLEWARE_CLASSES = ( 64 | 'django.middleware.common.CommonMiddleware', 65 | 'django.contrib.sessions.middleware.SessionMiddleware', 66 | 'django.contrib.auth.middleware.AuthenticationMiddleware', 67 | 'django.middleware.doc.XViewMiddleware', 68 | ) 69 | 70 | ROOT_URLCONF = 'djopenid.urls' 71 | 72 | TEMPLATE_CONTEXT_PROCESSORS = () 73 | 74 | TEMPLATE_DIRS = ( 75 | os.path.abspath(os.path.join(os.path.dirname(__file__), 'templates')), 76 | ) 77 | 78 | INSTALLED_APPS = ( 79 | 'django.contrib.contenttypes', 80 | 'django.contrib.sessions', 81 | 82 | 'djopenid.consumer', 83 | 'djopenid.server', 84 | ) 85 | -------------------------------------------------------------------------------- /examples/appengine/djangodemo/settings.py: -------------------------------------------------------------------------------- 1 | 2 | # settings.py 3 | 4 | # Django settings for yosdemo project. 5 | 6 | import os 7 | 8 | ROOT_PATH = os.path.dirname(__file__) 9 | 10 | DEBUG = True 11 | TEMPLATE_DEBUG = DEBUG 12 | 13 | ADMINS = ( 14 | ('dustin', 'dustin.whittle@gmail.com') 15 | ) 16 | 17 | MANAGERS = ADMINS 18 | 19 | DATABASE_ENGINE = '' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. 20 | DATABASE_NAME = '' # Or path to database file if using sqlite3. 21 | DATABASE_USER = '' # Not used with sqlite3. 22 | DATABASE_PASSWORD = '' # Not used with sqlite3. 23 | DATABASE_HOST = '' # Set to empty string for localhost. Not used with sqlite3. 24 | DATABASE_PORT = '' # Set to empty string for default. Not used with sqlite3. 25 | 26 | # Local time zone for this installation. Choices can be found here: 27 | # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name 28 | # although not all choices may be available on all operating systems. 29 | # If running in a Windows environment this must be set to the same as your 30 | # system time zone. 31 | TIME_ZONE = 'America/Los_Angeles' 32 | 33 | # Language code for this installation. All choices can be found here: 34 | # http://www.i18nguy.com/unicode/language-identifiers.html 35 | LANGUAGE_CODE = 'en-us' 36 | 37 | SITE_ID = 1 38 | 39 | # If you set this to False, Django will make some optimizations so as not 40 | # to load the internationalization machinery. 41 | USE_I18N = True 42 | 43 | # Absolute path to the directory that holds media. 44 | # Example: "/home/media/media.lawrence.com/" 45 | MEDIA_ROOT = '' 46 | 47 | # URL that handles the media served from MEDIA_ROOT. Make sure to use a 48 | # trailing slash if there is a path component (optional in other cases). 49 | # Examples: "http://media.lawrence.com", "http://example.com/media/" 50 | MEDIA_URL = '' 51 | 52 | # URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a 53 | # trailing slash. 54 | # Examples: "http://foo.com/media/", "/media/". 55 | ADMIN_MEDIA_PREFIX = '/media/' 56 | 57 | # Make this unique, and don't share it with anybody. 58 | SECRET_KEY = '-aa#*n^bte!(0l%4t$yx8=!=o-i)$(bw2#9e%c3y71!m-kmqzr' 59 | 60 | # List of callables that know how to import templates from various sources. 61 | TEMPLATE_LOADERS = ( 62 | 'django.template.loaders.filesystem.load_template_source', 63 | 'django.template.loaders.app_directories.load_template_source', 64 | # 'django.template.loaders.eggs.load_template_source', 65 | ) 66 | 67 | MIDDLEWARE_CLASSES = ( 68 | 'django.middleware.common.CommonMiddleware', 69 | # 'django.contrib.sessions.middleware.SessionMiddleware', 70 | # 'django.contrib.auth.middleware.AuthenticationMiddleware', 71 | ) 72 | 73 | ROOT_URLCONF = 'djangodemo.urls' 74 | 75 | TEMPLATE_DIRS = ( 76 | ROOT_PATH + '/templates', 77 | ) 78 | 79 | INSTALLED_APPS = ( 80 | # 'django.contrib.auth', 81 | 'django.contrib.contenttypes', 82 | # 'django.contrib.sessions', 83 | 'django.contrib.sites', 84 | ) 85 | -------------------------------------------------------------------------------- /examples/yql.py: -------------------------------------------------------------------------------- 1 | """ 2 | Yahoo! Python SDK 3 | 4 | * Yahoo! Query Language 5 | * Yahoo! Social API 6 | 7 | Find documentation and support on Yahoo! Developer Network: http://developer.yahoo.com 8 | 9 | Hosted on GitHub: http://github.com/yahoo/yos-social-python/tree/master 10 | 11 | @copyright: Copyrights for code authored by Yahoo! Inc. is licensed under the following terms: 12 | @license: BSD Open Source License 13 | 14 | Permission is hereby granted, free of charge, to any person obtaining a copy 15 | of this software and associated documentation files (the "Software"), to deal 16 | in the Software without restriction, including without limitation the rights 17 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 18 | copies of the Software, and to permit persons to whom the Software is 19 | furnished to do so, subject to the following conditions: 20 | 21 | The above copyright notice and this permission notice shall be included in 22 | all copies or substantial portions of the Software. 23 | 24 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 25 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 26 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 27 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 28 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 29 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 30 | THE SOFTWARE. 31 | """ 32 | 33 | __author__ = 'Dustin Whittle35 | This is an example consumer built for the Django framework. Enter 36 | an OpenID in the box below. 37 |
38 | 39 | {% if error %} 40 |
{{profile.nickname}}'s Social Graph
55 | {% if connections %} 56 |57 | {% for connection in connections %} 58 |
59 | {% endfor %}
60 |
61 | {% else %} 62 | No contacts, find some! 63 | {% endif %} 64 |