Even simple comparisons can be difficult to simulate in Python. As an example, some databases treat empty strings as null. Still, autogenerating the Python side of simple computations is an interesting idea. At least worth a try.
There are some hard problems if trying to push all computations to the db. First problem is that this won't work for unsaved models. Second, if the value isn't fetched on initial select, the database values might change. This is almoust the same problem as when changing values on Python side. Finally, accessing the db just to do a simple computation isn't a good from performance perspective. For using Python in the DB, on PostgreSQL Python isn't available in hosted environments as Python can access the db machine. I'd take a look on what it requires to implement this feature as 3rd party addition, and then do the required changes to core. - Anssi -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/django-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/ed9c5893-44a9-4fda-bd97-1ff409de69c6%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
