Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fields custom getters and setters #26

Open
rmk135 opened this issue Jan 31, 2016 · 1 comment
Open

Fields custom getters and setters #26

rmk135 opened this issue Jan 31, 2016 · 1 comment
Assignees
Labels
Milestone

Comments

@rmk135
Copy link
Member

rmk135 commented Jan 31, 2016

The idea is to create functionality for specification of custom getters and setters for domain model fields.

class Profile(models.DomainModel):

    id = fields.Int()
    open_id = fields.Int()

    @open_id.getter
    def _get_oid(self):
        return self.id >> 8 

    @open_id.setter
    def _set_oid(self, value):
        self.id = value << 8

Notes:

  • If custom getter / setter is specified, it completely replaces field's getter / setter logic.
@rmk135 rmk135 added the feature label Jan 31, 2016
@rmk135 rmk135 added this to the Beta milestone Jan 31, 2016
@boonya
Copy link
Member

boonya commented Oct 25, 2016

As we have contextual views now, is this task actual then? What do you think, @rmk135 ?

@boonya boonya self-assigned this Nov 13, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants