Skip to main content
Introduction
============

The Django-Social-User library provides an abstract Django-based system for working with remote social network identities. A social identity stores all information gathered about a person from a social network account, and attempts to mirror the information that is necessary for a Django user.

All functions and classes are documented inline. If you have additional questions, I can be reached on github or at admin@mattsnider.com.

Getting started
===============

Standard stuff applies to install. Use PIP to install with dependencies:

pip install django-social-user

Or install from the command line:

python setup.py install

Dependencies
============

This library is dependent on Django 1.3 or greater. You will need to configure any remote services that you wish to use as this library is expected to be extended. I have a second project django-simple-social (https://www.github.com/mattsnider/django-simple-social) that uses this package to interface with common social networks.

If you have south installed, then database table creation and future updates will be managed automatically. If you don't, you may run into DB compatibility issues that you must manually resolve.

Usage Guide
===========

This section describes how to configure the Django Social User app.

URL Setup
---------

Your project should define the following URLs in your settings files:

DJANGO_SOCIAL_USER_OPTIONS = {
'REDIRECT_ON_ACCESS_TOKEN_FAILURE': '/yourAccessTokenFailureUrl',
'REDIRECT_ON_AUTHENTICATION': '/yourAuthenticationUrl',
'REDIRECT_ON_REQUEST_TOKEN_FAILURE': '/yourRequestTokenFailureUrl',
}

REDIRECT_ON_ACCESS_TOKEN_FAILURE is where to redirect the user if a network fails to authenticate when the social network executes the callback URL.

REDIRECT_ON_AUTHENTICATION is where to redirect the user when they successfully authenticate with the social network. If this constant is not defined user will never successfully authenticate.

REDIRECT_ON_REQUEST_TOKEN_FAILURE is where to redirect the user if a network fails to provide the request URL as part of the oauth handshake (user will not have been redirected to the social network site yet, and usually means the site authentication is down or request timed out).

Add the following URL definitions to the project ``urls.py``:

url(r'^social/', include('django_social_user.urls', namespace='django_social_user')),

DB Setup
--------

If you are using South, then run:

python manage.py migrate django_social_user

Otherwise run:

python manage.py sqlall django_social_user > temp.sql
python manage.py dbshell < temp.sql
rm temp.sql

I recommend using South, as I may need to make model changes and South migrations will make your life easier.

Create a Backend for a Social Network
-------------------------------------

I have another project called Django Simple Social that builds upon Django Social User to support some of the more popular social networks. If you plan on implementing your own social network backend, see https://github.com/mattsnider/django-simple-social for examples on how to do this.


Todo
====

1. better error handling
2. TESTING

Metadata

Release files for django-social-user 0.1.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-social-user 0.1.9
File Size Uploaded
django-social-user-0.1.9.tar.gz 9.6 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for django-social-user 0.1.9
File Interpreter ABI Platform
django_social_user-0.1.9-py27-none-any.whl Python 2.7 none any Details
django-social-user-0.1.9.macosx-10.8-intel.exe Details

Total release size: 99.4 kB

Release files / django-social-user-0.1.9.tar.gz

Download URL django-social-user-0.1.9.tar.gz
Size 9.6 kB
Tags Source
SHA-256 checksum
How to use checksums
9017602b765958fb145f1ed10de5dd2a0d602a1dc5ca5962c6b1e266343a221e
BLAKE2b-256 checksum
How to use checksums
5698cfa775c24514df7552de18ae8e792f2dff8185476b217d30131bd624fa2a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / django_social_user-0.1.9-py27-none-any.whl

Download URL django_social_user-0.1.9-py27-none-any.whl
Size 13.3 kB
Tags Python 2.7
SHA-256 checksum
How to use checksums
04fa1e5d2de68790cb2d1577c3d2cad99c57117b42c18acc3c3355b5f441d5dd
BLAKE2b-256 checksum
How to use checksums
209c66f3a57f9eb530d4e675d847f569669021fddafcbf0e00be499a6bc461dd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / django-social-user-0.1.9.macosx-10.8-intel.exe

Download URL django-social-user-0.1.9.macosx-10.8-intel.exe
Size 76.4 kB
Tags Source
SHA-256 checksum
How to use checksums
e5526ef8a29b1006b24992f90f5e7cb36711e1b520c6a598e18df76ed9747643
BLAKE2b-256 checksum
How to use checksums
daac200d54ed92bafe2f770cf3bf2b9a846fc531e19e10dc2e1f815467f3ec41
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.1.9 This release

3 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

1 release file

0.1.5

1 release file

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page