, Warren Block wrote:
And it's only just now I realize that "months" is a set, not a list.
Changing it to ['January', ...] solves the order.
I'm still curious why add_button does not work with a simple FORM(),
though.
On Wed, 25 Sep 2013, Warren
And it's only just now I realize that "months" is a set, not a list.
Changing it to ['January', ...] solves the order.
I'm still curious why add_button does not work with a simple FORM(),
though.
On Wed, 25 Sep 2013, Warren Block wrote:
This generates a random
et you manage buttons positions
much more easilly then
manipulate the generated form.
Richard
On Wed, Sep 25, 2013 at 1:17 PM, Warren Block wrote:
Trying to generate a small form that is all buttons:
def month-example:
months = {'January', 'February', &
Trying to generate a small form that is all buttons:
def month-example:
months = {'January', 'February', 'March'}
form = FORM()
for month in months:
# this fails
form.add_button(month, URL(month))
return dict(form=form)
This generates 'NoneType' object has no att
Nice--that works great!
On Tue, 24 Sep 2013, Niphlod wrote:
alter the represent of the fields in the controller running the grid: it's the
right tool for the job
e.g.
db.table.field.represent = lambda value, row : DIV("%s ..." % value[10],
_title=value)
On Tuesday, September 24, 2013 10:
With some fields truncated in a grid, it would be nice to show the full
value in a tooltip when the mouse is over it. Offhand, I think that
will take a calculated field. Is there an example anywhere? For that
matter, examples of general examples of grid use would be really nice.
Thanks!
--
Okay, that makes sense. I do intend to make custom views, even more so
now. For now, default/index.html is just:
{{extend 'layout.html'}}
{{=grid}}
Thanks!
On Tue, 24 Sep 2013, Anthony wrote:
Oops, sorry -- the default/index.html view that comes with the scaffolding app includes
{{=BE
The default/index.html view exists (the default "simple app" one), so
it's not clear to me why it is using generic.html.
The index() function does not explicitly define any other variables, but
the "grid:" is displayed even if the index() function returns
dict(grid=grid).
On Tue, 24 Sep 2013
On both 2.5.1 and 2.6.4, grids are rendered with the name of the
variable visible. For example:
def index():
grid = SQLFORM.grid(db.names,
fields = [db.names.lastname, db.names.firstname])
return locals()
On screen, this renders (roughly) as:
grid : _ Search Clear
The live examples at https://code.google.com/p/pyfpdf/wiki/Web2Py
fail and produce a ticket.
The example code appears to use a template that is not actually shown,
but it's hard to tell.
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2
An HTML table listing works great, done as shown here:
http://code.google.com/p/pyfpdf/wiki/Web2Py
Generating the PDF version also works, and the font face and size are
controllable for headers and footers.
How can the font attributes be set or overridden for the body of the
listing? pdf.se
I have a SQLFORM.grid that could use the full width of the screen.
Turning off the sidebars in the view still leaves huge blank gaps to
left and right. How can I recover that space?
--
---
You received this message because you are subscribed to the Google Groups "web2py-users" group.
To uns
Thank you, I see what you are saying and will test the jQuery examples.
Ideally, I'd like to predefine the validation code and just specify a
mask when the field is declared in the Field statement (DRY). Then
forms would inherit the value and use the appropriate jQuery code for
those fields.
Hello. I'm just starting to dig into web2py. One thing I really want
is field input masks ala Visual Foxpro, to prevent users from entering
invalid characters rather than validating afterwards and telling them
they made a mistake.
For example, if a user types alpha characters into a numeric-
14 matches
Mail list logo