Skip to main content

Connect your Django powered sites to social networks and other online services.

Project description

Latest Version Downloads License


  1. Install django-connected:

    pip install django-connected
  2. Add connected_accounts to INSTALLED_APPS:

  3. Sync database (requires south>=1.0.1 if you are using Django 1.6.x):

    python migrate


(Please click on thumbnails for bigger images)

Supported Providers
  • Bitly (OAuth2)

  • Disqus (OAuth2)

  • Facebook (OAuth2)

  • Google (OAuth2)

  • Instagram (OAuth2)

  • Mailchimp (OAuth2)

  • Twitter (OAuth)

  • more… (coming soon)


Most providers require you to sign up for a so called API client or app, containing a client ID and API secret.

When creating the OAuth app on the side of the provider pay special attention to the callback URL (sometimes also referred to as redirect URL).

Use a callback URL of the form:<provider_name>/


Register your OAuth2 app here:


By default, read and write scope is enabled


The available permissions for the scope value are read, write, email, and admin.


A key and secret key can be obtained by creating an app at


By default, email, public_profile and user_friends is enabled, apps using other permissions require review by Facebook:

CONNECTED_ACCOUNTS_FACEBOOK_SCOPE = ['email', 'public_profile', 'user_friends']

Use FACEBOOK_AUTH_PARAMS to pass along other parameters to the Facebook API:

CONNECTED_ACCOUNTS_FACEBOOK_AUTH_PARAMS = {'auth_type': 'reauthenticate'}


The Google provider is OAuth2 based. Create a google app to obtain a key and secret through the developer console


By default, profile and email scope is enabled:


By default Offline Access request is enabled:

CONNECTED_ACCOUNTS_GOOGLE_AUTH_PARAMS = {'access_type': 'offline'}

See for more information.


You can register an app on Twitter via



Register your OAuth app here:



By defining one (or many) AccountField on a custom model you can take advantage of connected accounts in your custom applications.


You need to define a AccountField on the model you would like to use:

from django.db import models
from connected_accounts.fields import AccountField

class MyModel(models.Model):
    account = AccountField('twitter')


The AccountField takes a string as first argument which will be used to limit choices for accounts available for the given field.

Admin Integration

To provide admin support for a model with a AccountField in your application’s admin, you need to use the mixin ConnectedAccountAdminMixin along with the ModelAdmin. Note that the ConnectedAccountAdminMixin must precede the ModelAdmin in the class definition:

from django.contrib import admin
from connected_accounts.admin import ConnectedAccountAdminMixin

from myapp.models import MyModel

class MyModelAdmin(ConnectedAccountAdminMixin, admin.ModelAdmin):
    pass, MyModelAdmin)

Admin Preview

Packages using django-connected

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-connected-0.1.5.tar.gz (95.8 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page