#36725: Add documentation for HTML form field equivalents to Django form fields
-------------------------------------+-------------------------------------
     Reporter:  Quinn-beep           |                     Type:
                                     |  Cleanup/optimization
       Status:  new                  |                Component:  Forms
      Version:  5.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
-------------------------------------+-------------------------------------
 Currently, Django’s documentation explains the mapping between model
 fields and form fields, but it doesn’t provide a clear reference showing
 how Django form fields correspond to standard HTML form elements.

 To make the documentation more accessible to beginners and web developers
 transitioning from raw HTML forms to Django forms, I propose adding a
 section (or table) that lists Django form fields and their equivalent HTML
 form field types.

 This addition will help users quickly understand which Django field to use
 when they are familiar with basic HTML input types.

 The proposed documentation enhancement includes a table similar to the one
 below:
 | **Django Form Field**             | **HTML Equivalent** | **Example HTML
 Tag**                    |
 | --------------------------------- | ------------------- |
 --------------------------------------- |
 | `CharField`                       | Text input          | `<input
 type="text">`                   |
 | `EmailField`                      | Email input         | `<input
 type="email">`                  |
 | `BooleanField`                    | Checkbox input      | `<input
 type="checkbox">`               |
 | `DateField`                       | Date input          | `<input
 type="date">`                   |
 | `FileField`                       | File upload         | `<input
 type="file">`                   |
 | `TextField`                       | Text area           |
 `<textarea></textarea>`                 |
 | `ChoiceField`                     | Dropdown            |
 `<select><option>...</option></select>` |
 | … *(and other relevant mappings)* |                     |
 |
 … (and other relevant mappings)

 This addition would be placed in the Forms documentation (likely
 docs/topics/forms/modelforms.txt) under a new section titled “HTML Form
 Field Equivalents in Django.”
-- 
Ticket URL: <https://code.djangoproject.com/ticket/36725>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/django-updates/0107019a71a18228-d9e45433-12d7-48bc-b580-7fd697b747ae-000000%40eu-central-1.amazonses.com.

Reply via email to