I am pretty new to Django. I would like to know how to declare the value of a models field.
For example, if was making a model for pictures frames, I could choose from the selection of small, medium, or large. Then, it would automatically populate the values for length and width to be 5 and 7 for small, 8 and 10 for medium and so on.
I’m assuming you still have to make the field length and width be integer fields. But I don’t know how to set the value after that.
Aucun commentaire:
Enregistrer un commentaire