django-relationships 0.3.3

descriptive relationships between auth.User

Descriptive relationships between auth.users:

In [4]: john.relationships.friends()
Out[4]: [<User: Yoko>]

In [5]: john.relationships.following()
Out[5]: [<User: Paul>, <User: Yoko>]

In [6]: john.relationships.followers()
Out[6]: [<User: Yoko>]

In [7]: john.relationships.blockers()
Out[7]: [<User: Paul>]

In [8]: paul.relationships.blocking()
Out[8]: [<User: John>]

You can create as many types of relationships as you like, or just use the default ones, 'following' and 'blocking'.

From, To and Symmetrical

Relationship types define each of the following cases:

  • from - 'following', who I am following
  • to - 'followers', who is following me
  • symmetrical - 'friends', we follow eachother

Relationship types can be login_required, or private, and if you want to make a relationship type unviewable (i.e. you may not want to allow users to see who is blocking them), simply give it a unmatchable slug, like '!blockers'.

Admin Interface

Relationships hook right into the pre-existing User admin, and appear below the 'Groups' inline.

Installation

python setup.py install

OR

put the relationships folder on your python-path

Author

Charles Leifer

Pip

django-relationships==0.3.3

Classifiers

  • Programming Language :: Python
  • Operating System :: OS Independent
  • License :: OSI Approved :: MIT License
  • Intended Audience :: Developers
  • Framework :: Django
  • Environment :: Web Environment
  • Development Status :: 4 - Beta
File Type Python Version Uploaded On Downloads
django-relationships-0.3.3.tar.gz Source Oct. 12, 2013 2,289
Version Release Date
0.3.3 Oct. 12, 2013
0.3.2 Sept. 5, 2012
0.3.1 Sept. 4, 2012
0.3.0 July 6, 2011
0.2.3 June 6, 2011
0.2.2 Feb. 17, 2011
0.2.1 Aug. 8, 2010
0.2.0 May 8, 2010
0.1.1 April 30, 2010
0.1.0 April 28, 2010
Date Package Version Action
Nov. 4, 2014, 1:42 p.m. django-relationships 0.1.1 Release Created
Nov. 4, 2014, 1:42 p.m. django-relationships 0.1.0 Release Created
Nov. 4, 2014, 1:42 p.m. django-relationships 0.2.0 Release Created
Nov. 4, 2014, 1:42 p.m. django-relationships 0.2.1 Release Created
Nov. 4, 2014, 1:42 p.m. django-relationships 0.2.2 Release Created
Nov. 4, 2014, 1:42 p.m. django-relationships 0.2.3 Release Created
Nov. 4, 2014, 1:42 p.m. django-relationships 0.3.1 Release Created
Nov. 4, 2014, 1:42 p.m. django-relationships 0.3.0 Release Created
Nov. 4, 2014, 1:42 p.m. django-relationships 0.3.3 Release Created
Nov. 4, 2014, 1:42 p.m. django-relationships 0.3.2 Release Created
Nov. 4, 2014, 1:42 p.m. django-relationships Package Created