Re: [web2py] Re: Represent, list:reference, upload-field

2014-05-26 Thread Mandar Vaze
A Million Thanks for Johann (for asking the question) and Massimo (for providing the answer). Following is useful even after more than 3 years !!! Web2py rocks, and web2py community makes it even better :) -Mandar On Friday, October 14, 2011 6:56:07 PM UTC+5:30, Johann Spies wrote: > > > > On 1

[web2py] how to modify form input before validation and insert into database?

2014-05-26 Thread chuan137
I want to replace white spaces with underscore and capitialize each word before insert them into database. I am using SQLFORM(...) and I find onvalidation is used after validation. but I want to use this field as a unique keyword, which used in query conditions. what I want is to use a function

Re: [web2py] Re: AWS Elastic Beanstalk installation Recipe

2014-05-26 Thread Massimo Di Pierro
If migrate_enabled=False then .table files are ignored. You can use command line tools. If you create a applications/yourapp/DISABLED file, your app is temporarily disabled. If you run python web2py.py -S web2py -M -R anyscript.py your script anyscript.py will run as if it were a controller.

[web2py] Re: web2py and whoosh

2014-05-26 Thread weheh
I know nothing of whoosh and It's hard to tell without seeing any code. Are you decoding from a web2py record and then encoding when going into whoosh? Where are the data coming from originally. Are the documents being uploaded to web2py then written to the server's file system or written to a w

Re: [web2py] Re: web2py and whoosh

2014-05-26 Thread Carlos Cesar Caballero Díaz
Derek thanks for your answer, the character coding is set, the problem is when the data go from web2py to the whoosh database. El 23/05/14 13:47, Derek escribió: I've seen this before when the layout.html didn't include the character coding portion. On Friday, May 23, 2014 7:49:39 AM UTC-7, C

[web2py] Re: routes.py confusion

2014-05-26 Thread Jaime Sempere
I guess you did not reload routes.py... from the admin panel there is a botton that says "reload routes.py"... other option (I guess you did this) is restart web2py server El martes, 27 de mayo de 2014 05:23:46 UTC+2, Jesse Ferguson escribió: > > It seems to be working now... I guess it just ta

[web2py] Re: routes.py confusion

2014-05-26 Thread Jesse Ferguson
It seems to be working now... I guess it just takes a while to kick in?? -- 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

[web2py] Why won't my bootstrap modal form close?

2014-05-26 Thread weheh
My bootstrap modal won't close when the user clicks the submit button. Console says, "Uncaught TypeError: undefined is not a function" Here's what I'm doing. # view does a load of a skeleton {{= LOAD('contact', 'dialog.load', ajax=True)}} # contact controller looks like this def dialog(): r

[web2py] Re: routes.py confusion

2014-05-26 Thread Jaime Sempere
Theorically that should do the trick, and mywebsite.com should load your index page. Just silly question, do you have index.html and def index(): Btw, maybe you are checking in it in no-local server (i mean 'live' server, internet server, or whatever is called), and you are using the general t

[web2py] routes.py confusion

2014-05-26 Thread Jesse Ferguson
I deployed my app using the nginx script and created a routes.py file like so: # -*- coding: utf-8 -*- > > >> routers = dict( > > BASE = dict( > > default_application='myapp', ) > > ) > > > However when i go to mywebsite.com i get "invalid request" but mywebsite.com/myapp loads t

[web2py] Re: Verify password does not fit formstyle

2014-05-26 Thread Jaime Sempere
> > Hi Annet, > that looks very nice, but doesn't change anything in my case (same html). Could you copy and past all your definition of def bootstrap3(form, fields) ? The problem is that verify passwords fields (label & input) are not wrapped with like other input fields, leaving him outsi

[web2py] Re: How to select a column of numbers into a list so that I can manipulate the list

2014-05-26 Thread Anthony
You can do: nums3 = [r.measure_value for r in db().select(db.Measures.measure_value)] The .select() returns a Rows object, which acts like a list of Row objects -- if you want to extract just a single value from each Row object, you have to iterate through the Rows object and pull each value ou

Re: [web2py] Re: AWS Elastic Beanstalk installation Recipe

2014-05-26 Thread Diogo Munaro
Thx Massimo, but I need other .tables inside deploy version? i.e: I have my production version with x db structure, but my new production version have x+1 db structure. I need x .tables inside my deploy? Could I make migrate without access page? Could I use any command line tools? 2014-05-26 12:

[web2py] Re: How to migrate to UUID references in db without messing up reference fields

2014-05-26 Thread Massimo Di Pierro
I now understand your problem better. Have you looked into? db.export_to_csv_file(file) db.import_from_csv_file(file,id_map={}) https://groups.google.com/forum/#!msg/web2py/P_lBv8JKiiQ/LESBbSGikw8J When importing from the file the id_map will recognize records from the uuid (assuming they have

Re: [web2py] How to select a column of numbers into a list so that I can manipulate the list

2014-05-26 Thread Carlos Costa
Try: nums3 = db(db.Measures).select( db.Measures.measure_value, orderby=db.Measures.measure_date_time).as_list() 2014-05-26 7:20 GMT-03:00 Syd Stewart : > Hi > > What is the simplest way please to select a column of figures (floats and > int) into a list, so I can manipulate the list e.g rando

Re: [web2py] Re: AWS Elastic Beanstalk installation Recipe

2014-05-26 Thread Massimo Di Pierro
They are automatic in web2py. They only problem you may incur in is that if you have multiple web2py instances accessing the server, multiple instances may initiate the migrations concurrently. Normally you handle this at the application level. You set migrate_enabled=False and when you deploy a

[web2py] How to select a column of numbers into a list so that I can manipulate the list

2014-05-26 Thread Syd Stewart
Hi What is the simplest way please to select a column of figures (floats and int) into a list, so I can manipulate the list e.g randomise the order nums3 = db(db.Measures).select( db.Measures.measure_value, orderby=db.Measures.measure_date_time) meannums= sum(nums3)/float(len(nums3)) This

[web2py] what is loader.js for?

2014-05-26 Thread chuan137
looking at my simple example from chrome developer's tool, I noticed loader.js doing something in the background. seems related with statistics or ads. can someone explain it to me? is it possible to disable it, because I want to do some performance measurements? thanks :) -- Resources: - htt

Re: [web2py] Re: AWS Elastic Beanstalk installation Recipe

2014-05-26 Thread kato
I do not know would be helpful, but there is recipe for Beanstalk. Please use the Google translater, because it is Japanese. http://docs1.erp2py.com/web2py_deploy/aws_beanstalk/aws_beanstalk.html#id4 2014年5月24日土曜日 12時47分38秒 UTC-3 Diogo Munaro: > > But how could I manage migrates? How could I m

[web2py] Issue when mixing links and editable/create/details whith join

2014-05-26 Thread Frederic F. MONFILS
Hello, Can you please help me with the following. I work with web2py for a few days. I have a table of products (name, description, unit_price) and orders (product, quantity). I want to show the orders in a grid with an additionnal column "Total" which is order.quantity * product.unit_price. I

[web2py] Requiring IS_LENGTH for fields that only show depending on jQuery hide/show

2014-05-26 Thread Kyle Vasconcellos
Hello, I've been searching through this group and was unable to find an answer to this, sorry if it has been answered before. I have a web page that has several forms that allow a user to enter contact information if they have any of the types of contacts(each form inserts data into a differen

[web2py] Internal error - after setting up the existing application on new web2py system

2014-05-26 Thread Nishmita Singhla
Hey Fellow programmers, My friend shared a web2py application with me and I am new to it. I recently downloaded web2py and installed on my system. However he was working on this project since few months now. I just wanted to learn from the application on howto use web2py and want to understan

Re: [web2py] bootstrap html attributes with web2py helpers

2014-05-26 Thread Anthony
> > TAG.BUTTON('Single toggle', _type='button', class='btn btn-primary', > data={'_data-toggle': 'button'} ) > > Note, the above would be data={'toggle': 'button'} or data=dict(toggle='button'). When using the "data" argument, you do not include the "data-" part of the attribute in the dict key

[web2py] Re: Error message: function not callable.

2014-05-26 Thread Anthony
"test" is a module, not a function. If there is a function named test inside the test module, then you would call it via test.test(). Or you could do "from test import test". Anthony On Monday, May 26, 2014 8:51:46 AM UTC-4, Maurice Waka wrote: > > My code in HTML view is like this: > > {{impor

Re: [web2py] Re: URL() for app home page

2014-05-26 Thread Quint van den Muijsenberg
Thanks. Sent from my HTC On May 26, 2014 1:28 PM, "Niphlod" wrote: > defaults are "default" and "index" but if a user chooses instead "foo" and > "bar" for his app you'll never know. > It should be a configurable parameter in your plugin. > > On Monday, May 26, 2014 11:11:43 AM UTC+2, Quint wrot

[web2py] Error message: function not callable.

2014-05-26 Thread Maurice Waka
My code in HTML view is like this: {{import test}} {{while True:}} {{test()}} {{pass}} But I get this error that: function test is not callable. What can I do to correct this? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Sourc

Re: [web2py] bootstrap html attributes with web2py helpers

2014-05-26 Thread Santiago Avendaño
2014-05-21 1:41 GMT-03:00 weheh : > Bootstrap uses some html attributes that won't work with web2py html > helpers. Is there a way to get web2py helpers to work with these attributes > or must we resort to raw html? > > For example, from the bootstrap doc: > > Single > toggle > > > Obviously TAG.

[web2py] Re: URL() for app home page

2014-05-26 Thread Niphlod
defaults are "default" and "index" but if a user chooses instead "foo" and "bar" for his app you'll never know. It should be a configurable parameter in your plugin. On Monday, May 26, 2014 11:11:43 AM UTC+2, Quint wrote: > > Hi, > > Is it possible to generate an URL for an applications home/in

[web2py] Re: D3.js calling Json in View

2014-05-26 Thread thehuman trashcan
Ah right - that makes sense. Thanks again ;-) On Saturday, 24 May 2014 03:55:39 UTC+1, Andrew W wrote: > > good work. data just refers to the dictionary. When you open up your > json file you just see a dictionary with one key that points to an array. > By saying data.dashboard_data you are th

[web2py] URL() for app home page

2014-05-26 Thread Quint
Hi, Is it possible to generate an URL for an applications home/index page without knowing what the default controler or function is? It's for a plugin so I do not know what the required controller and function are. I other words, how do I find out what the default controller and function is?

[web2py] Re: How to improve performance for db queries

2014-05-26 Thread Sarbjit
Hi Anthony, Problem of drop down's not working can be seen with the code/data posted in the original slice can be seen with the following changes. *Controller :* def index(): grid = {} if request.vars.maker_name: query = (db.Product.Maker_ID==request.vars.maker_name) gri