Opened 8 years ago

Closed 8 years ago

#4652 closed (invalid)

URLField controls the text even if verify_exists and required are False

Reported by: Eren Türkay <turkay.eren@…> Owned by: adrian
Component: Forms Version: 0.96
Severity: Keywords: urlfield
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

Hi,

I have and URLField in user membership form, it's not optional and the initial value is http:// When I blank homepage input as is, django gives error "Enter a valid URL" even if I set required false. in forms.py line 287, super function is called regardless of controlling this option.

Attachments (1)

test.py (404 bytes) - added by Eren Türkay <turkay.eren@…> 8 years ago.
test-case

Download all attachments as: .zip

Change History (2)

Changed 8 years ago by Eren Türkay <turkay.eren@…>

test-case

comment:1 Changed 8 years ago by SmileyChris

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

The clean_* methods are called after the field's own clean method so you're getting it too late. You'd have to subclass URLField to do what you want to do.

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