-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
Streamline and unmagicify view.DATA / view.CONTENT #158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I think it will make a lot more sense once it's I think it's more an issue of:
I totally agree with |
I totally agree with the |
Cool. I've also just now spotted some changes in #141 that address some points already, so I might just be lagging behind. (+1 on putting the data on the request ;)) I'll have a look if I can fork off @sebpiq's changes and add validation reflecting the forms API soonish. Doing one specific thing is good... What about collapsing |
Well, they are already on the same attribute. Guess what I'd wondered about is what about adding something along the lines of |
Possibly, possibly, possibly. I'm not convinced, because I think it conflates two totally different aspects of the HTTP request. (I'm not convinced that If we do go down that route, tho, using |
Isn't that just the same as doing |
Essentially yes. But it leaves ambiguity - one might think that it's only checking for |
REST framework 2.0 uses |
Hi
I find it awkward that the
DATA
attribute on views does not provide a consistent interface to request data, both in the request body and as url query params.Sample code:
Even though it is discouraged in the Django core, I'd much rather have something along the lines of the REQUEST attribute that consistantly returns all the data, no matter from where. The current DATA documentation is misleading in that it suggests that it will also return GET and DELETE data, which is not the case.
Also - I find it awkward that
DATA
andCONTENT
are properties and would strongly prefer methods like the following on the views:Maybe something to think about while @sebpiq is doing all of the backwards incompatible refactoring work on his mainline.
You'll lose one or two more lines of code to the views dealing with data but gain explicitness.
The text was updated successfully, but these errors were encountered: