]> git.parisson.com Git - django-social-auth.git/commitdiff
Instagram doc and small code styling. Refs #247
authorMatías Aguirre <matiasaguirre@gmail.com>
Sun, 12 Feb 2012 18:30:43 +0000 (16:30 -0200)
committerMatías Aguirre <matiasaguirre@gmail.com>
Sun, 12 Feb 2012 18:30:43 +0000 (16:30 -0200)
README.rst
doc/backends/index.rst
doc/backends/instagram.rst [new file with mode: 0644]
social_auth/backends/contrib/instagram.py

index 794faeaffd71e550dcd10e90f42b7211eef56c4b..9d417c0fdba06c4ccd1a8ed6a3f0484d07de9b89 100644 (file)
@@ -790,9 +790,9 @@ include in your document and the needed mechanism to trigger the POST to
 Check the second "Use Case" for an implementation example.
 
 
--------
+---------
 Instagram
--------
+---------
 Instagram uses OAuth v2 for Authentication
 
 - Register a new application at the `Instagram API`_, and
@@ -802,10 +802,11 @@ Instagram uses OAuth v2 for Authentication
       INSTAGRAM_CLIENT_ID = ''
       INSTAGRAM_CLIENT_SECRET = ''
 
-None: Instagram only allows one callback url so you'll have to change your urls.py to
-accomodate both /complete and /associate routes, for example by having a single
-/associate url which takes a ?complete=true parameter for the cases when you want
-to complete rather than associate.
+*Note:*
+Instagram only allows one callback url so you'll have to change your urls.py to
+accomodate both ``/complete`` and ``/associate`` routes, for example by having
+a single ``/associate`` url which takes a ``?complete=true`` parameter for the
+cases when you want to complete rather than associate.
 
 
 -------
index 4cb8465e8642cd34c9beb0b6cac65fff8731a71b..d4dba774463327c11cbbeb405262ebdb824d4c5d 100644 (file)
@@ -13,3 +13,5 @@ Contents:
    facebook
    linkedin
    github
+   browserid
+   instagram
diff --git a/doc/backends/instagram.rst b/doc/backends/instagram.rst
new file mode 100644 (file)
index 0000000..2bc4260
--- /dev/null
@@ -0,0 +1,18 @@
+Instagram
+=========
+Instagram uses OAuth v2 for Authentication
+
+- Register a new application at the `Instagram API`_, and
+
+- fill ``Client Id`` and ``Client Secret`` values in the settings::
+
+      INSTAGRAM_CLIENT_ID = ''
+      INSTAGRAM_CLIENT_SECRET = ''
+
+*Note:*
+Instagram only allows one callback url so you'll have to change your urls.py to
+accomodate both ``/complete`` and ``/associate`` routes, for example by having
+a single ``/associate`` url which takes a ``?complete=true`` parameter for the
+cases when you want to complete rather than associate.
+
+.. _Instagram API: http://instagr.am/developer/
index afdbafe123ef281c25287f9b882027f50007733b..e2fba7d33c97a08044b4354e3bdd82b7f5a1cc23 100644 (file)
@@ -22,10 +22,10 @@ class InstagramBackend(OAuthBackend):
         username = response['user']['username']
         fullname = response['user'].get('fullname', '')
         email = response['user'].get('email', '')
-
-        return {USERNAME: username,
-                'first_name': fullname,
-                'email': email
+        return {
+            USERNAME: username,
+            'first_name': fullname,
+            'email': email
         }