Opened 17 years ago

Closed 17 years ago

#4090 closed (wontfix)

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

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

Description

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/init.py 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@…> 17 years ago.
One Liner to fix #4090

Download all attachments as: .zip

Change History (3)

by brosner <brosner@…>, 17 years ago

Attachment: newforms_import_extras.diff added

One Liner to fix #4090

comment:1 by Gary Wilson <gary.wilson@…>, 17 years ago

Triage Stage: UnreviewedDesign decision needed

Adrian, was this intentional?

comment:2 by Adrian Holovaty, 17 years ago

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