#21489 closed Cleanup/optimization (fixed)

Expose FormSet on the django.forms package.

Reported by: loic84 Owned by: nobody
Component: Forms Version: master
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Currently formsets are not importable directly from django.forms, this is especially inconvenient as they are scattered between django.forms.models and django.forms.formsets and I somehow always fail to locate them.

I propose we add the relevant entries in __all__.

PR https://github.com/django/django/pull/1961.

Change History (5)

comment:1 Changed 22 months ago by timo

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

I believe there was some discussion on IRC about this ticket, could you summarize?

Personally, I have found the fact that these have to be imported differently a bit puzzling and am happy to merge it absent strong objections.

comment:2 Changed 22 months ago by loic84

If I remember well, Baptiste wasn't totally convinced at first, fearing to add more bloat to an already bloated package. Anssi welcomed the change, arguing that having almost everything in django.forms but leaving just a couple of things out was confusing. Then I believe consensus was reached and the discussion shifted to whether or not we should update the docs.

The issue with updating the docs now is that it would lead to broken imports for people who follow dev docs despite using an earlier version of Django.

The consensus was to update the docs in a couple of versions and open a ticket in the meantime so it doesn't get lost (triage stage of Someday / Maybe?).

FWIW I already have a branch for the docs update https://github.com/loic/django/compare/formset_docs.

comment:3 Changed 22 months ago by timo

I'm fine updating the import examples as a someday/maybe item, but I think I would prefer not to make the module changes as done in your branch since it will make backporting doc changes more painful and the synopsis annotations would no longer work.

comment:4 Changed 22 months ago by loic84

That's a valid concern, no objections from me.

comment:5 Changed 21 months ago by bmispelon

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.
Back to Top