-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathviews.py
More file actions
29 lines (20 loc) · 692 Bytes
/
views.py
File metadata and controls
29 lines (20 loc) · 692 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
from django.core.mail import send_mail
from django.shortcuts import render
from tutorial.tasks import task_mail
# Create your views here.
def dashboard(request):
return render(request, "tutorial/dashboard.html")
def task_use_celery(request):
task_mail.delay()
return render(request, "tutorial/process_done.html")
def task_not_use_celery(request):
subject = "not celery subject test"
message = "not celery message test"
send_mail(
subject,
message,
"admin@celery_test.com",
recipient,
)
return render(request, "tutorial/process_done.html")