Re: [web2py] Re: Prevent multiple submit buttons from showing Working... on submit

2013-12-08 Thread Martin Weissenboeck
Same problem. It seems, that input *data-w2p_disable_with=MSSG*** name=submit1 type=submit value= Back / has no effect. By the way, I have found in gluon/html.py that something like DIV('text', **{'_data-role': 'collapsible'}) could alo be written as DIV('text', data={'role':

[web2py] new feature in trunk: TODO panel in admin editor

2013-12-08 Thread Paolo Valleri
Dear all, the online editor has got a new TODO panel in which are listed all TODO you might have in the current application. For the time being it highlights only TODO in python files, in the short future we will support other file types and special keywords, along with the keyword TODO I've

[web2py] URL Routing question re: setting persistent arguments for use in controller functions

2013-12-08 Thread Henry Nguyen
Hello, I have an application in which users can have sub_users. Within the app, a user can select a sub_user, at which point, all controls become targeted to that selected sub_user. For example, if I select sub_user 1 and then goto settings/show_settings.html, I want the show_settings.html to

[web2py] Re: How to measure conversion rate with google analytics?

2013-12-08 Thread Mika Sjöman
I have But I get no conversion rates at all. Apparently it needs a special goal URL in Google Analytics to set up a goal (Bottom left). What I did was to set a new column in auth_user.just_registered with default value of True. If they come into the system with a True value, they get

[web2py] having troubles with scheduler in 2.8.2

2013-12-08 Thread Ivo
I'm trying to get the scheduler up and running but it keeps giving me failed and then stops. -D0 gives me: DEBUG:web2py.scheduler.mac.linuxmce#16946: task starting DEBUG:web2py.scheduler.mac.linuxmce#16946:task started DEBUG:web2py.scheduler.mac.linuxmce#16946:recording heartbeat

[web2py] Spatial/GIS: find records within X distance of point?

2013-12-08 Thread User
I'm storing latitude/longitude coordinates in a geometry field (using PostgreSQL 9.1.10): Field('point', 'geometry()') I understand there is also the geography type but from my reading geometry is faster and is suitable for small distances (

[web2py] Re: Online classes

2013-12-08 Thread Mika Sjöman
Hi Supper happy to see this! Two questions: 1. could you cut them down a bit into smaller sections? 2.5 hour videos are a little bit too much to take in one time. 20 - 30 minutes max I would say is my personal attention span, preferably shorter. 2. is it possible to make it more like

[web2py] foreign key constraint failed ???

2013-12-08 Thread Ivan Gazzola
I can't resolve this ticket in mhy app. I try to insert from appadmin but i've always this error: class 'sqlite3.IntegrityError' foreign key constraint failed This is my model: db.define_table('Nominativi', Field('nome',notnull=True, represent=lambda nome:nome.title()),

[web2py] Re: convert month into roman format

2013-12-08 Thread Massimo Di Pierro
https://pypi.python.org/pypi/rome/0.0.2 On Saturday, 7 December 2013 23:55:17 UTC-6, 黄祥 wrote: hi, is there any way to convert month into roman format? e.g. month = datetime.date.today().strftime('%m') i want to convert the month variable value into roman format what is the best way to

[web2py] Re: Spatial/GIS: find records within X distance of point?

2013-12-08 Thread Massimo Di Pierro
Added ST_Dwithin support in trunk. Please check it. On Sunday, 8 December 2013 07:02:06 UTC-6, User wrote: I'm storing latitude/longitude coordinates in a geometry field (using PostgreSQL 9.1.10): Field('point', 'geometry()') I understand there is also the geography type but from my

[web2py] Re: Online classes

2013-12-08 Thread Massimo Di Pierro
It would be great if you could edit the text and cut it into smaller parts. I am not recording it again. ;-) On Sunday, 8 December 2013 07:03:10 UTC-6, Mika Sjöman wrote: Hi Supper happy to see this! Two questions: 1. could you cut them down a bit into smaller sections? 2.5 hour videos

Re: [web2py] Re: Online classes

2013-12-08 Thread Teddy Nyambe
Very helpful videos, but too big for download especially for some of us with slow connections, downloaded two...three go! On 8 Dec 2013 16:26, Massimo Di Pierro massimo.dipie...@gmail.com wrote: It would be great if you could edit the text and cut it into smaller parts. I am not recording it

[web2py] Re: foreign key constraint failed ???

2013-12-08 Thread Ivo
though it may not be the preferred solution I resolved it by adding: adapter_args=dict(foreign_keys=False) to db = DAL('sqlite://storage.sqlite') in db.py On Sunday, December 8, 2013 3:16:36 PM UTC+1, Ivan Gazzola wrote: I can't resolve this ticket in my app. I try to insert in

[web2py] Table reference field instead of the id

2013-12-08 Thread Gael Princivalle
Hello all. Well I don't understand really how to manage this problem. I cannot use web2py id's for referencing my brands, I need to use id's from another CRM application called 01. So I have in my brands table a field called id_01 and in the products table a field called brand_id_01. When I

[web2py] get a controller function in default view

2013-12-08 Thread Ivo
I need to get dictionary item which is located in default.py in to a view. to be more specific: default.py: def my function(): my_result = 'my result' return dict(my_result=my_result) the view is accessed from default/my_function.html, but my_result is also needed in a html above

[web2py] Re: Table reference field instead of the id

2013-12-08 Thread 黄祥
i think you should refer it to db.brands.id. e.g. db.define_table('brands', Field('id_01', unique = True), Field('name'), format='%(name)s') db.define_table('products', Field('code', unique=True), Field('description'),

[web2py] Re: convert month into roman format

2013-12-08 Thread 黄祥
thank you so much for the reference link, massimo. best regards, stifan On Sunday, December 8, 2013 9:21:41 PM UTC+7, Massimo Di Pierro wrote: https://pypi.python.org/pypi/rome/0.0.2 On Saturday, 7 December 2013 23:55:17 UTC-6, 黄祥 wrote: hi, is there any way to convert month into roman

[web2py] Re: get a controller function in default view

2013-12-08 Thread 黄祥
why not extend the layout_1.html in your view? e.g. {{extend 'layout_1.html'}} 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

[web2py] Re: foreign key constraint failed ???

2013-12-08 Thread 黄祥
had you already try using : 'reference Nominativi' instead of db.Nominativi and requires is set to db.Nominativi.id instead of 'Nominativi.id'? e.g. db.define_table('Relazioni', Field('nominativo', 'reference Nominativi', required=True,requires=[IS_IN_DB(db, db.Nominativi.id)]),

[web2py] Re: cannot get a multiselect list

2013-12-08 Thread 黄祥
requires=IS_IN_SET(ngotype]), are you sure? there is unbalance bracket [] on that i mean: requires=IS_IN_SET(ngotype]), should be requires=IS_IN_SET(ngotype), best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] Re: foreign key constraint failed ???

2013-12-08 Thread Ivan Gazzola
I changed all fields in 'referece field' format but nothing changes :( For the validatos IS_IN_DB(db,db.table.field,format) is mistaken and return errors, indeed the correct form is IS_IN_DB(db,table.field,format) ... Regards Ivan Il giorno domenica 8 dicembre 2013 17:20:15 UTC+1, 黄祥 ha

[web2py] Re: get a controller function in default view

2013-12-08 Thread Ivo
I'm not quite sure what you mean or how I should do that. The layout_1.html serves as the template on how items are displayed. (it's not a replacement for layout.html) Layout_1.html is included in several other views as the basis of how to display the items. It has a table inside which dictates

Re: [web2py] URL Routing question re: setting persistent arguments for use in controller functions

2013-12-08 Thread Jonathan Lundell
On 8 Dec 2013, at 12:46 AM, Henry Nguyen henrynguy...@gmail.com wrote: I have an application in which users can have sub_users. Within the app, a user can select a sub_user, at which point, all controls become targeted to that selected sub_user. For example, if I select sub_user 1 and then

[web2py] Re: foreign key constraint failed ???

2013-12-08 Thread Ivan Gazzola
If possible I prefer to keep foreign_keys=True for db integrity. Thx Ivan Il giorno domenica 8 dicembre 2013 15:41:03 UTC+1, Ivo ha scritto: though it may not be the preferred solution I resolved it by adding: adapter_args=dict(foreign_keys=False) to db = DAL('sqlite://storage.sqlite') in

[web2py] Re: foreign key constraint failed ???

2013-12-08 Thread Alan Etkin
If possible I prefer to keep foreign_keys=True for db integrity. Another similar thread https://groups.google.com/d/msg/web2py/klspqXpha4E/mCwQ6HC5IhAJ -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Re: Table reference field instead of the id

2013-12-08 Thread Gael Princivalle
Thanks Stifan but also with: db.products.brand_id_01.requires = IS_IN_DB(db, db.brands.id, '%(name)s') web2py don't display the db.brands.name instead of the db.products.brand_id_01.. A solution could be make lambda function, what do you think about something like that ? In the controller: def

Re: [web2py] URL Routing question re: setting persistent arguments for use in controller functions

2013-12-08 Thread Jonathan Lundell
On 8 Dec 2013, at 8:43 AM, Jonathan Lundell jlund...@pobox.com wrote: On 8 Dec 2013, at 12:46 AM, Henry Nguyen henrynguy...@gmail.com wrote: I have an application in which users can have sub_users. Within the app, a user can select a sub_user, at which point, all controls become targeted to

[web2py] Importng dropbox and scheduler problem

2013-12-08 Thread Peter
When I access dropbox from my web2py app through the browser, the dropbox access works fine. If I do at linux command line Python2.6 import dropbox it imports fine. If I start the scheduler with python2.6 /opt/web-apps/web2py web2py.py -K myapp the sheduler works fine, but if I# import

[web2py] Re: Online classes

2013-12-08 Thread Mika Sjöman
Hmm... ok. Thinking ... if it would be possible to use vimeo to integrate into a small learn web2py website. Just need pause points to hide the video temporarily and show them again after the user has input commands into a text area field and has gotten them verified as correct. We actually do

[web2py] Re: get a controller function in default view

2013-12-08 Thread Ivo
Any one know how I can do this. I tried creating a model but still no joy... On Sunday, December 8, 2013 5:41:01 PM UTC+1, Ivo wrote: I'm not quite sure what you mean or how I should do that. The layout_1.html serves as the template on how items are displayed. (it's not a replacement for

Re: [web2py] Re: get a controller function in default view

2013-12-08 Thread Ovidio Marinho
{{extend 'layout1.html}} {{=my_result}} Ovidio Marinho Falcao Neto ITJP.NET.BR ovidio...@gmail.com Brasil 2013/12/8 Ivo ivo.nijenh...@gmail.com Any one know how I can do this. I tried creating a model but still no joy...

[web2py] Re: Table reference field instead of the id

2013-12-08 Thread Massimo Di Pierro
Try replace lambda row: (something that return the brands.name of the products.brand_id_01 current row) with lambda row: (db.brandshttp://www.google.com/url?q=http%3A%2F%2Fdb.brands.namesa=Dsntz=1usg=AFQjCNE3jQMLe-HFn1TMWcTiEsecaE2E1w (row.brand_id_01).name) On Sunday, 8 December 2013

[web2py] Re: Importng dropbox and scheduler problem

2013-12-08 Thread Peter
I have made some progress. The import of dropbox works fine when the scheduler is started from the command line python2.6 /opt/web-apps/web2py web2py.py -K myapp But it does not work when the scheduler is started as a service. So the issue is caused when one starts the scheduler as a

[web2py] Re: Question on EMTE and websockets

2013-12-08 Thread John Griffith
Did you get this fixed? On Saturday, 8 June 2013 14:52:08 UTC+1, george3825 wrote: Hello, I have been trying to get the EMTE engine up and running. So far I have gotten the matchingserver, robottrader, and the log parsers to work and even into a MySQL DB. I have been stuck on getting the

[web2py] Re: get a controller function in default view

2013-12-08 Thread Anthony
It would help if you show layout_1.html and how it is included in the view, but you can refer to a variable returned by the controller in any included view: In myfunction.html: {{extend 'layout.html'}} {{include 'layout_1.html'}} Then in layout_1.html: {{=myresult}} Or if you need to check

[web2py] Re: app not working after install 2.8.2 is_mobile error

2013-12-08 Thread Vinhthuy
Massimo: I feel really scared reading this. In fact, I haven't upgraded to the latest version yet, partly because exactly what you said. I haven't kept up with this reading list, and I am afraid that after the upgrade my apps won't work because I fail to do certain things that are discussed

Re: [web2py] URL Routing question re: setting persistent arguments for use in controller functions

2013-12-08 Thread Henry Nguyen
Jonathan, Thank you for your suggestion. Session variables should work just fine for this indeed. Just for future reference, I had also came up with a somewhat hacky way to get my navigation menus to append the sub_user.id as an argument. Basically, I have two navigation menus: one on the

[web2py] how to build field list from string for SQLFORM.grid?

2013-12-08 Thread P T
I am dynamically creating the fields in a table from entries in another table. I am using SQLFORM.grid to view/edit the table. For the grid, the following field list works fine: fields=[db.monthly_projections.employee, db.monthly_projections.id, db. monthly_projections.costcode,

[web2py] Re: app not working after install 2.8.2 is_mobile error

2013-12-08 Thread Ivo
I searched for one as well but just took the risk because I backed up my apps. however I do propose that the upgrade script includes clearing out sessions and cache this will save a lot time and questions. Also the impact should be mentioned. For example the foreign key error a lot of us are

[web2py] Re: having troubles with scheduler in 2.8.2

2013-12-08 Thread Niphlod
commit() can only be called on the DAL instance, not on the table i.e. db.commit() instead of db.tablename.commit() On Sunday, December 8, 2013 1:57:13 PM UTC+1, Ivo wrote: I'm trying to get the scheduler up and running but it keeps giving me failed and then stops. -D0 gives me: