#NEWLINE# @ login_required #NEWLINE# def join_in( request , topic_id ) : #NEWLINE# #INDENT# topic = get_object_or_404 ( Topic , pk = topic_id , user = request . user , category_id = settings . ST_TOPIC_PRIVATE_CATEGORY_PK ) #NEWLINE# if ( request . method == 'POST' ) : #NEWLINE# #INDENT# form = TopicPrivateJoinForm ( topic = topic , user = request . user , data = request . POST ) #NEWLINE# if form . is_valid ( ) : #NEWLINE# #INDENT# topic_private = form . save ( ) #NEWLINE# notify_access ( user = form . get_user ( ) , topic_private = topic_private ) #NEWLINE# return redirect ( request . POST . get ( 'next' , topic . get_absolute_url ( ) ) ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# form = TopicPrivateJoinForm ( ) #NEWLINE# #UNINDENT# context = { #NEWLINE# #INDENT# 'topic' : topic , #NEWLINE# 'form' : form , #NEWLINE# #UNINDENT# } #NEWLINE# return render ( request , 'spirit/topic/private/join.html' , context )