Opened 19 years ago
Closed 18 years ago
#3557 closed (fixed)
SlugField not correctly autopopulated / has no max_length
| Reported by: | Owned by: | Adrian Holovaty | |
|---|---|---|---|
| Component: | Forms | Version: | newforms-admin |
| Severity: | Keywords: | newforms newforms-admin slugfield | |
| Cc: | Triage Stage: | Accepted | |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
The SlugField returns a forms.CharField, but does not set the max_length attribute.
That means that in newforms-admin auto-population of the field doesn't work. As well as many other Bad Things.
I think that subclassing the CharField is the way to go here. If not, the alternative method (copy-paste bits out of the CharField class) is also a trivial patch.
Attachments (2)
Change History (7)
by , 19 years ago
| Attachment: | slugfield.patch added |
|---|
comment:1 by , 19 years ago
| Component: | Uncategorized → django.newforms |
|---|---|
| Owner: | changed from to |
| Triage Stage: | Unreviewed → Accepted |
by , 19 years ago
| Attachment: | slugfield.2.patch added |
|---|
Patch to fix SlugField in newforms. Incl new tests.
comment:2 by , 19 years ago
| Keywords: | newforms added |
|---|---|
| Version: | newforms branch → SVN |
comment:3 by , 18 years ago
Just as a point of reference it looks like r6056 in newforms-admin solved this. Once that branch gets merged in this ticket can be closed.
comment:4 by , 18 years ago
| Version: | SVN → newforms-admin |
|---|
This should not be closed without the regression tests being committed.
comment:5 by , 18 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
Patch to fix SlugField in newforms