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

Allow [sg]et_registry_record to get an optional interface #269

Closed
gforcada opened this issue Aug 16, 2015 · 2 comments
Closed

Allow [sg]et_registry_record to get an optional interface #269

gforcada opened this issue Aug 16, 2015 · 2 comments

Comments

@gforcada
Copy link
Sponsor Member

I add my records to the registry via a Interface, then to retrieve them back I use:

registry = getUtility(IRegistry)
records = registry.forInterface(IMyInterface)
records.my_register_record = 'something'

It would be great if plone.api allows me to do the same:

get_registry_record('my_register_record', interface=IMyInterface)

Sounds good/desirable? Wording of course up to debate :-)

@hvelarde
Copy link
Member

+1 awesome!

@gforcada gforcada changed the title Allow get_registry_record to get an optional interface Allow [sg]et_registry_record to get an optional interface Aug 19, 2015
@jochumdev
Copy link

+1, its very nice to expose registry settings on a view.

adamcheasley pushed a commit to plone/buildout.coredev that referenced this issue Nov 30, 2015
Branch: refs/heads/master
Date: 2015-11-26T16:46:53+01:00
Author: Gil Forcada (gforcada) <gforcada@gnome.org>
Commit: plone/plone.api@9a06aae

Allow to set/get registry settings from an interface

Fixes:
plone/plone.api#269

Files changed:
M docs/CHANGES.rst
M docs/portal.rst
M src/plone/api/portal.py
M src/plone/api/tests/test_portal.py
Repository: plone.api
Branch: refs/heads/master
Date: 2015-11-30T10:06:18Z
Author: Adam Forsythe-Cheasley (adamcheasley) <adam@netsight.co.uk>
Commit: plone/plone.api@8cc89d4

Merge pull request #286 from plone/registry-interface-269

Allow to set/get registry settings from an interface

Files changed:
M docs/CHANGES.rst
M docs/portal.rst
M src/plone/api/portal.py
M src/plone/api/tests/test_portal.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants