Hi folks,

My name is Renato, 21, currently studying Biomedical Informatics at
the University of São Paulo, Brazil. I'm submitting in the next week
my proposal to GSoC, to create a denormalized model field, like
discussed in 
http://groups.google.com/group/django-developers/browse_thread/thread/9a672d5bbbe67562/39c7663e9efdc204.

My idea is to create only *one generic field*,  called
"DenormalizedField", using this syntax:

class Order(models.Model):
        ...
        n_items = DenormalizedField(signal_from='itemorder',
qs=self.itemorder_set.count())
        total_price = DenormalizedField(signal_from='itemorder',
qs=self.itemorder_set.sum('item_price'))


And we could use the same way to mirror a field, something like:
class Order(models.Model):
        customer = models.ForeignKey(Customer)
        customer_name = models.DenormalizedField(signal_from='customer',
qs=self.customer.name)
        ...

And again:
class Article(models.Model):
        text = models.TextField()
        text_rendered = models.DenormalizedField(signal_from='self',
qs=self.text.render())

- I don't know wheter the param name 'qs' would be right for these
situations.

If possible, I'd like some feedback before submitting it.

Thank you all :)

Renato

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to