[web2py] Re: TypeError: float argument required, not str

2013-10-26 Thread Niphlod
did you by any chance moved from 'string' to 'decimal(5,2)' AFTER creating the table on sqlite ? sqlite can't alter the type of the column if data is already there. try recreating the table from scratch. On Saturday, October 26, 2013 12:48:01 AM UTC+2, Carlos Zenteno wrote: > > This is my ta

[web2py] Re: having trouble with data-xxx when they are not a simple option

2013-10-26 Thread Niphlod
what are you expecting to see in the raw generated input ? On Friday, October 25, 2013 11:57:48 PM UTC+2, DenesL wrote: > > > using web2py 2.5.1 source on windows > > Having trouble creating an INPUT with a "non-trivial" data attribute. > Did try the following: > > INPUT(...,**{'_data-options':XM

[web2py] sqlform.smartgrid not show linked_tables only the archieves

2013-10-26 Thread 黄祥
hi, just wanna report that sqlform.smartgrid not show linked_tables only the archieves in web2py 2.7.4-stable_win. let say i have buyer table and invoice header table that have reference field to buyer table with record_versioning enable. when i use sqlform.smartgrid for table buyer it just sh

[web2py] Re: Book clarification regarding verify_email & reset_password

2013-10-26 Thread Lisandro
Does somebody achieved this? I'm trying to use a custom html template for auth.messages.verify_email but I can't get it to work. I tried with str.format() for using the second level of interpolation (as Jonathan suggested) but the error is the same: unsupported format character '!' (0x21) at i

[web2py] Re: having trouble with data-xxx when they are not a simple option

2013-10-26 Thread Anthony
Attributes are always put in double quotes: https://github.com/web2py/web2py/blob/master/gluon/html.py#L907. I suppose you could manually replace the double quotes after serializing: input = INPUT(..., data={'options': XML('{"mode":"calbox"}')}) XML(input.xml().replace('"{', "'{").replace('}"',

[web2py] Re: Access the server data in javascript

2013-10-26 Thread Ramesh Kumar
Thanks Derek, but I am facing one more problem. An 'L' gets appended to integer data. When I try to get the dict into a json, I am facing "Uncaught SyntaxError: Unexpected token ILLEGAL " error. Any help on this? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http:

[web2py] Re: Best way to learn web2py

2013-10-26 Thread Andreas Wienes
Thanks for all of your feedback. I've also started using web2py about two months ago and felt in love with it. It's so clear, simple to use, very well documented and the community is awesome. I'm grateful for the development and the quick and friendly support. But although all of this exists, t

[web2py] Re: def set_requirement problem

2013-10-26 Thread Annet
Thanks for your reply. cut down the code to the point it doesn't fire an exception and start from > there. > The problem did not exist before upgrading to web2py 2.7.4 and it was not the only problem I got after upgrading. I did what you suggest before posting to the group, but since the same

[web2py] Re: Bootstrap's nav-collapse

2013-10-26 Thread Annet
Hi Paolo, Thanks for your reply. I used the first solution the solve the problem right away. And I am working on the second solution to replace the first with. Kind regards, Annet -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (So

[web2py] Re: Same menu in two applications.

2013-10-26 Thread Annet
Thanks for your reply. I did what you suggested, and now both menus reflect the correct state. Kind regards, Anne -- 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 I

[web2py] how to access static file from controller

2013-10-26 Thread greaneym
Hi, I have written an app using pygeoip and MaxMind data files that works but I want to make a change. This library with the data files allows one to map ip addresses to geographic locations. in my controller, I have a line, gic = pygeoip.GeoIP('/User/mgreaney/geostuff/GeoLiteCity.dat'), pygeo

[web2py] Re: how to access static file from controller

2013-10-26 Thread Anthony
Looks like you need to access the file via the filesystem path, not the URL, so try: import os gic = pygeoip.GeoIP(os.path.join(request.folder, 'static', 'GeoLiteCity.dat' ), pygeoip.MEMORY_CACHE) Anthony On Saturday, October 26, 2013 1:04:33 PM UTC-4, greaneym wrote: > > Hi, > > I have written

[web2py] Re: TypeError: float argument required, not str

2013-10-26 Thread Carlos Zenteno
Yes I did... Will try your suggestion and report back thanks... -- 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

[web2py] Re: TypeError: float argument required, not str

2013-10-26 Thread Carlos Zenteno
OK, I can erase all rows... but how do I drop the table? Kinda stupid question? -- 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

Re: [web2py] Re: Request: Error Traceback Page: Requested URL with Arguments

2013-10-26 Thread Kevin Bethke
on the ticket page. Error ticket for "AppName" Ticket ID IP.datetime.somenumber list index out of range Version ... On Fri, Oct 25, 2013 at 1:09 PM, Niphlod wrote: > ehm, where exactly ? > > Il giorno venerdì 25 ottobre 2013 11:59:12 UTC+2, BlueShadow ha scritto: > >> Hi, >> I would lov

[web2py] tactic for avoiding errors

2013-10-26 Thread BlueShadow
Hi, I got a slightly modified download function: def fast_download(): session.forget(response) cache.action(time_expire=604800)(lambda: 0)() # very basic security (only allow fast_download on your_table.upload_field): if not request.args(0).startswith("Images."): return download

[web2py] Re: TypeError: float argument required, not str

2013-10-26 Thread Niphlod
either you delete the db (which means, all the tables are dropped), or you access the db from an external tool, or you do db.tablename.drop() BTW, dropping the table isn't required if you delete all the records in the table. On Saturday, October 26, 2013 9:02:10 PM UTC+2, Carlos Zenteno wrote: >

Re: [web2py] 2 domains served by the same web2py

2013-10-26 Thread António Ramos
Still goes to the wrong app The route you provided goes to welcome app 2013/10/26 Martin Weissenboeck > *(r'.*https?://www\.previnil\.pt.* /$anything', r'/previnil/$anything'),* -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Sourc

Re: [web2py] 2 domains served by the same web2py

2013-10-26 Thread António Ramos
routes_in = ( * (r'.* https?://www\.previnil\.pt.* /$anything', r'/previnil/$anything'),* (r'.*?:https?://www\.cires\.pt:.* /$anything', r'/welcome/$anything'), (r'.*?:https?://apps\.cires\.pt:.* /empre/$anything', r'/empre/$anything'), (r'.*?:https?://apps\.cires\.pt:.* /erp/$anyt

Re: [web2py] 2 domains served by the same web2py

2013-10-26 Thread António Ramos
bad news i think my routes.py is being fully ignored because i changed some of the above lines to route to diferent apps and web2py did not redirected to other apps so the point is not the bold line. is the routes.py file. why is my routes.py being ignored? no error when i restart web2py how do i

[web2py] Re: how to access static file from controller

2013-10-26 Thread greaneym
Thank you Anthony, that worked well. Margaret On Saturday, October 26, 2013 12:04:33 PM UTC-5, greaneym wrote: > > Hi, > > I have written an app using pygeoip and MaxMind data files that works but > I want to make a change. This library with the data files allows > one to map ip addresses to geo

[web2py] Re: 2 domains served by the same web2py

2013-10-26 Thread pang
A simpler approach is to rewrite the default controller in the default app, using request.url to get the url and redirect accordingly. Probably not optimal. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.

[web2py] Re: TypeError: float argument required, not str

2013-10-26 Thread Carlos Zenteno
Thanks a lot Niphlod Actually, I erased the rows (all records) in table and the error persisted. I then used the drop() command and the table was recreated with 'double' instead of 'string'. Good to know this kind of stuff... -- Resources: - http://web2py.com - http://web2py.com/book (Document

Re: [web2py] 2 domains served by the same web2py

2013-10-26 Thread Jonathan Lundell
On 26 Oct 2013, at 1:04 PM, António Ramos wrote: > routes_in = ( > > (r'.* https?://www\.previnil\.pt.* /$anything', r'/previnil/$anything'), > (r'.*?:https?://www\.cires\.pt:.* /$anything', r'/welcome/$anything'), > (r'.*?:https?://apps\.cires\.pt:.* /empre/$anything', > r'/e

Re: [web2py] 2 domains served by the same web2py

2013-10-26 Thread António Ramos
i tried *(r'.*?:https?://www\.previnil\.pt:.* /$anything', r'/previnil/$anything'),* *(r'.* https?://www\.previnil\.pt.* /$anything', r'/previnil/$anything'),* *none of them redirected* * * all other routes are not working also because i changed them to redirect to other app and it did not! is as

Re: [web2py] 2 domains served by the same web2py

2013-10-26 Thread Jonathan Lundell
On 26 Oct 2013, at 1:54 PM, António Ramos wrote: > i tried > (r'.*?:https?://www\.previnil\.pt:.* /$anything', r'/previnil/$anything'), > (r'.* https?://www\.previnil\.pt.* /$anything', r'/previnil/$anything'), > none of them redirected > > all other routes are not working also because i change

Re: [web2py] 2 domains served by the same web2py

2013-10-26 Thread António Ramos
sorry but dont know how to turn on rewrite logging 2013/10/26 Jonathan Lundell > On 26 Oct 2013, at 1:54 PM, António Ramos wrote: > > i tried > *(r'.*?:https?://www\.previnil\.pt:.* /$anything', > r'/previnil/$anything'),* > *(r'.* https?://www\.previnil\.pt.* /$anything', r'/previnil/$anyth

Re: [web2py] 2 domains served by the same web2py

2013-10-26 Thread Jonathan Lundell
On 26 Oct 2013, at 2:40 PM, António Ramos wrote: > sorry but dont know how to turn on rewrite logging > Copy the logging.conf example file to the web2py root as logging.conf. The logger you want to enable is web2py.rewrite, and set the log parameter in routes.py to something higher that debu

[web2py] Re: web3py status

2013-10-26 Thread samuel bonill
the main problem is porting dal.py to python 3.x El viernes, 25 de octubre de 2013 21:26:36 UTC-5, elguavas escribió: > > hi there, > > i've seen peppered throughout this list references to "web3py". i seems > like it's mostly the unofficial name of of a concept at this stage, but i > also see

Re: [web2py] 2 domains served by the same web2py

2013-10-26 Thread António Ramos
i installed a clean install of web2py and a simple line in routes.py does not route so i go with this in my welcome default controller. if request.env['http_host']=="www.previnil.pt": redirect(URL(a='previnil',c='default',f='index')) So sad that a simple line produces so much waste

[web2py] Re: bootstrap 3 skeleton app?

2013-10-26 Thread elguavas
ahh, glad to hear. ;) anything in a not too distant release, or anything in git or wherever for testing? On Saturday, October 26, 2013 4:07:36 PM UTC+11, Massimo Di Pierro wrote: > > we are working on it. ;-) > > On Friday, 25 October 2013 21:20:47 UTC-5, elguavas wrote: >> >> hi there, >> >> i

[web2py] Web2py Business Directory App [Source Release]

2013-10-26 Thread rustytubshinobi
Greetings! I am releasing a web2py app which I developed, a Business Directory Website. You can see the live version at http://www.free-business-pages.com/ and download the code at https://github.com/techshinobi/web2py-business-directory. Feel free to offer suggestions or modify the code to wh

Re: [web2py] 2 domains served by the same web2py

2013-10-26 Thread António Ramos
i find that this line (r'.*?:https?://apps\.cires\.pt:.* /*empre$anything*', r'/empre/$anything'), instead of this (r'.*?:https?://apps\.cires\.pt:.* /empre*/*$anything', r'/empre/$anything'), redirects to another app Problem solved for app routing ( however as i have two base domains pointing

[web2py] Re: Web2py Business Directory App [Source Release]

2013-10-26 Thread 黄祥
congrats, nice and clean website. best regards, stifan -- 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 subscrib

[web2py] Re: web3py status

2013-10-26 Thread elguavas
ok. does the dal make large scale use of some particular py2 idioms? is it a strings (unicode in py3) vs bytes problem? is there a work in progress of this or anything else in web3py anywhere? seems like it will be unlikely to eventuate or progress if there is no work relating to this in any

[web2py] Re: web3py status

2013-10-26 Thread Massimo Di Pierro
I would not say it is the main "problem". It should be easy to do. It was done once already my Mariano for an earlier version. It is just that nobody has shown must interest in helping do it. We already use a a python 3 compatible syntax. After this is converted it needs testing and I am not sure

[web2py] transfer local database to Google App Engine website

2013-10-26 Thread books2beermanager
I am trying to deploy my app on Google App Engine. I have a set of databases that I've built up locally on my laptop that have been interfacing just fine with my app when the app is running locally. However, when I visit the .appspot.com address for my app, none of the databases are present. Al

[web2py] Error during populating dummy data

2013-10-26 Thread tomasz bandura
Hello, I noticed an error when I try to populate dummy data (i.e. populate(db.mytable,100)): My table : db.define_table('parameters_dict', Field('name','string',length=16) ) Error: ('ERROR', '22001', 'value too long for type character varying(16)') It looks i cannot limit length to 16 becaus