Module Expr Str Import alias ImportFrom alias ImportFrom alias identifier ImportFrom alias Import alias ClassDef bases AttributeLoad NameLoad attr body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword Str Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword Str Expr Str Assign NameStore Call AttributeLoad NameLoad attr keyword Num keyword NameLoad Expr Str Assign NameStore Call AttributeLoad NameLoad attr keyword AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad Expr Str Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad Expr Str ClassDef bases body Assign NameStore Call NameLoad Str Assign NameStore Call NameLoad Str Assign NameStore TupleLoad TupleLoad Str Str decorator_list FunctionDef arguments args NameParam defaults body Return BinOpMod Call NameLoad Str Dict Str Str Call NameLoad AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad Expr Call AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Str Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad Return Call NameLoad Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad Expr Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad keyword NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad Expr Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad keyword NameLoad attr Expr Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad keyword NameLoad attr decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword Str Expr Str Assign NameStore Call AttributeLoad NameLoad attr Str keyword NameLoad Expr Str Assign NameStore Call NameLoad ClassDef bases body Assign NameStore Call NameLoad Str Assign NameStore Call NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body Return BinOpMod Call NameLoad Str Dict Str Call NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list Assign AttributeStore NameLoad attr Call NameLoad Str FunctionDef arguments args NameParam NameParam defaults Num body Expr Str Assign NameStore SubscriptLoad Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr attr keyword Num Slice NameLoad Return BinOpMod Str TupleLoad Call AttributeLoad Str attr GeneratorExp Call NameLoad AttributeLoad NameLoad attr comprehension NameStore NameLoad IfExp CompareGt Call AttributeLoad NameLoad attr NameLoad Str Str decorator_list Assign AttributeStore NameLoad attr Call NameLoad Str decorator_list ClassDef bases AttributeLoad NameLoad attr body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword Str Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword Str Expr Str ClassDef bases body Assign NameStore NameStore Call NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body Return BinOpMod Call NameLoad Str Dict Str Call NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list Assign AttributeStore NameLoad attr Call NameLoad Str FunctionDef arguments args NameParam NameParam defaults Num body Expr Str Assign NameStore SubscriptLoad Call AttributeLoad AttributeLoad NameLoad attr attr Slice NameLoad Return BinOpMod Str TupleLoad Call AttributeLoad Str attr GeneratorExp Call NameLoad NameLoad comprehension NameStore NameLoad IfExp CompareGt Call AttributeLoad NameLoad attr NameLoad Str Str decorator_list Assign AttributeStore NameLoad attr Call NameLoad Str decorator_list Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr AttributeLoad NameLoad attr keyword NameLoad keyword Str Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr AttributeLoad NameLoad attr keyword NameLoad keyword Str
N/A N/A 
Models
======

.. autoclass:: FriendshipRequest
    :members:

.. autoclass:: FriendshipManager
    :members:

.. autoclass:: Friendship
    :members:

.. autoclass:: UserBlocks
    :members:
 N/A datetime django.db models django.utils.translation ugettext_lazy _ django.contrib.auth.models User N/A signals FriendshipRequest N/A N/A models Model N/A N/A 
    An intent to create a friendship between two users.

    .. seealso::

        There should never be complementary :class:`FriendshipRequest`\ 's,
        as in ``user1`` requests to be friends with ``user2`` when ``user2``
        has been requested to be friends with ``user1``. See how
        :class:`~friends.views.FriendshipRequestView` checks the existence of
        a :class:`FriendshipRequest` from ``to_user`` to ``from_user``.
     N/A from_user N/A N/A models ForeignKey User related_name friendshiprequests_from N/A 
    :class:`~django.db.models.ForeignKey` to |User| who initiated the request.
     N/A to_user N/A N/A models ForeignKey User related_name friendshiprequests_to N/A 
    :class:`~django.db.models.ForeignKey` to |User| the request has been sent.
     N/A message N/A N/A models CharField max_length 200 blank True N/A 
    :class:`~django.db.models.CharField` containing the optional message.

    .. note::

        ``__unicode__()`` method of this class **does not** print out this
        field. You must explicitly access this field to output the message.

    Although :mod:`django-simple-friends <friends>` doesn't provide any
    functionality to use markup engines to render this message it doesn't
    prevent you to store and render it in any format you desire.
     N/A created N/A N/A models DateTimeField default N/A N/A datetime datetime now editable False N/A 
    :class:`~django.db.models.DateTimeField` set when the object is created.
     N/A accepted N/A N/A models BooleanField default False N/A 
    :class:`~django.db.models.BooleanField` indicates whether the request is
    accepted or still pending.
     Meta N/A N/A N/A verbose_name N/A _ friendship request N/A verbose_name_plural N/A _ friendship requests N/A unique_together N/A N/A to_user from_user N/A __unicode__ N/A N/A self N/A N/A N/A N/A N/A _ %(from_user)s wants to be friends with %(to_user)s N/A from_user to_user N/A unicode N/A self from_user N/A unicode N/A self to_user N/A accept N/A N/A self N/A N/A N/A 
        Create the :class:`Friendship` between
        :attr:`~FriendshipRequest.from_user` and
        :attr:`~FriendshipRequest.to_user` and mark this instance
        as accepted.

        :obj:`~friends.signals.friendship_accepted` is signalled on success.

        .. seealso::

            :class:`~friends.views.FriendshipAcceptView`
         N/A N/A N/A N/A Friendship objects befriend N/A self from_user N/A self to_user N/A N/A self accepted True N/A N/A N/A self save N/A N/A N/A N/A signals friendship_accepted send sender self N/A decline N/A N/A self N/A N/A N/A 
        Deletes this :class:`FriendshipRequest`

        :obj:`~friends.signals.friendship_declined` is signalled on success.

        .. seealso::

            :class:`~friends.views.FriendshipDeclineView`
         N/A N/A N/A N/A signals friendship_declined send sender self N/A N/A N/A self delete N/A cancel N/A N/A self N/A N/A N/A 
        Deletes this :class:`FriendshipRequest`

        :obj:`~friends.signals.friendship_cancelled` is signalled on success.

        .. seealso::

            :class:`~friends.views.FriendshipCancelView`
         N/A N/A N/A N/A signals friendship_cancelled send sender self N/A N/A N/A self delete N/A N/A FriendshipManager N/A N/A models Manager N/A friends_of N/A N/A self user shuffle N/A False N/A N/A 
        List friends of ``user``.

        :param user: User to query friends.
        :type user: |User|
        :param shuffle: Optional. Default ``False``.
        :type shuffle: |bool|
        :returns: :class:`~django.db.models.query.QuerySet` containing friends
                  of ``user``.
         N/A qs N/A N/A N/A User objects filter friendship__friends__user user N/A shuffle N/A N/A qs N/A N/A qs order_by ? N/A qs N/A are_friends N/A N/A self user1 user2 N/A N/A N/A 
        Indicate if ``user1`` and ``user2`` are friends.

        :param user1: User to compare with ``user2``.
        :type user1: |User|
        :param user2: User to compare with ``user1``.
        :type user2: |User|
        :rtype: |bool|
         N/A friendship N/A N/A N/A Friendship objects get user user1 N/A N/A bool N/A N/A N/A N/A N/A friendship friends filter user user2 exists N/A befriend N/A N/A self user1 user2 N/A N/A N/A 
        Establish friendship between ``user1`` and ``user2``.

        .. important::

            Instead of calling this method directly,
            :func:`FriendshipRequest.accept()
            <friends.models.FriendshipRequest.accept>`, which calls
            this method, should be used.

        :param user1: User to make friends with ``user2``.
        :type user1: |User|
        :param user2: User to make friends with ``user1``.
        :type user2: |User|
         N/A friendship N/A N/A N/A Friendship objects get user user1 N/A N/A N/A N/A friendship friends add N/A N/A N/A Friendship objects get user user2 N/A N/A N/A N/A N/A N/A FriendshipRequest objects filter from_user user1 to_user user2 delete N/A unfriend N/A N/A self user1 user2 N/A N/A N/A 
        Break friendship between ``user1`` and ``user2``.

        :param user1: User to unfriend with ``user2``.
        :type user1: |User|
        :param user2: User to unfriend with ``user1``.
        :type user2: |User|
         N/A friendship N/A N/A N/A Friendship objects get user user1 N/A N/A N/A N/A friendship friends remove N/A N/A N/A Friendship objects get user user2 N/A N/A N/A N/A N/A N/A FriendshipRequest objects filter from_user user1 to_user user2 delete N/A N/A N/A N/A N/A N/A FriendshipRequest objects filter from_user user2 to_user user1 delete N/A N/A Friendship N/A N/A models Model N/A N/A 
    Represents the network of friendships.
     N/A user N/A N/A models OneToOneField User related_name friendship N/A 
    |OneToOneField| to |User| whose friends are stored.
     N/A friends N/A N/A models ManyToManyField self symmetrical True N/A 
    Symmetrical |ManyToManyField| to :class:`Friendship`.

    .. seealso::

        To obtain friends as a list of |User|'s use
        :meth:`FriendshipManager.friends_of()
        <friends.models.FriendshipManager.friends_of>`.
     N/A objects N/A FriendshipManager Meta N/A N/A N/A verbose_name N/A _ friendship N/A verbose_name_plural N/A _ friendships N/A __unicode__ N/A N/A self N/A N/A N/A N/A N/A _ %(user)s's friends N/A user N/A unicode N/A self user N/A friend_count N/A N/A self N/A N/A N/A 
        Return the count of :attr:`~Friendship.friends`.
        This method is used in :class:`~friends.admin.FriendshipAdmin`.

        :rtype: |int|
         N/A N/A N/A N/A self friends count N/A N/A N/A friend_count short_description N/A _ Friends count friend_summary N/A N/A self count N/A 7 N/A N/A 
        Return a string representation of
        :attr:`~Friendship.friends`.
        This method is used in :class:`~friends.admin.FriendshipAdmin`.

        :param |int| count: Maximum number of friends to include in the output.
        :rtype: |unicode|
         N/A friend_list N/A N/A N/A N/A N/A N/A self friends all select_related depth 1 N/A count N/A N/A [%s%s] N/A N/A N/A ,  join N/A N/A unicode N/A f user N/A f friend_list N/A N/A N/A N/A self friend_count count , ... N/A N/A N/A friend_summary short_description N/A _ Summary of friends N/A UserBlocks N/A N/A models Model N/A N/A 
    |User|'s blocked by :attr:`~UserBlocks.user`.
     N/A user N/A N/A models OneToOneField User related_name user_blocks N/A 
    |OneToOneField| to |User| whose blocks are stored.
     N/A blocks N/A N/A models ManyToManyField User related_name blocked_by_set N/A 
    |ManyToManyField| to containing blocked |User|'s.
     Meta N/A N/A N/A verbose_name verbose_name_plural N/A _ user blocks N/A __unicode__ N/A N/A self N/A N/A N/A N/A N/A _ Users blocked by %(user)s N/A user N/A unicode N/A self user N/A block_count N/A N/A self N/A N/A N/A 
        Return the count of :attr:`~UserBlocks.blocks`.
        This method is used in :class:`~friends.admin.UserBlocksAdmin`.

        :rtype: |int|
         N/A N/A N/A N/A self blocks count N/A N/A N/A block_count short_description N/A _ Blocks count block_summary N/A N/A self count N/A 7 N/A N/A 
        Return a string representation of
        :attr:`~UserBlocks.blocks`.
        This method is used in :class:`~friends.admin.UserBlocksAdmin`.

        :param |int| count: Maximum number of blocked users to include in
                            the output.
        :rtype: |unicode|
         N/A block_list N/A N/A N/A N/A self blocks all N/A count N/A N/A [%s%s] N/A N/A N/A ,  join N/A N/A unicode user N/A user block_list N/A N/A N/A N/A self block_count count , ... N/A N/A N/A block_summary short_description N/A _ Summary of blocks N/A N/A N/A N/A N/A N/A models signals post_save connect N/A signals create_friendship_instance sender User dispatch_uid friends.signals.create_friendship_instance N/A N/A N/A N/A N/A models signals post_save connect N/A signals create_userblocks_instance sender User dispatch_uid friends.signals.create_userblocks_instance