django-relationships python

Descriptive relationships between auth.users (think facebook friends and twitter followers, plus more)

6 years after

==================== django-relationships

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

Related Repositories

django-rest-framework-filters

django-rest-framework-filters

Better filtering for Django REST Framework ...

django-entity

django-entity

:alien: Entity relationship management for Django ...

django-parting

django-parting

django-parting helps you partition tables with large amounts of data. ...

django-connections

django-connections

Create, query and manage graphs of relationships between your Django models ...

django-cachetree

django-cachetree

cache configurable trees of related model instances in Django ...


Top Contributors

coleifer jezdez juanriaza epicserve paltman arnee bradmontgomery mlavin

Releases

-   v0.2 zip tar
-   v0.1 zip tar
-   0.3.2 zip tar
-   0.3.1 zip tar
-   0.3.0 zip tar
-   0.2.3 zip tar
-   0.2.2 zip tar