Package gluon :: Module sqlhtml
[hide private]
[frames] | no frames]

Module sqlhtml

source code


This file is part of the web2py Web Framework
Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu>
License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)

Holds:

- SQLFORM: provide a form for a table (with/without record)
- SQLTABLE: provides a table for a set of records
- form_factory: provides a SQLFORM for an non-db backed table

Classes [hide private]
  FormWidget
helper for SQLFORM to generate form input fields (widget), related to the fieldtype
  StringWidget
  IntegerWidget
  DoubleWidget
  DecimalWidget
  TimeWidget
  DateWidget
  DatetimeWidget
  TextWidget
  JSONWidget
  BooleanWidget
  OptionsWidget
  ListWidget
  MultipleOptionsWidget
  RadioWidget
  CheckboxesWidget
  PasswordWidget
  UploadWidget
  AutocompleteWidget
  SQLFORM
SQLFORM is used to map a table (and a current record) into an HTML form
  SQLTABLE
given a Rows object, as returned by a db().select(), generates an html table with the rows.
  ExportClass
  ExporterTSV
  ExporterCSV
  ExporterCSV_hidden
  ExporterHTML
  ExporterXML
  ExporterJSON
Functions [hide private]
 
add_class(a, b) source code
 
represent(field, value, record) source code
 
safe_int(x) source code
 
safe_float(x) source code
 
show_if(cond) source code
 
formstyle_table3cols(form, fields)
3 column table - default
source code
 
formstyle_table2cols(form, fields)
2 column table
source code
 
formstyle_divs(form, fields)
divs only
source code
 
formstyle_inline(form, fields)
divs only
source code
 
formstyle_ul(form, fields)
unordered list
source code
 
formstyle_bootstrap(form, fields)
bootstrap format form layout
source code
 
formstyle_bootstrap3(form, fields)
bootstrap 3 format form layout
source code
 
form_factory(*fields, **attributes)
generates a SQLFORM for the given fields.
source code
Variables [hide private]
  is_gae = None
hash(x)
  table_field = re.compile(r'[\w_]+\.[\w_]+')
  widget_class = re.compile(r'^\w*')
  __package__ = 'gluon'
Function Details [hide private]

form_factory(*fields, **attributes)

source code 

generates a SQLFORM for the given fields.

Internally will build a non-database based data model to hold the fields.