apps/home/views.py
def form_valid(self, form):
        """
        This method is called when valid form data has been POSTed.
        :param form: JoinChatForm
        :return: HttpResponse
        """
        # join to chat run during validation process
        chat_token = self.request.POST.get('chat_token')
        self.success_url = '/chat/' + str(chat_token)

        chat_page = ChatPage(self.request)
        chat_page.set_user_token(form.user_token)
        # logger.info('User joined to chat: ' + str(chat_token))
        logger.info('User joined to chat: ' + chat_token)
        return super(HomeView, self).form_valid(form)

        This method is called when valid form data has been POSTed.
        :param form: JoinChatForm
        :return: HttpResponse
        
This method is called when valid form data has been POSTed.
This method is called when valid form data has been POSTed .
def form_valid(self, form):
        chat_token = self.request.POST.get('chat_token')
        self.success_url = '/chat/' + str(chat_token)
        chat_page = ChatPage(self.request)
        chat_page.set_user_token(form.user_token)
        logger.info('User joined to chat: ' + chat_token)
        return super(HomeView, self).form_valid(form)
def form_valid ( self , form ) : chat_token = self . request . POST . get ( 'chat_token' ) self . success_url = '/chat/' + str ( chat_token ) chat_page = ChatPage ( self . request ) chat_page . set_user_token ( form . user_token ) logger . info ( 'User joined to chat: ' + chat_token ) return super ( HomeView , self ) . form_valid ( form )
This method is called when valid form data has been POSTed.
This method is called when valid form data has been POSTed .
"""
        This method is called when valid form data has been POSTed.
        :param form: JoinChatForm
        :return: HttpResponse
        """ # join to chat run during validation process # logger.info('User joined to chat: ' + str(chat_token))
None
self
form
None