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

Remove grok #962

Merged
merged 4 commits into from Feb 21, 2018
Merged

Remove grok #962

merged 4 commits into from Feb 21, 2018

Conversation

tulikavijay
Copy link

Fixes: #936

Changes proposed in this pull request:

These files were changed to remove grok

https://docs.plone.org/develop/addons/schema-driven-forms/customising-form-behaviour/vocabularies.html
https://docs.plone.org/develop/plone/forms/vocabularies.html

Comment :

class MyForm(form.SchemaForm):
        """ Define Form handling

        This form can be accessed as http://yoursite/@@my-form

        """
        grok.name('my-form')
        grok.require('zope2.View')
        grok.context(ISiteRoot)

        schema = IMyForm
        ignoreContext = True

        @button.buttonAndHandler(u'Ok')

I was looking at the code, how do i convert this part?

Copy link
Sponsor Member

@jensens jensens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

overall LGTM, except the import should be one per line

from plone.supermodel import model
from plone.directives import form

from zope.component import queryUtility
from zope.component import queryUtility,provider
Copy link
Sponsor Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

may you put the 2 imports on 2 lines please?

from five import grok
from zope.schema.interfaces import IContextSourceBinder
from zope.component import provider
from zope.schema.interfaces import IContextSourceBinder,implementer
Copy link
Sponsor Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

@jensens jensens merged commit 4bf4e78 into plone:5.1 Feb 21, 2018
@jensens
Copy link
Sponsor Member

jensens commented Feb 21, 2018

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants