Re: [Django] #33757: django.test.Client.post documentation is confusing

4 views
Skip to first unread message

Django

unread,
Jun 2, 2022, 5:43:13 AM6/2/22
to django-...@googlegroups.com
#33757: django.test.Client.post documentation is confusing
--------------------------------+--------------------------------------
Reporter: bastian-wattro | Owner: nobody
Type: Bug | Status: closed
Component: Documentation | Version: 4.0
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 Mariusz Felisiak):

* status: new => closed
* resolution: => invalid


Comment:

I don't see anything confusing in this docs.

> This made me assume that the file given via the file pointer will be
accessible via the keyword `fred`.

Docs explicitly states that the name `attachment` here is not relevant.
`fred` is not a keyword but a value for the `name` and it's used that way
in other examples.

> What I don't understand is why the keyword 'name' is there, and why
doesn't it simply say something like:

IMO it's valuable to show that other fields are handled properly and you
don't need to send files separately.

--
Ticket URL: <https://code.djangoproject.com/ticket/33757#comment:4>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jun 2, 2022, 6:09:46 AM6/2/22
to django-...@googlegroups.com
#33757: django.test.Client.post documentation is confusing
--------------------------------+--------------------------------------
Reporter: bastian-wattro | Owner: nobody
Type: Bug | Status: closed
Component: Documentation | Version: 4.0
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 bastian-wattro):

> Docs explicitly states that the name attachment here is not relevant.

See that is what confuses me. `attachment` is very relevant, as it is the
keyword in the FILES dict.
This is implicitly stated ("use whatever name your file-processing code
expects") but not clear if you jump in the docs without context
information.

--
Ticket URL: <https://code.djangoproject.com/ticket/33757#comment:5>

Reply all
Reply to author
Forward
0 new messages