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

All Samples(99)  |  Call(84)  |  Derive(0)  |  Import(15)

src/p/t/ptahcrowd-HEAD/ptahcrowd/const.py   ptahcrowd(Download)
'''
 
from ptahcrowd.settings import _
 
 
CASE_DESCR = _("This is not case sensitive.")
CASE_WARN = _("Case sensitive. Make sure the Caps Lock key is off.")
LOGIN_TITLE = _("Login")
LOGIN_DESCR = _("Your email address or user name.")

src/p/t/ptahcrowd-0.2/ptahcrowd/const.py   ptahcrowd(Download)
'''
 
from ptahcrowd.settings import _
 
 
CASE_DESCR = _("This is not case sensitive.")
CASE_WARN = _("Case sensitive. Make sure the Caps Lock key is off.")
LOGIN_TITLE = _("Email")
LOGIN_DESCR = _("This is what you will use to log in. "

src/p/t/ptahcrowd-HEAD/ptahcrowd/validation.py   ptahcrowd(Download)
import ptah
from ptahcrowd.settings import CFG_ID_CROWD
from ptahcrowd.settings import _
 
TOKEN_TYPE = ptah.token.TokenType(
def validationAndSuspendedChecker(info):
    principal = info.principal
 
    if principal.suspended:
        info.message = _('Account is suspended.')
        return True
 
    info.message = _('Account is not validated.')
    info.arguments['validation'] = False
    return False
class ValidationTemplate(ptah.mail.MailTemplate):
 
    subject = _('Activate Your Account')
    template = 'ptahcrowd:templates/validate_email.txt'
 
            user.validated = True
            ptah.token.service.remove(t)
            request.add_message(_("Account has been successfully validated."))
 
            request.registry.notify(ptah.events.PrincipalValidatedEvent(user))

src/p/t/ptahcrowd-HEAD/ptahcrowd/views.py   ptahcrowd(Download)
import ptah
import ptahcrowd
from ptahcrowd.settings import _
from ptahcrowd.module import CrowdModule
from ptahcrowd.provider import CrowdUser, CrowdGroup
        pform.TextField(
            'term',
            title=_('Search term'),
            description=_('Ptah searches users by login and email'),
            missing='',
                .update({'suspended': False}, False)
            self.request.add_message(
                _("The selected accounts have been activated."),'info')
 
        if 'suspend' in request.POST and uids:
            Session.query(CrowdUser).filter(
                CrowdUser.id.in_(uids)).update({'suspended': True}, False)
            self.request.add_message(
                _("The selected accounts have been suspended."),'info')

src/p/t/ptahcrowd-0.2/ptahcrowd/views.py   ptahcrowd(Download)
import ptah
import ptahcrowd
from ptahcrowd.settings import _
from ptahcrowd.module import CrowdModule
from ptahcrowd.provider import CrowdUser, CrowdGroup
        pform.TextField(
            'term',
            title=_('Search term'),
            description=_('Ptah searches users by login and email'),
            missing='',
                .update({'suspended': False}, False)
            self.request.add_message(
                _("The selected accounts have been activated."),'info')
 
        if 'suspend' in request.POST and uids:
            Session.query(CrowdUser).filter(
                CrowdUser.id.in_(uids)).update({'suspended': True}, False)
            self.request.add_message(
                _("The selected accounts have been suspended."),'info')

src/p/t/ptahcrowd-0.2/ptahcrowd/login.py   ptahcrowd(Download)
import ptahcrowd
from ptahcrowd import const
from ptahcrowd.settings import _, CFG_ID_CROWD
 
 
class LoginForm(pform.Form, ptah.View):
    """ Login form """
 
    id = 'login-form'
    title = _('Login')

src/p/t/ptahcrowd-HEAD/ptahcrowd/login.py   ptahcrowd(Download)
import ptahcrowd
from ptahcrowd import const
from ptahcrowd.settings import _, CFG_ID_CROWD
 
 
class LoginForm(pform.Form, ptah.View):
    """ Login form """
 
    id = 'login-form'
    title = _('Login')

src/p/t/ptahcrowd-0.2/ptahcrowd/registration.py   ptahcrowd(Download)
 
from ptahcrowd.provider import get_user_type
from ptahcrowd.settings import _, CFG_ID_CROWD
from ptahcrowd.schemas import RegistrationSchema
from ptahcrowd.validation import initiate_email_validation
class Registration(pform.Form):
    """ Ptah crowd registration form """
 
    label = _("Registration")
    fields = pform.Fieldset(RegistrationSchema, PasswordSchema)

src/p/t/ptahcrowd-0.2/ptahcrowd/user.py   ptahcrowd(Download)
import ptahcrowd
from ptahcrowd import const
from ptahcrowd.settings import _
from ptahcrowd.module import CrowdModule
from ptahcrowd.provider import CrowdUser, CrowdGroup
class CreateUserForm(pform.Form):
 
    csrf = True
    label = _('Create new user')
    fields = UserSchema
        pform.fields.MultiChoiceField(
            'roles',
            title=_('Roles'),
            description=_("Choose user default roles."),
            missing=(),
        pform.fields.MultiChoiceField(
            'groups',
            title=_("Groups"),
            description=_("Choose user groups."),
            missing=(),

src/p/t/ptahcrowd-HEAD/ptahcrowd/registration.py   ptahcrowd(Download)
 
from ptahcrowd.provider import get_user_type
from ptahcrowd.settings import _, CFG_ID_CROWD
from ptahcrowd.schemas import RegistrationSchema
from ptahcrowd.validation import initiate_email_validation
class Registration(pform.Form):
    """ Ptah crowd registration form """
 
    label = _("Registration")
    fields = pform.Fieldset(RegistrationSchema, PasswordSchema)

  1 | 2  Next