Opened 9 years ago

Closed 9 years ago

#5070 closed (wontfix)

newforms: Default arguments for QuerySetIterator

Reported by: Thomas Güttler <hv@…> Owned by: adrian
Component: Forms Version: master
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:



I think default for the QuerySetIterator would be good::

class QuerySetIterator(object):

def init(self, queryset, empty_label=u"---------", cache_choices=False):

Attachments (1)

newforms-models-querysetinterator.diff (591 bytes) - added by Thomas Güttler <hv@…> 9 years ago.

Download all attachments as: .zip

Change History (2)

Changed 9 years ago by Thomas Güttler <hv@…>

comment:1 Changed 9 years ago by adrian

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to wontfix
  • Status changed from new to closed

I don't see what benefit this brings us, because calling code is supposed to use ModelChoiceField, not access QuerySetIterator directly. The latter is not documented.

And there's a maintainability advantage in only including the default arguments in one place.

Note: See TracTickets for help on using tickets.
Back to Top