django-friendship
django-friendship copied to clipboard
Add an optional MAX_NUMBER_OF_FRIENDS_ALLOWED in settings
In some websites the maximal number of friends is limited. You can add an optional MAX_NUMBER_OF_FRIENDS_ALLOWED in settings. If it's not defined then the number of friends is unlimited.
You can see for example on Speedy Net, where I defined MAX_NUMBER_OF_FRIENDS_ALLOWED = 800. I'm currently working on branch uri_merge_with_master_2018-12-28_a and you can see my latest code there:
https://github.com/speedy-net/speedy-net/tree/uri_merge_with_master_2018-12-28_a
(The code using this setting is mainly used in class LimitMaxFriendsMixin
on https://github.com/speedy-net/speedy-net/blob/uri_merge_with_master_2018-12-28_a/speedy/core/friends/views.py).
Current (most up-to-date) links: https://github.com/speedy-net/speedy-net/tree/staging https://github.com/speedy-net/speedy-net/blob/staging/speedy/core/friends/views.py