geonode.favorite.models
Classes
Module Contents
- class geonode.favorite.models.FavoriteManager[source]
Bases:
django.db.models.Manager- favorite_for_user_and_content_object(user, content_object)[source]
Returns the Favorite object if it exists for the given user, type, and the primary key of the input content_object. If no Favorite exists, returns None.
Note
Due to the class’s unique_together constraint, there can be only 0 or 1 Favorite object for the given combination of user, type, and content_object.