[web2py] Re: How to page rest service data response?

2016-02-23 Thread Seraaj Muneer
p://web2py.com/books/default/chapter/29/10/services#parse_as_rest--experimental- > > You must specify the "offset" and "limit" variables in the query string > (they default to 0 and 1000, respectively). > > Anthony > > On Monday, February 22, 2016 at 8:16:27 PM

[web2py] How to page rest service data response?

2016-02-22 Thread Seraaj Muneer
Hello everyone, I've the following code @request.restful() def api(): response.view = 'generic.json' def GET(*args, **vars): patterns = 'auto' parser = db.parse_as_rest(patterns, args, vars) if parser.status == 200: return dict(banks=parser.response)

[web2py] Re: Smartgrid and onvalidation for child tables

2016-02-18 Thread Seraaj Muneer
Feature request reaised https://github.com/web2py/web2py/issues/1188 On Wednesday, 17 February 2016 16:48:49 UTC, Seraaj Muneer wrote: > > Hello everyone, according to the Book, the smartgrid can be passed a map > of parameters, eg searchable=dict(parent=True, child=False), and this w

[web2py] Smartgrid and onvalidation for child tables

2016-02-17 Thread Seraaj Muneer
Hello everyone, according to the Book, the smartgrid can be passed a map of parameters, eg searchable=dict(parent=True, child=False), and this will be passed to the appropriate grids that the smartgrid creates. Now I am wondering how to pass an onvalidation call back to both a parent and a chi

Re: [web2py] Re: Mysterious key error

2016-01-23 Thread Seraaj Muneer
If I take out common_filter=lambda query: db.bank.company_id == get_default_company_id() from the table definition, everthing works just fine. On Saturday, 23 January 2016 18:10:54 UTC, Seraaj Muneer wrote: > > To be clear, I didn't insert the last line > > response <h

Re: [web2py] Re: Mysterious key error

2016-01-23 Thread Seraaj Muneer
To be clear, I didn't insert the last line response <http://127.0.0.1:8000/examples/global/vars/response>._vars=response <http://127.0.0.1:8000/examples/global/vars/response>._caller(banks) in the controller. Web2py did that. On Saturday, 23 January 2016 18:06:23 UTC, Se

Re: [web2py] Re: Mysterious key error

2016-01-23 Thread Seraaj Muneer
.0.0.1:8000/examples/global/vars/response>.flash = 'Bank saved successfully' else: response <http://127.0.0.1:8000/examples/global/vars/response>.flash = 'Use the form to create a new bank' return dict(form=form) response <http://127.0.0.1:8000/examples/

[web2py] Re: Any angular templates?

2016-01-22 Thread Seraaj Muneer
You could easily use the two via rest. So web2py becomes the rest backend , freeing you to use not just angular but any of the myriad frontend javascript frameworks out there. On Saturday, 23 January 2016 04:57:07 UTC

Re: [web2py] Re: Mysterious key error

2016-01-22 Thread Seraaj Muneer
On Saturday, 23 January 2016 06:12:06 UTC, Seraaj Muneer wrote: > > I think I figured it out. Using the table property 'common_filter' AND the > special field 'request_filter' on the same table is what was causing it. > Removing one of those fixed the issue

Re: [web2py] Re: Mysterious key error

2016-01-22 Thread Seraaj Muneer
I think I figured it out. Using the field property 'common_filter' AND the special field 'requst_filter' on the same table is what was causing it. Removing one of those fixed the issue for me. On Saturday, 23 January 2016 06:07:02 UTC, Seraaj Muneer wrote: > > Web2

Re: [web2py] Re: Mysterious key error

2016-01-22 Thread Seraaj Muneer
p that reproduces the > problem? > > On Friday, January 22, 2016 at 6:26:18 PM UTC-5, Seraaj Muneer wrote: >> >> That was just a typing error when I was writing the message here. It's >> actually correctly defined in my code. >> On 22 Jan 2016 23:08,

[web2py] Re: Use auto complete without SQL

2016-01-18 Thread Seraaj Muneer
gt; form processing, and set it to False. > > Denes. > > On Sunday, January 17, 2016 at 6:33:56 PM UTC-5, Seraaj Muneer wrote: >> >> Hello everyone from Accra Ghana. >> >> I've a small issue I'm not sure how to go about. >> >> I've a numb

[web2py] Use auto complete without SQL

2016-01-17 Thread Seraaj Muneer
Hello everyone from Accra Ghana. I've a small issue I'm not sure how to go about. I've a number of companies in the database. What I want to do is create a form with just a select field containing the companies in the database, and naturally a submit button to post the form to a controller. How

Re: [web2py] New to web app development -- is web2py a good choice

2016-01-17 Thread Seraaj Muneer
Greetings from Accra Ghana! Quite an old thread, but adding my 2 cents here for anyone who stumbles on this with a question similar to the OP. Having been doing Java EE for almost 5 years now, I can say wholeheartedly web2py is the most time-saving, intuitive, common sense oriented framework I

Re: [web2py] Autocomplete and list:string

2016-01-17 Thread Seraaj Muneer
db.define_table('company', Field('name', 'string', length=20, represent=lambda name, row: name. capitalize(), required=True, unique=True, notnull=True, requires=[IS_NOT_EMPTY(error_message='You must enter a company name'), IS_MATCH('^[a-zA-Z0-9][a-zA-Z0-9 ,-.]*$') ]), Field('user_id', 'refere