diff --git a/myapp/views.py b/myapp/views.py index 620a0c1..f5cfe5e 100644 --- a/myapp/views.py +++ b/myapp/views.py @@ -1,4 +1,5 @@ from django.shortcuts import render, HttpResponse +from django.views.decorators.csrf import csrf_exempt topics = [ {'id':1, 'title':'routing', 'body':'Routing is ..'}, @@ -41,9 +42,10 @@ def read(request, id): article = f'

{topic["title"]}

{topic["body"]}' return HttpResponse(HTMLTemplate(article)) +@csrf_exempt def create(request): article = ''' -
+