# Proposal: To have db\_default considered in model forms

**URL:** <https://forum.djangoproject.com/t/proposal-to-have-db-default-considered-in-model-forms/33358>\
**Category:** Django Internals\
**Created:** [July 28, 2024, 3:03pm UTC](https://forum.djangoproject.com/t/proposal-to-have-db-default-considered-in-model-forms/33358 "2024-07-28T15:03:01Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![shangxiao](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/shangxiao/32/10313_2.png) [@shangxiao](https://forum.djangoproject.com/u/shangxiao)\
**Post date:** [August 1, 2024, 12:59pm UTC](https://forum.djangoproject.com/t/proposal-to-have-db-default-considered-in-model-forms/33358/6 "2024-08-01T12:59:15Z")

</div>

Actually one thing I just thought of RE point 1:

You could set it up so that if declared `db_default` is a Python literal (or any Python expression/non-db-expression that evaluates to something that could be passed to Value) - use that for the form’s default; otherwise if it’s an expression, ignore setting the default.

I think checking if an expression is a `Value` instance is too unreliable?

🤔

---

_[View the full topic](https://forum.djangoproject.com/t/proposal-to-have-db-default-considered-in-model-forms/33358)._
