Opened 17 years ago
Last modified 14 years ago
#7880 closed
DateField dont work with choices — at Version 4
| Reported by: | Camilo Nova | Owned by: | nobody |
|---|---|---|---|
| Component: | contrib.admin | Version: | dev |
| Severity: | Keywords: | ||
| Cc: | Triage Stage: | Accepted | |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description (last modified by )
The admin interface doesnt show the choices for the 'Fecha' field
I have a model like this one:
It works before the newforms-admin branch update, but after i did the update it in the admin interface the choices doesnt work, i try to change to CharField, and it works rigth, but when i back to DateField it wont work anymore.
>>svn info Path: . URL: http://code.djangoproject.com/svn/django/trunk Repository Root: http://code.djangoproject.com/svn Repository UUID: bcc190cf-cafb-0310-a4f2-bffc1f526a37 Revision: 8035 Node Kind: directory Schedule: normal Last Changed Author: jacob Last Changed Rev: 8035 Last Changed Date: 2008-07-21 20:15:43 -0500 (Mon, 21 Jul 2008)
Change History (4)
comment:1 by , 17 years ago
comment:2 by , 17 years ago
| Triage Stage: | Unreviewed → Accepted |
|---|
comment:3 by , 17 years ago
My first suggestion was breakage by r7977 (optgroup support) which is not the case. Breakage occours since the NFA-Merge.
comment:4 by , 17 years ago
| Description: | modified (diff) |
|---|
Note:
See TracTickets
for help on using tickets.
To make it more lasting I post the Model from the dpaste:
class Cuota(models.Model): FECHAS = ( (datetime.date(*time.strptime('2008-06-01', '%Y-%m-%d')[:3]), 'Junio 2008'), # ('2008-06-01', 'Junio 2008'), # ('2008-07-01', 'Julio 2008'), # ('2008-08-01', 'Agosto 2008'), # ('2008-09-01', 'Septiembre 2008'), # ('2008-10-01', 'Octubre 2008'), # ('2008-11-01', 'Noviembre 2008'), # ('2008-12-01', 'Diciembre 2008'), ) valor = models.PositiveIntegerField() fecha = models.DateField(choices=FECHAS, unique=True) def __unicode__(self): return u"%s" % (self.fecha) admin.site.register(Cuota)