def make_form(app, global_conf, realm, authfunc, **kw):
 from paste.util.import_string import eval_import
 import types
 authfunc = eval_import(authfunc)
 assert isinstance(authfunc, types.FunctionType), 'authfunc must resolve to a function'
 template = kw.get('template')
 if (template is not None):
  template = eval_import(template)
  assert isinstance(template, str), 'template must resolve to a string'
 return AuthFormHandler(app, authfunc, template)

def make_form ( app , global_conf , realm , authfunc , ** kw ) : from paste . util . import_string import eval_import import types authfunc = eval_import ( authfunc ) assert isinstance ( authfunc , types . FunctionType ) , 'authfunc must resolve to a function' template = kw . get ( 'template' ) if ( template is not None ) : template = eval_import ( template ) assert isinstance ( template , str ) , 'template must resolve to a string' return AuthFormHandler ( app , authfunc , template )
grant access via form authentication config looks like this:: [filter:grant] use = egg:paste#auth_form realm=myrealm authfunc=somepackage .