prom icon indicating copy to clipboard operation
prom copied to clipboard

add Field db=False flag

Open Jaymon opened this issue 10 years ago • 2 comments

this will cause a a field that is passed into __init__() or modify() to be set into the class instance, but not persisted to the db. That way it can go through all the normal Field validation stuff like the normalize method if needs be, but it ultimately won't be a field in the db.

Jaymon avatar Nov 24 '15 02:11 Jaymon

I'm not sure this is the solution I would want to implement for this problem. It would involve a lot of refactoring since everything expects Field instances to be db fields and I'm not sure it's worth the hassle for something I don't that often and when I do do it I can usually solve it a different way

Jaymon avatar Mar 22 '23 23:03 Jaymon

I had this open in a note:

prom.config.Property - a field that doesn't get saved into the db

This would give a property full access to all the lifecycle methods so you could say pass in a value and then have that value set a different value that will get saved into the db, things like that.

Jaymon avatar Oct 16 '24 06:10 Jaymon