﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
32259	Modernize request attribute names	Adam Johnson	Adam Johnson	"As discussed [https://groups.google.com/g/django-developers/c/Kx8BfU-z4_E/m/lFXTF0IMCQAJ on the mailing list] (back in May):

> request.GET and request.POST are misleadingly named:
> 
> * GET contains the URL parameters and is therefore available whatever the request method. This often confuses beginners and “returners” alike.
> * POST contains form data on POST requests, but not other kinds of data from POST requests. It can confuse users who are posting JSON or other formats.
> 
> Additionally both names can lead users to think e.g. ""if request.GET:"" means ""if this is a GET request"", which is not true.
> 
> I believe the CAPITALIZED naming style was inherited from PHP's global variables $_GET, $_POST, $_FILES etc. ( https://www.php.net/manual/en/reserved.variables.get.php ). It stands out as unpythonic, since these are instance variables and not module-level constants (as per PEP8 https://www.python.org/dev/peps/pep-0008/#constants ).
> 
> I therefore propose these renames:
> 
> * request.GET -> request.query_params (to match Django Rest Framework - see below)
> * request.POST -> request.form_data
> * request.FILES -> request.files
> * request.COOKIES -> request.cookies
> * request.META -> request.meta

The biggest concern on the mailing list was churn. Therefore we won't deprecate the old names, but will document them as historical aliases."	New feature	closed	HTTP handling	dev	Normal	wontfix		אורי Carlton Gibson	Unreviewed	1	0	0	0	0	0
