コード例 #1
0
ファイル: email.py プロジェクト: karbon62/atmosphere
    def _email(self, request, username, user_email, message):
        """
        Sends an email Bto support based on feedback from a client machine

        Returns a response.
        """
        return feedback_email(request, username, user_email, message)
コード例 #2
0
ファイル: email.py プロジェクト: Angelfirenze/atmosphere
    def _email(self, request, username, user_email, message):
        """
        Sends an email Bto support based on feedback from a client machine

        Returns a response.
        """
        return feedback_email(request, username, user_email, message)
コード例 #3
0
 def post(self, request):
     """
     Creates a new feedback email and sends it to admins
     """
     data = request.data
     required = ['message',]
     missing_keys = valid_post_data(data, required)
     if missing_keys:
         return keys_not_found(missing_keys)
     #Pass arguments
     user = request.user
     message = data['message']
     user_email = lookupEmail(user.username)
     result = feedback_email(request, user.username, user_email, message)
     return Response(result, status=status.HTTP_201_CREATED)
コード例 #4
0
ファイル: email.py プロジェクト: ardicool/atmosphere
 def post(self, request):
     """
     Creates a new feedback email and sends it to admins
     """
     data = request.DATA
     required = ['message',]
     missing_keys = valid_post_data(data, required)
     if missing_keys:
         return keys_not_found(missing_keys)
     #Pass arguments
     user = request.user
     message = data['message']
     user_email = lookupEmail(user.username)
     result = feedback_email(request, user.username, user_email, message)
     return Response(result, status=status.HTTP_201_CREATED)