P-100
This commit is contained in:
1 parent
8f14eb129a
commit
d8a3644a99
1 file changed
+3
-2
@@ -8,6 +8,7 @@ from .serializers import *
|
||||
from datetime import datetime
|
||||
from rest_framework import generics
|
||||
from navigation.models import News
|
||||
import json
|
||||
|
||||
class GetVotes(APIView):
|
||||
|
||||
@@ -51,7 +52,7 @@ class VoteDetail(generics.RetrieveUpdateDestroyAPIView):
|
||||
lookup_url_kwarg = 'id'
|
||||
lookup_field = 'id'
|
||||
|
||||
import json
|
||||
|
||||
|
||||
class VoteCreate(APIView):
|
||||
def post(self, request):
|
||||
@@ -116,6 +117,6 @@ class VoteCreate(APIView):
|
||||
text = text,
|
||||
cdate = datetime.now(),
|
||||
author = vote_author,
|
||||
link = None,
|
||||
link = request.FILES.get('image'),
|
||||
)
|
||||
news.save()
|
||||
Reference in new issue
Block a user