Browse Source

Добавлена проверка на CSRF #17

pull/32/head
Artur Galyamov 2 years ago
parent
commit
1c6a9fdcc9
  1. 3
      cms/views.py

3
cms/views.py

@ -4,15 +4,12 @@ from json import JSONEncoder
import requests
from django.http import HttpRequest
from django.shortcuts import render
from django.utils.decorators import method_decorator
from django.views import View
from django.views.decorators.csrf import csrf_exempt
from cms.forms import ArticleForm
from cms.models import Article
@method_decorator(csrf_exempt, name='dispatch')
class ArticleView(View):
def _promote_to_telegram(self, article: Article):
bot_token = os.getenv('TELEGRAM_BOT_TOKEN')

Loading…
Cancel
Save