On Wednesday, February 7, 2018 at 11:09:09 PM UTC-8, Dave S wrote:
>
>
>
> On Wednesday, February 7, 2018 at 2:08:23 PM UTC-8, Leonel Câmara wrote:
>>
>> Hummm you're right, can I see the code for default/sorted and the
>> quartermaster table?
>>
>
>
> db.define_table('QuarterMaster',
> Field('IssueYr', 'integer',
> requires = [IS_NOT_EMPTY(), IS_INT_IN_RANGE(1965,2018
> , "Not a valid year of issue")],
> widget = lambda f, v: SQLFORM.widgets.integer.widget(
> f, v, _autofocus=True)),
> Field('StateNm', 'string', default=None, represent=lambda
> StateNm: StateNm or '', requires=IS_EMPTY_OR(IS_IN_SET(us_states))),
> Field('Other', 'string', default=None, represent=lambda
> Other: Other or '', requires=IS_EMPTY_OR(IS_IN_SET(us_other))),
> Field('Mint', 'string', requires=IS_MATCH('^[dpx]*$',
> error_message="not a valid mint string")),
> Field('NumAdded', "integer", compute = lambda r: len(r[
> "Mint"])),
> Field('PostDate', "date", requires=IS_DATE(format=
> '%Y-%m-%d', error_message='must be YYYY-MM-DD!')))
>
> Some sample rows, via appadmin export as csv:
QuarterMaster.id,QuarterMaster.IssueYr,QuarterMaster.StateNm,QuarterMaster.Other,QuarterMaster.Mint,QuarterMaster.NumAdded,QuarterMaster.PostDate
40,2013,<NULL>,Great Basin,d,1,2016-11-25
41,2012,<NULL>,Hawaii Volcanoes,dd,2,2016-11-25
42,2002,LA,<NULL>,d,1,2016-11-25
43,2009,<NULL>,District of Columbia,d,1,2016-11-25
44,2007,WA,<NULL>,d,1,2016-11-25
/dps
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.