Esempio n. 1
0
File: forms.py Progetto: Alsum/Picha
 def send_email(self):
     # try to trick spammers by checking whether the honeypot field is
     # filled in; not super complicated/effective but it works
     if self.cleaned_data['honeypot']:
         return False
     send_feedback_email_task.delay(
         self.cleaned_data['email'], self.cleaned_data['message'])
Esempio n. 2
0
 def send_email(self):
     # try to trick spammers by checking whether the honeypot field is
     # filled in; not super complicated/effective but it works
     if self.cleaned_data['honeypot']:
         return False
     send_feedback_email_task.delay(self.cleaned_data['email'],
                                    self.cleaned_data['message'])
Esempio n. 3
0
 def send_email(self):
     # interesting way to check for spambots
     if self.cleaned_data['honeypot']:
         return False
     # the below function processes and sends the feedback
     # email in the background as the user continues to use the site.
     send_feedback_email_task.delay(
         self.cleaned_data['email'], self.cleaned_data['message'])
Esempio n. 4
0
 def send_email(self):
     logger.info(str(logger))
     logger.info('kdsjfklajdsfkljadklfjaklsdjfklajsdf')
     logger.info(str(logging.Logger.manager.loggerDict))
     # try to trick spammers by checking whether the honeypot field is
     # filled in; not super complicated/effective but it works
     if self.cleaned_data['honeypot']:
         return False
     send_feedback_email_task.delay(self.cleaned_data['email'],
                                    self.cleaned_data['message'])
 def send_email(self):  # pragma: no cover
     send_feedback_email_task.delay(self.cleaned_data['email'],
                                    self.cleaned_data['message'])
Esempio n. 6
0
 def post(self, request):
     value = request.data['valor']
     send_feedback_email_task.delay(value['email'], value['message'])  
     return Response(status=status.HTTP_200_OK)
Esempio n. 7
0
 def send_email(self):
     if self.cleaned_data['honeypot']:
         return False
     send_feedback_email_task.delay(self.cleaned_data['email'],
                                    self.cleaned_data['message'])