Opened 8 years ago

Closed 8 years ago

#27185 closed Bug (duplicate)

Can not change value in DateTimeField in Admin when default is set

Reported by: Nikolay Owned by: nobody
Component: contrib.admin Version: 1.10
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


In our project I have model like with set "default":

from django.db import models
from django.utils import timezone

class DateModel(models.Model):
    dt = models.DateTimeField(
    date = models.DateField(
    tm = models.TimeField(

In admin interface on model page I edit values in all fields and then press "Save" or "Save or continue editing". Changes to DateTime field are not saved to database. Values in DateField and TimeField are saved.

This bug appeared in Django 1.10.1. In Django 1.10 all values were saved.

There is demo project demonstrating this behaviour in attachment (requires "Django==1.10.1" only).

Attachments (1) (5.8 KB ) - added by Nikolay 8 years ago.

Download all attachments as: .zip

Change History (2)

by Nikolay, 8 years ago

Attachment: added

comment:1 by Tim Graham, 8 years ago

Resolution: duplicate
Status: newclosed

Duplicate of #27186

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