#NEWLINE# def for_viewer( self , user ) : #NEWLINE# #INDENT# "\n        Returns all observations for viewer, i.e. users who have no moderation\n        permissions on the projects.\n\n        If the user is anonymous, it returns only observations with\n        status='active' and status='review'\n\n        If the user is not anonymous, it returns it returns only observations\n        with status='active' and status='review' as well as status='pending'\n        when the given user is creator of those observation.\n\n        Parameters\n        ----------\n        user : geokey.users.models.User\n            User that contributions are filtered for\n\n        Return\n        ------\n        django.db.models.Queryset\n            List of observations for viewer\n        " #NEWLINE# if user . is_anonymous ( ) : #NEWLINE# #INDENT# return self . exclude ( status = 'draft' ) . exclude ( status = 'pending' ) #NEWLINE# #UNINDENT# return self . for_moderator ( user ) . exclude ( ( ~ Q ( creator = self ) ) , status = 'pending' )