﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
30337	Django Admin - Migrations: default value for models.DateTime() with auto_add_now=True	Jilles Soeters	nobody	"Hello everyone,

In a personal project I created a model, populated the database and later realised that I needed a `created` field on it. So I added models.DateTime() with auto_add_now=True. When running the migrations I got this prompt:

```
You are trying to add the field 'created' with 'auto_now_add=True' to squad without a default; the database needs something to populate existing rows.

 1) Provide a one-off default now (will be set on all existing rows)
 2) Quit, and let me add a default in models.py
Select an option: 1
Please enter the default value now, as valid Python
You can accept the default 'timezone.now' by pressing 'Enter' or you can provide another value.
The datetime and django.utils.timezone modules are available, so you can do e.g. timezone.now
Type 'exit' to exit this prompt
[default: timezone.now] >>>
You are trying to add the field 'created' with 'auto_now_add=True' to squadapplication without a default; the database needs something to populate existing rows.
// Now I had to run it again and do timezone.now() myself
```

I believe that the default should be `timezone.now()` (invoking the function). When the default is `timezone.now` - without invoking it - it will actually not work and not throw an error.

Is this a know bug or a feature? If it's a bug I'd like to contribute myself to fix it :) "	Uncategorized	closed	Migrations	dev	Normal	worksforme			Unreviewed	0	0	0	0	0	0
