routes.py is the way to do it
it's a standard file of web2py
On 16 juin, 20:36, Michelle Jun wrote:
> hi
>
> i am wondering if i can do these things
>
> for example, i have list of businesses url links (this is generated
> from my web2py default)
>
> http://domain.com/default/business/8http://dom
Is it possible to do checkbox with constraints?? For example,
consider following
db.define_table('children', Field('name'), Field('sex'))
db.children.insert('Tom', 'M')
db.children.insert('Jerry', 'M')
db.children.insert('Eve', 'F')
db.children.insert('Mary', 'F')
is it possible to create FORM
CheckboxesWidget can arrange check boxes horizontally.
you can specify the colum number by 'cols'
Try this:
db.define_table('test',
Field('children'))
db.test.children.requires =
IS_IN_SET(['boy1','girl1','boy2','girl2','boy3','girl3','boy4','girl4'])
def horizontal_checkbox(f,v):
On 14 juin, 08:11, mdipierro wrote:
> It depends. If you want to import any NORMAL python module, put it in
> site packages and import it using normal python syntax.
>
> If you want to import "web2py modules", i.e. modules that belong to a
> specific application only, then you have to follow the r
Try this:
db.define_table('test',
Field('answer',default='Maybe'))
db.test.answer.requires = IS_IN_SET(['Yes','No','Maybe'])
def horizontal_radios(f,v):
table = SQLFORM.widgets.radio.widget(f,v)
rows = table.elements('tr')
table.components = []
table.append([row.elem
Try this:
db.reg_registry.registry_id.requires =
IS_IN_DB(db,'reg_registry.registry_id',lambda row: '%s-%s-%s' %
(row.num_part1.rstrip(),row.num_part2.rstrip(),
row.num_part3.rstrip()) )
'%(num_part1)s-%(num_part2)s-%(num_p art3)s'
On Jun 16, 12:33 pm, Jean-Guy wrote:
> Hello,
>
> I use %()s in a
hi
i am wondering if i can do these things
for example, i have list of businesses url links (this is generated
from my web2py default)
http://domain.com/default/business/8
http://domain.com/default/business/9
http://domain.com/default/business/10
http://domain.com/default/business/11
http://doma
Hi everybody!
I'm wondering if is someone using mootools with web2py. If yes, could you
report your experiences?
For what I understood:
· Web2py welcome applications uses jquery.
· Any js library could be used with web2py.
· web2py_ajax.html is connecting some response.* at the controllers with
j
Thanks for your help, mdiperro and Yarko (thanks for the investigation
of the code :) ).
Circular refererences aren't what I'm attempting at all (obviously
that can't work).
Instead, those fields would be left nullable and filled in later, for
the most part.
Example: an already created Person ob
I found the answer to this question accidentially. The highlighting
failure disappears if you write the inner string with single quotes
('mstree').
Marc
On 14 jun, 23:18, Meteormarc wrote:
> In the controller, when I have a multiline string with a pound (#)
> character in it, the syntax highligh
Hello,
I use %()s in a IS_IN_DB validator like this :
db.reg_registry.registry_id.requires =
IS_IN_DB(db,'reg_registry.registry_id','%(num_part1)s-%(num_part2)s-%(num_part3)s')
return
num_part1 -num_part2 -num_part3
My problem is that %()s seems to add whitespace at the end of the string
w
Massimo,
Many, many thanks for adding formstyle functions in 179.1. You've
provided a solution for the one aspect of SQLFORM that has given me
the most headaches in trying to customize the presentation of form
items, namely that the composition of the items in the field rows are
determined in SQL
ok, it worked and after one browser refresh it stoped working. How
could I show you that it worked somehow??
On Jun 16, 1:18 pm, greenpoise wrote:
> Oops my bad. This one
>
> desde=datetime.datetime(request.now.year,request.now.month,request.now.day)
> hasta=desde+datetime.timedelta(days=10
Oops my bad. This one
desde=datetime.datetime(request.now.year,request.now.month,request.now.day)
hasta=desde+datetime.timedelta(days=10)
form=FORM (H1(TABLE
(TR(('From:',INPUT(_name="desde",_class='date',_value=desde,_id="desde",requires=IS_DATE())),
('To:',INPUT(_name="hasta",_class='d
I dont know how this could be different but this one did worked:
desde=request.now
hasta=request.now
desde=datetime.datetime(request.now.year,request.now.month,request.now.day)
hasta=desde+datetime.timedelta(days=10)
form=FORM (H1(TABLE
(TR(('From:',INPUT(_name="desde",_class='
V Utorok, 15. jún 2010 o 15:51 -0700, Yarko Tymciurak napísal(a):
> I think the simpler solution (simpler than routes.py) is - when
> deploying, link your app to applicaitons/init --- it is simple, it
> will behave as you want, and the only "operating system" that I can
> think of that doesn't have
1.79.2 not 1.19.2 (in the first mail)
On 16 juin, 13:01, KR wrote:
> Hi,
>
> I have the same problem as in that thread : Submenus and IE6
> (http://groups.google.be/group/web2py/browse_thread/thread/5b80149ee6c...
> )
>
> To make sure that I didn't messed all up, I installed a fresh new
> 1.19.2
Hi again,
I just installed web2py 1.75.5 (according to the VERSION file, I
downloaded the 1.75.4: http://web2py.com/examples/static/1.75.4/web2py_src.zip)
and it works.
According to the changelog, the bug was fixed on the 1.75.1 and I
downloaded the first version available after that one to check
Hello!
I wonder if somebody could help me.
Can I chain somehow the onaccept functions or specify more functions
on onaccept?
I need crud.archive and I need some custom computing if the crud form
is accepted like storing additional files, populate another table data
from accepted form fields auto
I find myself mostly defaulting to custom forms for anything that an
end user sees. For internal app admin stuff, I am usually happy with
whatever web2py produces automatically.
On Jun 16, 10:53 am, Johann Spies wrote:
> On 16 June 2010 16:44, weheh wrote:
>
> > Find out the id or class of the r
On 16 June 2010 16:44, weheh wrote:
> Find out the id or class of the radio buttons. Use firebug to see, or
> look at the "CSS Conventions" section of the doc. You may need to
> resort to a custom form, but I doubt it. Then set the css attribute:
> display: inline; should probably do it. You may n
Find out the id or class of the radio buttons. Use firebug to see, or
look at the "CSS Conventions" section of the doc. You may need to
resort to a custom form, but I doubt it. Then set the css attribute:
display: inline; should probably do it. You may need to float the
first one ... not sure about
I will try this. How about how to open the upload file during
validation (see my previous post)?
On Jun 16, 2:58 am, mdipierro wrote:
> Try this:
>
> file_form=SQLFORM.factory(db.auth_user,db.othertable,db.srcfile)
> ...
> if FORM.accepts(file_form,request.vars,formname='file_form'): # no
> uploa
How do I get radio buttons (and check boxes) to show up horizontally
in stead of vertically?
e.g.
Yes {}No {}
in stead of
Yes {}
No {}
Regards
Johann
--
"Finally, brethren, whatsoever things are true, whatsoever things are
honest, whatsoever things are just, whatsoever things are pu
You might try this one too:
http://web2pyslices.com/main/slices/take_slice/8
On Jun 16, 5:01 am, David Mitchell wrote:
> Thanks GoldenTiger,
>
> Looks likehttp://www.web2pyslices.com/main/slices/take_slice/85addresses
> my 1st requirement,
> andhttp://www.web2pyslices.com/main/slices/take_slice/
See above, post #5.
On Jun 15, 11:42 pm, mdipierro wrote:
> No. the error you reported was with postgresql 8.1. What is the
> problem with sqlite?
Hi,
I have the same problem as in that thread : Submenus and IE6 (
http://groups.google.be/group/web2py/browse_thread/thread/5b80149ee6cb508b/61fd3cb44109803e
)
To make sure that I didn't messed all up, I installed a fresh new
1.19.2 web2py and I tried on the welcome/default/index page. On my
win
Thanks GoldenTiger,
Looks like http://www.web2pyslices.com/main/slices/take_slice/85 addresses
my 1st requirement, and
http://www.web2pyslices.com/main/slices/take_slice/86 addresses my 2nd
requirement. Still looking for solutions to the other two, but these get me
off to a flying start!
Regards
28 matches
Mail list logo