0

I am using Django 2.1, and I modified one of my models (added one more field). I did the migrations, everything went well. I can see (in my database) that the field has been added.

Now if I open the admin interface, go to the modified table / entity, it does now show the newly added field.

What am I missing?

This question has been asked in 2011 on SO here, but there is no answer that would solve my problem.

3
  • What type of field did you add? Commented Sep 14, 2018 at 16:30
  • It is a models.DateTimeField
    – Ugur
    Commented Sep 14, 2018 at 16:32
  • did you use auto_now or auto_now_add ? Commented Sep 14, 2018 at 16:35

1 Answer 1

1

If you use auto_now_add in your field then it won't be added to your admin page.

Link to the doc

1
  • As mentioned in docs, you can't really change it. And if you really need to change it then probably it's not a good idea to use this option since the purpose of this option is the opposite of what you need. Commented Sep 14, 2018 at 16:47

Not the answer you're looking for? Browse other questions tagged or ask your own question.