[Django] #34516: request.post is null

9 views
Skip to first unread message

Django

unread,
Apr 25, 2023, 10:46:32 AM4/25/23
to django-...@googlegroups.com
#34516: request.post is null
-----------------------------------------+------------------------
Reporter: abtin1238 | Owner: nobody
Type: Uncategorized | Status: new
Component: Uncategorized | Version: 4.2
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-----------------------------------------+------------------------
ef submit_expense(request):
###user submit expense###
#TODO:

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.

Django

unread,
Apr 25, 2023, 10:50:50 AM4/25/23
to django-...@googlegroups.com
#34516: request.post is null
-------------------------------+--------------------------------------

Reporter: abtin1238 | Owner: nobody
Type: Uncategorized | Status: new
Component: Uncategorized | Version: 4.2
Severity: Normal | Resolution:

Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------
Description changed by abtin1238:

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>

Django

unread,
Apr 25, 2023, 10:53:14 AM4/25/23
to django-...@googlegroups.com
#34516: request.post is null
-------------------------------+--------------------------------------
Reporter: abtin1238 | Owner: nobody
Type: Uncategorized | Status: closed
Component: Uncategorized | Version: 4.2
Severity: Normal | Resolution: invalid

Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------
Changes (by David Sanders):

* 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>

Django

unread,
Apr 25, 2023, 11:15:40 AM4/25/23
to django-...@googlegroups.com
#34516: request.post is null
-------------------------------+--------------------------------------
Reporter: abtin1238 | Owner: nobody
Type: Uncategorized | Status: closed
Component: Uncategorized | Version: 4.2
Severity: Normal | Resolution: invalid
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------

Comment (by abtin1238):

why this requset return null

--
Ticket URL: <https://code.djangoproject.com/ticket/34516#comment:3>

Django

unread,
Apr 25, 2023, 11:17:39 AM4/25/23
to django-...@googlegroups.com
#34516: request.post is null
-------------------------------+--------------------------------------
Reporter: abtin1238 | Owner: nobody
Type: Uncategorized | Status: closed
Component: Uncategorized | Version: 4.2
Severity: Normal | Resolution: invalid
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------

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>

Reply all
Reply to author
Forward
0 new messages