[web2py] inserting attributes into form.custom.begin

2010-07-06 Thread rāma
How do I insert attributes ie _class="small" into a custom form tag. Should look like below at the end of the day. '' I didn't find any attribute function in form.custom.begin to insert the above.

[web2py] Re: inserting attributes into form.custom.begin

2010-07-06 Thread rāma
ass'] = 'small' > >>> form.custom.begin.xml() > > '' > > On Jul 6, 11:14 am, mdipierro wrote: > > > > > form['_class']='small' > > > On 6 Lug, 09:33, rāma wrote: > > > > How do I insert

[web2py] Optional form field and its validation

2010-07-19 Thread rāma
Hi, How do I get the form to validate right. I want to validate an email field ONLY IF it is filled in. IS_EMAIL() doesn't meet my requirement as it enforces validation simply by submitting. IS_NOT_REQUIRED() validator? ;-) Rāma

[web2py] Re: Optional form field and its validation

2010-07-19 Thread rāma
Thank you for the blazing fast response. I didn't find that in the book hope its noted somewhere to be added later. Rāma On Jul 20, 1:33 am, mdipierro wrote: > IS_EMPTY_OR(IS_EMAIL()) > > On Jul 19, 12:23 pm, rāma wrote: > > > > > Hi, > > > How do I get

[web2py] Re: create native functions

2010-07-19 Thread rāma
Usually you create a function in the model so that it is available throughout the view and and controllers. On Jul 20, 1:57 am, Luis Díaz wrote: > how I can create your own functions, style MENU () or URL ()? > > I want to call them from any (controllers, view) without import > with local_import

[web2py] crud create double submission

2010-08-10 Thread rāma
I think I have a double submission problem on crud create. I am using a redirect in the view instead of the next attribute because I have to evaluate certain variable conditions. Haven't tried in other situations. I don't know if anyone can confirm this.

[web2py] Working example of Google WebSearch AJAX API anyone

2010-05-02 Thread rāma
Hi, Does anyone has a working example of the Google WebSearch AJAX API. I need to count the returning hits for a particular keyword on GoogleScholar. Pls share. If anyone has it in PHP etc do share. I will try to port it to web2py.

[web2py] Re: Learning Management System survey

2010-11-10 Thread rāma
Interesting thread glad I found it by searching the group because this is what I am doing currently. However, the LMS is designed to be a prototype trial though. I will be testing the beta LMS with a bunch of students next week. I will be interested to help too in this project. On Nov 8, 2:45 pm,

[web2py] Re: library app

2010-01-28 Thread rāma
Wow that's an amazing site in 200 lines code ! On Jan 29, 4:28 am, mdipierro wrote: > http://www.reddit.com/r/Python/comments/av2r8/creating_school_library... -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to

[web2py] Re: library app

2010-01-28 Thread rāma
al. > > Massimo > > On Jan 28, 3:08 pm, rāma wrote: > > > > > Wow that's an amazing site in 200 lines code ! > > > On Jan 29, 4:28 am, mdipierro wrote: > > > >http://www.reddit.com/r/Python/comments/av2r8/creating_school_library... -- You r

[web2py] Re: library app

2010-01-28 Thread rāma
update book > info from ISBN and making the interface more customizable). > > On Jan 28, 3:53 pm, mdipierro wrote: > > > > > It is there. There is a download link at the top of the search page. > > It requires web2py to open it. > > > On Jan 28, 3:45 pm, rām

[web2py] A quick Q on blocked urls by auth

2010-11-13 Thread rāma
How do you get the initial url which initiated the redirect to a login screen. I need to build a dictionary for custom login errors based on these urls. Can this information be accessed from the login view?

[web2py] how to read headers

2010-12-19 Thread rāma
This is rather daunting. An sms gateway put their variables in their header rather than urlencode it. I am not sure how to get my app to fetch the header variables from the request sent by the server. I tried mimicking using urllib2 by sending headers to my app. But, request.headers always return

[web2py] Re: how to read headers

2010-12-19 Thread rāma
Thanks a bunch! Its working On Dec 20, 2:32 pm, mdipierro wrote: > they are in request.env > > so header called blablabla would be in request.env.http_blablabla > > On Dec 20, 12:09 am, rāma wrote: > > > > > This is rather daunting. An sms gateway put their variab

[web2py] insert records using dictionary

2010-12-20 Thread rāma
Hi all, I'm aware that you can bulk insert using a dictionary but is there a way to : dictionary={'field1':'value','field2':'value' ...} db.table.insert(dictionary) It would be really easy if I can do this.

[web2py] Re: insert records using dictionary

2010-12-20 Thread rāma
Cool!! Thanks On Dec 20, 11:23 pm, mdipierro wrote: > db.table.insert(**dictionary) > > On Dec 20, 9:19 am, rāma wrote: > > > > > Hi all, > > > I'm aware that you can bulk insert using a dictionary but is there a > > way to : >

[web2py] syntax checker won't let me save this

2010-12-22 Thread rāma
I tried to construct a validator: db.sender.keywords.requires = IS_IN_DB(db( db.auth_user.id=user_id ), db.userkeywords.keyword) I was able to do this in previous versions. Please help.

[web2py] Re: syntax checker won't let me save this

2010-12-23 Thread rāma
Simple mistake. Sorry! On Dec 23, 2:05 pm, rāma wrote: > I tried to construct a validator: > > db.sender.keywords.requires = IS_IN_DB(db( db.auth_user.id=user_id ), > db.userkeywords.keyword) > > I was able to do this in previous versions. > > Please help.

[web2py] Datepicker to UTC time

2011-01-05 Thread rāma
Does/Can web2py store tzinfo in the datetime by the datepicker so that we can do time conversion easily to server time or UTC time. Time conversion was hell for me for the past two days. How is this issue typically approached? For my case, it has to be accurate as tasks are scheduled client side

[web2py] Querying fields with a list record

2011-01-30 Thread rāma
Can't do this anymore in the newer version. Any substitutes? both fields has requires=IS_IN_SET with multiple=True {{=A('('+str(db((~db.pm.deleted_by.contains(user_id))&(~db.pm.read_by.contains(user_id))).count()) +')',_href='#',_class='mail')}} Searched around and found that it can be done this

[web2py] autoroutes not working as expected on subdomain

2013-03-27 Thread rāma
Hi everyone, Long since I last posted. I just came across autoroutes script and after adding my domain and subdomain in the config, it does not seem to be routing to the app. However, only the first route works. I need test.domain.co -> /myapp/ Is this expected or autoroutes are only designed

[web2py] Re: tab separated csv file

2013-01-07 Thread rāma
I think the import button should have a delimiter field makes things easier. On Thursday, 12 March 2009 00:08:27 UTC+8, mdipierro wrote: > > There is no configuration parameter to do so. You mat create your own > csv serializer. look into the python csv module. > > On Mar 11, 10:01 am, Marco Pro

[web2py] weird slash problem

2011-02-07 Thread rāma
Traceback (most recent call last): File "C:\web2py\gluon\restricted.py", line 188, in restricted exec ccode in environment File "C:\web2py\applications\beta/views\default/user.html", line 136, in TypeError: 'str' object does not support item assignment Posting this because it started affe

[web2py] SQLFORM factory field name problem

2011-02-28 Thread rāma
SQLFORM factory field with underscore in them doesn't seem to submit properly for the below case:

[web2py] SQLFORM factory field name problem

2011-02-28 Thread rāma
SQLFORM factory field name with underscore doesn't submit properly in the below case: SQLFORM.factory(Field('fieldname', - Submit OK SQLFORM.factory(Field('select_fieldname', - Submit failed got a None returned I think. just to add: form catches the session as well. Regards, Rama

[web2py] web2py on recent updates feels slow

2011-02-28 Thread rāma
I updated web2py from 1.91XX to 1.92XX felt the speed improved a little which was previously worse. but now facing the same issue. This speed I'm talking about is when editing the app using the admin which also recently started affecting page load while loading the backend (a noticeable lag 1~2 sec

[web2py] counting the contains in joins

2011-04-26 Thread rāma
Dear all, We certainly can do this count = db.person.field.count() for row in db(db.person.field==db.dog.owner).select(db.person.name, count, groupby=db.person.field): print row.person.name, row[count] but what if we have a person.field of type list:string. I know the field has a 'contains' me

[web2py] Re: query question

2011-05-05 Thread rāma
I think this should be it: query=db((db.things.id>0)&(db.photos_things.id==db.photos_things.thing_id)).select() for row in query: list = [row.things.title, row.photos_things.photo_id.image]

[web2py] Re: query question

2011-05-05 Thread rāma
the loop is wrong. The below will be it. list=[] for row in query: list.append([row.things.title, row.photos_things.photo_id.image])

[web2py] Re: impersonate any user

2011-05-12 Thread rāma
Has this been fixed?

[web2py] Re: Is creating a token-based auth and still using auth and session globals possible?

2016-06-19 Thread rāma
Has there been updates on this. I am working on using web2py as a backend for my mobile app. Where there are no privileged cookies to track, is Niphlod's solution the best so far Dave Lypka suggested a few modification to the source, which I am not comfortable doing unless really necessary. On

[web2py] JWT refresh not working as expected?

2016-06-23 Thread rāma
Hi, I followed the instruction: 3) Use it! Now API users can obtain a token with http://.../app/default/user/jwt?username=...&password= (returns json object with a token attribute) API users can refresh an existing token with http://.../app/d

[web2py] info: represent when IS_IN_SET multiple is set to True

2018-07-24 Thread rāma
r]) This happened to work for me. Cheers, rāma -- 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

[web2py] SQLFORM widget IS_IN_SET translation

2018-07-24 Thread rāma
I could do this in SQLFORM readonly mode: https://groups.google.com/forum/#!topic/web2py/KnEaFsRRHL4 However, how do you make SQLFORM to show the translations in edit mode. Do you have to modify the widget? How? Thank you. -- Resources: - http://web2py.com - http://web2py.com/book (Documenta

[web2py] Re: info: represent when IS_IN_SET multiple is set to True

2018-07-25 Thread rāma
Obsoleted by Anthony's answer: https://groups.google.com/d/msg/web2py/pY36w84ovgQ/lA5vepMRBgAJ On Wednesday, 25 July 2018 12:29:32 UTC+8, rāma wrote: > > Just to share with everyone for a record here. Tried searching and > couldn't find anything easily. > > If you&#x

[web2py] Re: SQLFORM widget IS_IN_SET translation

2018-07-31 Thread rāma
label, ...} form: > IS_IN_SET({value: T(value) for value in values}) > > # As a list of tuples in (value, label) form: > IS_IN_SET([(value, T(value)) for value in values]) > > # Using the "labels" argument. > IS_IN_SET(values, labels=[T(value) for value in val

[web2py] Multi language SEO fro web2py rewrite rules example please

2018-07-31 Thread rāma
Based on recommendations of a muli-lingual site here: https://stackoverflow.com/a/16624252 Does anyone have it implemented in web2py? Appreciate if you have existing URL rewrites for me to try out. Thanks! -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://gi

[web2py] Re: Multi language SEO fro web2py rewrite rules example please

2018-08-03 Thread rāma
18 at 11:36:53 PM UTC-4, rāma wrote: >> >> >> Based on recommendations of a muli-lingual site here: >> https://stackoverflow.com/a/16624252 >> <https://www.google.com/url?q=https%3A%2F%2Fstackoverflow.com%2Fa%2F16624252&sa=D&sntz=1&usg=AFQjC

[web2py] Protecting admin with a 404

2018-08-06 Thread rāma
Hi web2py community, I am thinking of protecting my admin area with a secret var. I tried to put if request.controller == 'admin': reponse.flash = request['vars'] #raise HTTP(404, "page looking for does not exist") But I can't seem to get a proper response. I even tried inspecting the

Re: [web2py] Web2py Windows edition with 3.x Interpreter

2019-04-25 Thread rāma
This is wonderful. And, something I would love to be adopted to the official repo. Thanks for this! On Sunday, 3 March 2019 19:24:38 UTC+8, Nico Zanferrari wrote: > > Good morning! > > I'm proud to say that I've succeeded in building the Windows 64 bit binary > with python 3.7.2 using pyinstall

Re: [web2py] Web2py Windows edition with 3.x Interpreter

2019-04-25 Thread rāma
64-bit version. I used a conda environment running of pycharm in my original version and made sure all the site-packages modules or not preinstalled in the conda environment. Please help. On Friday, 26 April 2019 13:02:37 UTC+8, rāma wrote: > > This is wonderful. And, something I would

Re: [web2py] Web2py Windows edition with 3.x Interpreter

2019-04-27 Thread rāma
for py2.7, web2py for py3.7, web3py for py3.7 (WIP) > > > > > > > > > > On Thursday, 25 April 2019 22:02:37 UTC-7, rāma wrote: >> >> This is wonderful. And, something I would love to be adopted to the >> official repo. >> >> Thanks

Re: [web2py] Web2py Windows edition with 3.x Interpreter

2019-04-28 Thread rāma
27; makes PyInstaller to work with distutils and to work inside > virtualenv environment." > > It's possible to change this behaviour on gluon/shell.py by adding the > missing code - I'm setting up a PR for this ;-) > > Nico > > > Il giorno dom 28 apr

Re: [web2py] Web2py Windows edition with 3.x Interpreter

2019-04-29 Thread rāma
n this howto page > <https://github.com/nicozanf/web2py-pyinstaller/blob/master/HOWTO-modules.md> > for > future reference - feel free to correct me if I was wrong somewhere! > > > Cheers, > Nico > > > Il giorno lun 29 apr 2019 alle ore 04:24 rāma > h

[web2py] Re: Future of web2py

2019-05-02 Thread rāma
ONE month!? Sounds super exciting. On Thursday, 2 May 2019 15:16:21 UTC+8, Massimo Di Pierro wrote: > > yes. for my prospective it is very close to be done. we have: > > [x] more than x10 faster than web2py > [x] pydal (same as web2py) > [x] routing (like bottle or flask) > [x] T > [x] helpers (99

Re: [web2py] Re: wrapping long text lengths in grid/smartgrid

2017-07-23 Thread rāma
Still no solution? On Wednesday, 5 October 2011 19:37:39 UTC+8, Anthony wrote: > > I think if you specify a much longer maxtextlength, the text will > ultimately wrap, but it may cause the column to be much wider than you > want. Maybe all the th's and td's should include column-specific classes

[web2py] Re: project hire

2015-05-27 Thread rāma
Looking for something like this too On Sunday, 15 March 2015 22:34:06 UTC+8, pumplerod wrote: > > The web2py support page lists experts4solutions as a group to inquire > about consulting or development, however, their home page has no method of > contact? My coding chops are really just good en

[web2py] Re: Add button to smartgrid?

2019-05-21 Thread rāma
I used: for x in grid.elements('td.row_buttons'): x.insert(4, A( [SPAN(_class="menu-icon fa fa-paper-plane"), SPAN("Go To", _class="buttontext button", _title="GoTo")] , _href="TEST", _class="button btn btn-default btn-secondary")) This is specific to my needs, you may not w

[web2py] Re: Add button to smartgrid?

2019-05-21 Thread rāma
, _href="TEST", _class="button btn btn-default btn-secondary")] )) you can get the row properties into your button. But, what I am not sure is how to control where it appears in the table. Right now, by default, it appears before table referencin

[web2py] Electron, NWjs or Netralinojs and web2py

2019-05-23 Thread rāma
Hi, Is there anyone working on packaging web2py as an webview app? Is it easily deployable with these kits? -- 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)

[web2py] nssm does not work

2019-06-02 Thread rāma
I am using the latest version of NSSM - the Non-Sucking Service Manager; both 2.24 and the prelease build 2.2.4-101 . Unfortunately for me, NSSM sucked big time and trying to get it working with web2py was an utter waste of time. Tried -K; nothing and tried -X; nothing anyways Env: Python3.7 W

[web2py] Re: new free toys

2019-06-03 Thread rāma
Can the taskutils be used to replace nssm with web2py? On Wednesday, 27 January 2016 13:49:26 UTC+8, Massimo Di Pierro wrote: > > # a library to convert units and propagate errors in math > https://github.com/mdipierro/buckingham > > # a library to automatically install modules when imported > htt

[web2py] Re: nssm does not work

2019-06-06 Thread rāma
to select the column holding the > command line) > > On Monday, June 3, 2019 at 8:58:02 AM UTC+2, rāma wrote: >> >> I am using the latest version of NSSM - the Non-Sucking Service Manager; >> both 2.24 and the prelease build 2.2.4-101 . >> >> Unfortunately for me,

Re: [web2py] Web2py Windows edition with 3.x Interpreter

2019-06-14 Thread rāma
:09 PM UTC-7, rāma wrote: >> >> Hi Nico, >> >> Thanks for your inputs. >> >> I've actually run windows py2.7 binary with modules within site-packages, >> and pip can be leveraged by setting your target folder like this: >> >> pip install -

[web2py] docker for web2py with conda running on nginx

2019-11-04 Thread rāma
Dear web2py community, I am sharing my docker container that has pandas, numpy and scikit-learn preinstalled via docker running on nginx. https://hub.docker.com/r/rnjv/conda-web2py docker pull rnjv/conda-web2py Best, rāma -- Resources: - http://web2py.com - http://web2py.com/book

[web2py] How to sort a smartgrid with your own custom sorted id list

2020-06-18 Thread rāma
Hi all, How to sort a smartgrid with your own custom sorted id list? Say I have a id list of the query and I have a sorting functions that returns a sorted id list, how would I make smartgrid to commit to the ordering instead of sorting by ids by default? Thanks, rama -- Resources: - http://