Wednesday, October 19, 2022

[FIXED] How I can create a textfield in dajngo admin that not create a field in database?

Issue

In django, I need a textfield and a button in django admin, but I don't want to save that textfield in database. For example I have a textfield named age. I need to a textfield to enter birthday.By clicking on button I will calculate age and assign to age field. This is only a example!


Solution

Possible by using custom ModelAdmin with a custom Form but this can be done automatically while saving the object

here is Custom ModelAdmim Form



Answered By - Mohamed ElKalioby
Answer Checked By - Marie Seifert (PHPFixing Admin)

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.