Opened 11 years ago

Closed 11 years ago

#4090 closed (wontfix)

Allow django.newforms.extras be included at django.newforms

Reported by: brosner <brosner@…> Owned by: nobody
Component: Forms Version: master
Severity: Keywords:
Cc: Triage Stage: Design decision needed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


I use the following code to get access to newforms code.

import django.newforms as forms

class MyForm(forms.Form)
    mydate = forms.DateField()

All works well, but following the same convention and wanting to use the django.newforms.extras.SelectDateWidget will result in extras not being found.

import django.newforms as forms

class MyForm(forms.Form)
    mydate = forms.DateField(widget=forms.extras.SelectDateWidget())

I have attached the one liner needed in django/newforms/ to allow for this. I don't see it as causing any problems.

Attachments (1)

newforms_import_extras.diff (362 bytes) - added by brosner <brosner@…> 11 years ago.
One Liner to fix #4090

Download all attachments as: .zip

Change History (3)

Changed 11 years ago by brosner <brosner@…>

Attachment: newforms_import_extras.diff added

One Liner to fix #4090

comment:1 Changed 11 years ago by Gary Wilson <gary.wilson@…>

Triage Stage: UnreviewedDesign decision needed

Adrian, was this intentional?

comment:2 Changed 11 years ago by Adrian Holovaty

Resolution: wontfix
Status: newclosed

I'm -1 on this. One of the reasons behind the extras module is to separate uncommonly used fields/widgets so that they're not loaded if they're not needed. This patch makes it so that they're always loaded, which goes against the whole point of having an extras module.

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