コード例 #1
0
ファイル: views.py プロジェクト: goldsoft1206/ella
    def done(self, request, cleaned_data):
        """ Save the question itself. """

        ip = request.META['REMOTE_ADDR']

        question = Question(interview=self.state['object'], ip_address=ip, **cleaned_data)

        if request.user.is_authenticated():
            question.user = request.user

        question.save()

        return HttpResponseRedirect('..')
コード例 #2
0
ファイル: views.py プロジェクト: whit/ella
    def done(self, request, cleaned_data):
        """ Save the question itself. """

        ip = request.META['REMOTE_ADDR']

        question = Question(interview=self.state['object'],
                            ip_address=ip,
                            **cleaned_data)

        if request.user.is_authenticated():
            question.user = request.user

        question.save()

        return HttpResponseRedirect('..')