Django model fields getter / setter
Posted
by pistacchio
on Stack Overflow
See other posts from Stack Overflow
or by pistacchio
Published on 2010-05-24T17:02:01Z
Indexed on
2010/05/24
17:11 UTC
Read the original article
Hit count: 309
django
|django-models
Hi,
is there something like getters and setters for django model's fields?
For example, I have a text field in which i need to make a string replace before it get saved (in the admin panel, for both insert and update operations) and make another, different replace each time it is read. Those string replace are dynamic and need to be done at the moment of saving and reading.
As I'm using python 2.5, I cannot use python 2.6 getters / setters.
Any help?
© Stack Overflow or respective owner