Friday, January 30, 2015

Custom model field and custom widget


I need to create a custom django model field, a varchar(10) field which has a calculated value set on save on the model using it and then never changed. This should happen automatically. This field should appear as hidden or read-only in forms and it would be nice to handle the render output if the field is accessed in templates. The calculated value generated on save must access the database and look into a seperate table to calculate its value, ie. I need to control the generation of the value it gets.

Any ideas or hints?

You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
Visit this group at
To view this discussion on the web visit
For more options, visit

No comments:

Post a Comment