{"issue":{"created_at":"2011-11-18T19:36:52Z","state":"open","updated_at":"2011-11-20T11:59:32Z","comments":1,"user":{"gravatar_id":"68c48a99ec334bd0a1ebe3cd10b39915","id":155623,"url":"https://api.github.com/users/alanjds","login":"alanjds","avatar_url":"https://secure.gravatar.com/avatar/68c48a99ec334bd0a1ebe3cd10b39915?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"body":"Hi. Is that hard to change @denormalized decorator to allow this?\r\n\r\n``` python\r\nclass SomeModel(models.Model):\r\n    # the other fields\r\n\r\n    @denormalized(models.CharField,max_length=100)\r\n    def some_computation(self):\r\n        # your code\r\n        return some_value\r\n\r\n    @some_computation.setter\r\n    def some_computation(self, new_value):\r\n        # your code which let self.some_computation == new_value after the denormalization cleanup\r\n        assert self.some_computation == new_value\r\n        return\r\n```\r\n\r\nIf this can be done, than it will really replace @property, as @property.deleter makes almost no sense for a Django field","assignee":null,"id":2283717,"number":14,"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"labels":[],"title":"Can the @denormalized become a true replacement for @property including property.setter ?","closed_at":null,"html_url":"https://github.com/initcrash/django-denorm/issues/14","milestone":null,"url":"https://api.github.com/repos/initcrash/django-denorm/issues/14"},"action":"created","comment":{"created_at":"2011-11-20T11:59:32Z","updated_at":"2011-11-20T11:59:32Z","user":{"gravatar_id":"a462ed291599912581a7638f6f3228f5","id":15813,"url":"https://api.github.com/users/initcrash","login":"initcrash","avatar_url":"https://secure.gravatar.com/avatar/a462ed291599912581a7638f6f3228f5?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"body":"On Fri, Nov 18, 2011 at 8:36 PM, Alan Justino da Silva\r\n<reply@reply.github.com>\r\nwrote:\r\n> Hi. Is that hard to change @denormalized decorator to allow this?\r\n>\r\n> ``` python\r\n> class SomeModel(models.Model):\r\n>    # the other fields\r\n>\r\n>    @denormalized(models.CharField,max_length=100)\r\n>    def some_computation(self):\r\n>        # your code\r\n>        return some_value\r\n>\r\n>    @some_computation.setter\r\n>    def some_computation(self, new_value):\r\n>        # your code which let self.some_computation == new_value after the denormalization cleanup\r\n>        assert self.some_computation == new_value\r\n>        return\r\n> ```\r\n>\r\n> If this can be done, than it will really replace @property, as @property.deleter makes almost no sense for a Django field\r\n>\r\n\r\ni don't really understand. what is the use case for this?\r\ni think setting the denormalized field to a value by hand kind of\r\ndefeats it's purpose.","id":2803573,"url":"https://api.github.com/repos/initcrash/django-denorm/issues/comments/2803573"}}