<s> from __future__ import unicode_literals <EOL> from . . comment . bookmark . models import CommentBookmark <EOL> from . notification . models import TopicNotification <EOL> from . unread . models import TopicUnread <EOL> def topic_viewed ( request , topic ) : <EOL> user = request . user <EOL> comment_number = CommentBookmark . page_to_comment_number ( request . GET . get ( '<STR_LIT>' , <NUM_LIT:1> ) ) <EOL> CommentBookmark . update_or_create ( <EOL> user = user , <EOL> topic = topic , <EOL> comment_number = comment_number <EOL> ) <EOL> TopicNotification . mark_as_read ( user = user , topic = topic ) <EOL> TopicUnread . create_or_mark_as_read ( user = user , topic = topic ) <EOL> topic . increase_view_count ( ) </s>
