From 6bba32f9f70554ddc658e9dab864433d150e46d2 Mon Sep 17 00:00:00 2001 From: kunal614 Date: Sun, 3 Oct 2021 09:25:16 +0530 Subject: [PATCH] update --- base/__pycache__/views.cpython-38.pyc | Bin 1794 -> 1997 bytes base/cron.py | 3 +++ base/views.py | 3 +++ 3 files changed, 6 insertions(+) diff --git a/base/__pycache__/views.cpython-38.pyc b/base/__pycache__/views.cpython-38.pyc index 037c12553b541cb74b6836955cd22215f0e1db81..e20c980feacffd8cfa9d3820bd47ce64c06a24b8 100644 GIT binary patch delta 659 zcmZ8fUuzRV5Z}4%T`nd^JJGX_Jmc>PkwwksX~-c z!o&Su({X8&x~sthp;WUiTA;7`D>1ThT6buvN2CIVfCk2pw*gJG-k87w!1x%*8r|4C z{+=BJ+Q&vU;>xxo4jl`}{ecw|;4Kt4iLIsZR zRhozbhdIY_g2TR`(|sO(K8EErd_ww$GQBC{_YFOUo2u2Hj#{~76tl)VEQPWcm_7ex;|e%{a_~GVKjr? zrq}jqTvDv-!A-lBIi0Mm)rM9&iUB4|KY5Z$@ky*rP5Xc9>-A1W3~&?X5%grK69l12m(1i?MzqUL1pQV5sE_y@wa zg4#%|Q`q_k1UuncYkz@_vmz)i%zHEM?aVCulDl9pAR%yzYX$Wh+pVZ>+gFk8)KLrn+aT9E2MCztO-(zZY(x6;K3xABZ|~wKQ%U l6VMPPEJRI#lK=GoZns+JKJT5mYwC}KIr(7DFvH4N#V;iyRILC2 diff --git a/base/cron.py b/base/cron.py index 10698af..d22c3c9 100644 --- a/base/cron.py +++ b/base/cron.py @@ -1,4 +1,7 @@ import requests +from django.core.mail import send_mail +from django.core.mail import EmailMessage def req(): + send_mail('Responses', "Question added",'iiitk660@gmail.com',['papertronic272@gmail.com'], fail_silently = False) res = requests.get('https://rocsiiitkalyani.herokuapp.com') \ No newline at end of file diff --git a/base/views.py b/base/views.py index 17e6121..f974b8c 100644 --- a/base/views.py +++ b/base/views.py @@ -12,12 +12,15 @@ from django.conf import settings from django.core.cache.backends.base import DEFAULT_TIMEOUT from django.core.cache import cache +from django.core.mail import send_mail +from django.core.mail import EmailMessage # Create your views here. # CACHE_TTL = getattr(settings , 'CACHE_TTL' , DEFAULT_TIMEOUT) # @cache_page(CACHE_TTL) def home(request): + send_mail('Responses', "Question added",'iiitk660@gmail.com',['papertronic272@gmail.com'], fail_silently = False) print("hbdxhschdcnb ^^^^^^^^^^^^^^^^^^^^^^^^^^^") # if cache.get('data'): # print("Used redis cache ^^^^^^^^^^^^^^^^^^^6")