Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(21)  |  Call(18)  |  Derive(0)  |  Import(3)

src/p/r/Products.openstudy-1.1/Products/openstudy/portlets/openstudy.py   Products.openstudy(Download)
from plone.portlets.interfaces import IPortletAssignmentMapping
from plone.app.portlets.portlets import base
from Products.openstudy import OpenstudyMessageFactory as _
from Products.Five.browser.pagetemplatefile import ViewPageTemplateFile
from urllib import quote
class IOpenStudyPortlet(IPortletDataProvider):
    """ A portlet for OpenStudy integration """
 
    studyGroupId = schema.TextLine(
        title = _(u'label_studygroup_id', default=u'Study Group ID'),
        description = _(u'help_studygroup_id', 
    def title(self):
        return _(u'Open Study Portlet')
 
    def __init__(self, studyGroupId=''):
        self.studyGroupId = studyGroupId    
class AddForm(base.AddForm):
    """ Add a study group. """
 
    form_fields = form.Fields(IOpenStudyPortlet)
    label = _(u'Add Study Group')

src/p/r/Products.openstudy-1.1/Products/openstudy/browser/controlpanel.py   Products.openstudy(Download)
from Products.CMFCore.interfaces import IPropertiesTool
from plone.app.controlpanel.form import ControlPanelForm
from Products.openstudy import OpenstudyMessageFactory as _
 
 
class IOpenStudyControlPanelSchema(Interface):
    """ Schema for Openstudy Control Panel """
 
    apiurl = TextLine(title=_(u'label_openstudy_apiurl', default=u'API URL'),
                      description=_(u'label_help_openstudy_apiurl',
class OpenStudyControlPanel(ControlPanelForm):
    """ OpenStudy control panel """
 
    form_fields = FormFields(IOpenStudyControlPanelSchema)
    label = _(u'OpenStudy Settings')
    description =_(u'Get and set options for configuring OpenStudy study groups.')

src/p/r/Products.openstudy-1.1/Products/openstudy/browser/studygroup.py   Products.openstudy(Download)
from Products.CMFCore.interfaces import IPropertiesTool
from Products.CMFPlone import PloneMessageFactory
from Products.openstudy import OpenstudyMessageFactory as _
from urllib2 import urlopen
try:
class IStudyGroupsForm(Interface):
    """ Form for managing study groups. """
 
    studygroup = Choice(title=_(u'Study Group'),
                        description=_(u'The OpenStudy group to associate with.'),
class ManageStudyGroupsEditForm(EditForm):
    """ Manage study groups """
 
    form_fields = FormFields(IStudyGroupsForm)
    label = _(u'OpenStudy Study Groups')
    description = _(u'Associate content with a study group.')