descriptive relationships between auth.User
Descriptive relationships between auth.users:
In : john.relationships.friends() Out: [<User: Yoko>] In : john.relationships.following() Out: [<User: Paul>, <User: Yoko>] In : john.relationships.followers() Out: [<User: Yoko>] In : john.relationships.blockers() Out: [<User: Paul>] In : paul.relationships.blocking() Out: [<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’.
Relationships hook right into the pre-existing User admin, and appear below the ‘Groups’ inline.
python setup.py install
put the relationships folder on your python-path
Release history Release notifications | RSS feed
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size django-relationships-0.2.0.tar.gz (16.7 kB)||File type Source||Python version None||Upload date||Hashes View|
Hashes for django-relationships-0.2.0.tar.gz