Package cubicweb :: Package devtools :: Module cwtwill
[hide private]
[frames] | no frames]

Module cwtwill

source code

cubicweb extensions for twill

Functions [hide private]
 
has_link(text, url='') source code
 
view(rql, vid='')
>> view 'Project P'
source code
 
create(etype)
>> create Project
source code
 
edit(rql)
>> edit "Project P WHERE P eid 123"
source code
 
setvalue(formname, fieldname, value)
>> setvalue entityForm name pylint
source code
 
submitform(formname, submit_button=None)
>> submitform entityForm
source code
Variables [hide private]
  has_text = twc.find
  hasnt_text = twc.notfind
  _LINK = re.compile('<a.*?href="(.*?)".*?>(.*?)</a>', re.I | re.S)
Function Details [hide private]

view(rql, vid='')

source code 

>> view 'Project P'

apply <vid> to <rql>'s rset

create(etype)

source code 

>> create Project

go to <etype>'s creation page

edit(rql)

source code 

>> edit "Project P WHERE P eid 123"

calls edition view for <rql>

setvalue(formname, fieldname, value)

source code 

>> setvalue entityForm name pylint

sets the field's value in the form <forname> should either be the form's index, the form's name or the form's id

submitform(formname, submit_button=None)

source code 

>> submitform entityForm

Submit the form named entityForm. This is useful when the form is pre-filed and we only want to click on submit. (The original submit command chooses the form to submit according to the last formvalue instruction)