this_token = request.POST.get("token")
return JsonResponse({
"token": this_token
} )
why this code return null
--
Ticket URL: <https://code.djangoproject.com/ticket/34516>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
Old description:
> ef submit_expense(request):
> ###user submit expense###
> #TODO:
>
> this_token = request.POST.get("token")
>
>
> return JsonResponse({
> "token": this_token
> } )
> why this code return null
New description:
from django.shortcuts import render
from django.http import JsonResponse
from json import JSONEncoder
from django.views.decorators.csrf import csrf_exempt
from web.models import User,Token,Expense,Income
from datetime import datetime
# Create your views here.
@csrf_exempt
def submit_expense(request):
this_token = request.POST.get("token")
return JsonResponse({
"token": this_token
} )
--
--
Ticket URL: <https://code.djangoproject.com/ticket/34516#comment:1>
* status: new => closed
* resolution: => invalid
Comment:
Hello.
The issue tracker is not a support channel. Please refer to the following
link for places to get support: https://www.djangoproject.com/community/
:)
--
Ticket URL: <https://code.djangoproject.com/ticket/34516#comment:2>
Comment (by abtin1238):
why this requset return null
--
Ticket URL: <https://code.djangoproject.com/ticket/34516#comment:3>
Comment (by Mariusz Felisiak):
Replying to [comment:3 abtin1238]:
> why this requset return null
Again, Trac is not a support channel.
--
Ticket URL: <https://code.djangoproject.com/ticket/34516#comment:4>