Re: [web2py] Re: Web2py MVC and Qooxdoo

2011-10-20 Thread Phyo Arkar
I have not dig into JSON RPC of web2py and qooxdoo yet , Thank you soo much for giving me. I will try to replace with JSON RPC. Can you also list me advantages? Thanks. Phyo. On 10/20/11, omicron wrote: > Why not jsonrpc ? > > In web2py, i use decorator like this : > @service.jsonrpc > def i

Re: [web2py] Re: Qooxdoo + Web2py Based AJAX POS system, Released!

2011-10-20 Thread Phyo Arkar
Qooxdoo is very fast for me. What browser you use? and ur PC Specs? to change table size it just need to put inside resizable pane. and they will be resizable. I will separate two tables in different tabs , they shouldn't be inside one page i guess. On 10/20/11, greenpoise wrote: > ah ok..got it.

[web2py] Re: Error: Start as Windows Service

2011-10-20 Thread omicron
And if you change ip = '0.0.0.0' and comment the line 'interfaces' ? On 20 oct, 08:36, toan75 wrote: > Yes, i renamed options_std.py to options.py. > > import socket > import os > > ip = '192.168.0.1' > port = 80 > interfaces=[('0.0.0.0',80),('0.0.0.0',443,'ssl_private_key.pem','ssl_certif > ica

[web2py] Re: Web2py MVC and Qooxdoo

2011-10-20 Thread omicron
Wikipedia is you friend http://en.wikipedia.org/wiki/JSON-RPC and read this http://manual.qooxdoo.org/1.5.x/pages/communication/rpc.html On 20 oct, 09:47, Phyo Arkar wrote: > I have not dig into JSON RPC of web2py and qooxdoo yet , > > Thank you soo much for giving me. > > I will try to replace w

[web2py] Re: new features and new book sections/chapters

2011-10-20 Thread kesh
hey Robin am also just loving the new web2py.where can i get the docs for the new features please share the link

[web2py] Re: join and sum - display in view

2011-10-20 Thread Anthony
You can do sum(r.t_table.f_field for r in rows) On Thursday, October 20, 2011 1:27:02 AM UTC-4, andrej burja wrote: > > in controler i do join and sum > the result si rows object > in response._vars the sum is displayed in > SUM(t_table.f_field) > > what is the syntax to display that in view? >

[web2py] Re: join and sum - display in view

2011-10-20 Thread Anthony
Wait, do you mean that you did the sum as part of the select? What exactly did you return to the view (the whole Rows object), and how do you want to display the results? In general, you would access the sum "field" like rows[row_number]['SUM(t_table.f_field)']. Note, you can also assign the sum

[web2py] Best way to toggle db migration on production server?

2011-10-20 Thread Cliff
I have migrate=False on my production server. Any thoughts on the best way to toggle migrate to True, then immediately back when upgrading the model? As the application and user base grow I don't want to be manually editing table defs every time I change the model.

Re: [web2py] Re: join and sum - display in view

2011-10-20 Thread Martín Mulone
FROM THE BOOK Previously, you have used the count operator to count records. Similarly, you can use the sum operator to add (sum) the values of a specific field from a group of records. As in the case of count, the result of a sum is retrieved via the store object: 1. 2. 3. >>> sum = db.log.seve

[web2py] Re: join and sum - display in view

2011-10-20 Thread andrej burja
controller: def person(): sum = db.t_payement.f_value.sum() rows= db().select(db.t_person.f_name,db.t_person.f_surname,db.t_person.f_city, sum, groupby=db.t_person.id, left=db.t_payement.on(db.t_person.id==db.t_payement.f_person)) return dict(rows=rows) view: {{=TR(TD(row.t_pe

[web2py] error pages with proper status code

2011-10-20 Thread Grzegorz Śliwiński
Currently it's quite impossible to maintain custom error pages for HTTP 404 and still keep the proper response code If we redirect with routes_onerror we can get every error page dressed in overall page layout, but the response code is 200 OK, which isn't very good. If we do not redirect, we coul

[web2py] Re: join and sum - display in view

2011-10-20 Thread andrej burja
it si probably something starting with row._extra because rows object starts with , 't_person':

Re: [web2py] smartgrid setup

2011-10-20 Thread Manuele
On 20/10/2011 07:43, petrasadi wrote: Is it possible to set custom levels of access for view, edit and delete functions of the smartgrid? For example, can I allow all users to access "View", but only authenticated user to access "Edit"? Thank you what about to calculate the proper boolean value o

[web2py] Re: join and sum - display in view

2011-10-20 Thread Anthony
Try TD(row[sum]) or TD(row['SUM(t_payement.f_value)']) Anthony On Thursday, October 20, 2011 8:04:27 AM UTC-4, andrej burja wrote: > > controller: > > def person(): > sum = db.t_payement.f_value.sum() > rows= > db().select(db.t_person.f_name,db.t_person.f_surname,db.t_person.f_city,

[web2py] Re: Best way to toggle db migration on production server?

2011-10-20 Thread Anthony
db=DAL(..., migrate_enabled=True|False) enables or disables migrations completely, for the entire db. See the end of this section: http://web2py.com/book/default/chapter/06#Migrations. On Thursday, October 20, 2011 7:52:34 AM UTC-4, Cliff wrote: > > I have migrate=False on my production server.

[web2py] Re: Best way to toggle db migration on production server?

2011-10-20 Thread Cliff
Anthony, thanks for the pointer. What I'm looking for is some hint about how I can check if the model is at the latest and greatest level. Something like this: def some_function_to_see_if_we_need_to_migrate(): ## code goes here ## ?? migrate_enabled = some_function_to_see_if_we_need_t

[web2py] Re: Tell Web2py Groups: The Web2py Book 3rd Edition is long over due

2011-10-20 Thread Massimo Di Pierro
The web2py 4th ed is almost ready. Problem is that we keep addi features...and we need to decide on new welcome layout or we cannot make screenshots The packt book is in the hands of the publisher. Both book shout be available berofe christmas On Oct 19, 2:16 pm, joseph simpson wrote: > Just c

[web2py] comparing datatime Fields

2011-10-20 Thread Web2Py Freak
Dear All , i have a table called events which looks like this : db.define_table('events',Field('title'),Field('description','text'),Field('datetime','datetime',default=request.now,readable=False,writable=False)) and in my default/events.html i want to get the event the the datetime in it is le

[web2py] Re: Qooxdoo + Web2py Based AJAX POS system, Released!

2011-10-20 Thread Massimo Di Pierro
Where can we see it in action? On Oct 19, 5:24 pm, Phyo Arkar wrote: > Hello Web2py. > > As a practice for integrating Qooxdoo and web2py. I had created a > Point of Sales system for my wife's sushi shop. > > All people who have trouble integrating Qooxdoo, can base on my code. > It used multipl

[web2py] Re: error pages with proper status code

2011-10-20 Thread Massimo Di Pierro
Open a ticket this may be a bug On Oct 20, 7:05 am, Grzegorz Śliwiński wrote: > Currently it's quite impossible to maintain custom error pages for > HTTP 404 and still keep the proper response code > > If we redirect with routes_onerror we can get every error page dressed > in overall page layo

Re: [web2py] DAL: Selecting using the 'WHERE' clause

2011-10-20 Thread Sathvik Ponangi
@howsec, Thank you! On Thu, Oct 20, 2011 at 3:50 AM, howesc wrote: > google has been changing how indexing works so you need custom indexes less > often. if you app does not need them, then no index.yaml file will be > created during local usage. this is OK as long as you have tested each > qu

[web2py] Re: Best way to toggle db migration on production server?

2011-10-20 Thread Anthony
I don't know if it's worth running a function on every request to check for model changes when presumably such changes will be relatively infrequent. Why not just manually run a migration whenever you make a change? On Thursday, October 20, 2011 9:10:32 AM UTC-4, Cliff wrote: > > Anthony, thanks

[web2py] Re: Best way to toggle db migration on production server?

2011-10-20 Thread Massimo Di Pierro
Store in a file the date of your model file and check. When thy change migrate and update files On Oct 20, 6:52 am, Cliff wrote: > I have migrate=False on my production server. > > Any thoughts on the best way to toggle migrate to True, then > immediately back when upgrading the model? > > As th

Re: [web2py] comparing datatime Fields

2011-10-20 Thread Richard Vézina
I think you can't pass a instruction : Not working : db(db.event.datetime > request.now ).select(db.events.ALL) Try : is_now = request.now db(db.event.datetime > is_now ).select(db.events.ALL) or maybe you need time delta from python datetime... Richard On Thu, Oct 20, 2011 at 9:47 AM, Web

Re: [web2py] Web2py on android

2011-10-20 Thread Richard Vézina
Gears is deprecated and will no longer be available as of December 2011. Seems Google has drop it... Richard On Wed, Oct 19, 2011 at 1:10 PM, Sebastian E. Ovide < sebastian.ov...@gmail.com> wrote: > have you considered Google Gears ? >

[web2py] new web2py books (was Re: Tell Web2py Groups: The Web2py Book 3rd Edition is long over due)

2011-10-20 Thread Gour
On Thu, 20 Oct 2011 06:40:35 -0700 (PDT) Massimo Di Pierro wrote: > The web2py 4th ed is almost ready. Problem is that we keep addi > features...and we need to decide on new welcome layout or we cannot > make screenshots Is the 'code' for the book available for the public (if one wants to fix so

[web2py] Re: Error: Start as Windows Service

2011-10-20 Thread toan75
Still the same error.

[web2py] Re: Cannot see Plugins listed in Wizard

2011-10-20 Thread Matthew
Per Massimo's advice, I created an issue for this here: http://code.google.com/p/web2py/issues/detail?id=478 Please star it if you are experiencing the same issue. On Oct 19, 4:00 pm, Matthew wrote: > Here is a screenshot to illustrate,http://bit.ly/qL7VjAand a > previous thread about testing th

[web2py] Re: error pages with proper status code

2011-10-20 Thread Grzegorz Śliwiński
Where should I open the ticket? I've read about google code somewhere here but can't find the link neither on a web2py page nor here... On Oct 20, 3:51 pm, Massimo Di Pierro wrote: > Open a ticket this may be a bug > > On Oct 20, 7:05 am, Grzegorz ¦liwiñski wrote: > > > > > Currently it's quite

[web2py] Re: Best way to toggle db migration on production server?

2011-10-20 Thread Cliff
This also should work... Before pushing the code create a file using touch databases/ forcemigrate In db.py: import os.path db = DAL(migrate_enabled=os.path.exists('databases/forcemigrate') Then in the last model file xxx_cleanup.py if os.path.exists('databases/forcemigrate'): os.remove('dat

[web2py] Re: smartgrid setup

2011-10-20 Thread petrasadi
This is great. Thank you.

[web2py] Re: error pages with proper status code

2011-10-20 Thread Anthony
http://code.google.com/p/web2py/issues/list On Thursday, October 20, 2011 10:15:10 AM UTC-4, Grzegorz Śliwiński wrote: > > Where should I open the ticket? > I've read about google code somewhere here but can't find the link > neither on a web2py page nor here... > > On Oct 20, 3:51 pm, Massimo

[web2py] Re: comparing datatime Fields

2011-10-20 Thread Web2Py Freak
Dear Richard , its working now i just had db.event insted of db.events now its working will , thank you , Best Regards,

Re: [web2py] Web2py on android

2011-10-20 Thread Sebastian E. Ovide
I've just read about it http://gearsblog.blogspot.com/2011/03/stopping-gears.html it makes sense It looks like HTML5 is the way to go... On Thu, Oct 20, 2011 at 3:14 PM, Richard Vézina wrote: > Gears is > deprecated and > wil

[web2py] FluxFlex hosting

2011-10-20 Thread raven
free FluxFlex hosting seems to work well, except that it will not install a packed application. James

[web2py] Auth in MongoDB

2011-10-20 Thread Francisco Costa
Hi, we are in the process of converting our MySQL DB to MongoDB (via pymongo). We have already convert the auth_user table. Now we want to change the auth connection from auth = Auth(globals(), db) to auth = Auth(globals(), mongo) but we get this error: TypeError: 'Collection' object is not calla

[web2py] In a grid is it possible to represent a filename as a link to the file?

2011-10-20 Thread apple
In my model I have: db.customerfile.filename.represent= lambda filename, row: \ A(filename, _href=URL('download', args=row.file)) db.customerfile.file.readable=False db.customerfile.file.writable=False In a SQLFORM this shows the filename as a link wh

Re: [web2py] Re: Tell Web2py Groups: The Web2py Book 3rd Edition is long over due

2011-10-20 Thread joseph simpson
Thanks for the update On Thu, Oct 20, 2011 at 6:40 AM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > > The web2py 4th ed is almost ready. Problem is that we keep addi > features...and we need to decide on new welcome layout or we cannot > make screenshots > > The packt book is in

[web2py] Re: join and sum - display in view

2011-10-20 Thread Anthony
On Thursday, October 20, 2011 8:43:10 AM UTC-4, Anthony wrote: > > Try > > TD(row[sum]) > > Actually, the above will only work if the controller returns 'sum' in the dictionary -- otherwise it will be undefined in the view.

[web2py] SOLVED join and sum - display in view

2011-10-20 Thread andrej burja
this one works TD(row['SUM(t_payement.f_value)']) and also this TD(row._extra['SUM(t_payement.f_value)'])

[web2py] Re: Qooxdoo + Web2py Based AJAX POS system, Released!

2011-10-20 Thread greenpoise
I was using firefox..my laptop is pretty old...using linux on a 4 gb ram dual core laptop.. it was the scrolling that just dragged On Oct 20, 12:51 am, Phyo Arkar wrote: > Qooxdoo is very fast for me. What browser you use? and ur PC Specs? > to change table size it just need to put inside res

[web2py] Template var doesn't appear with leading zero

2011-10-20 Thread Vinicius Assef
Hi guys, I'm facing a little problem here. In my view I have: {{n=3}} {{='%2d' % n}} This shows the number " 3" (a space before the number 3). I expected it shows "03" (a leading zero). Is it the way it should work? I think variable interpolation should mantain its contents when printed to the u

Re: [web2py] Template var doesn't appear with leading zero

2011-10-20 Thread Richard Vézina
Try '%002d'%n Richard On Thu, Oct 20, 2011 at 2:43 PM, Vinicius Assef wrote: > Hi guys, > I'm facing a little problem here. > > In my view I have: > {{n=3}} > {{='%2d' % n}} > > This shows the number " 3" (a space before the number 3). I expected > it shows "03" (a leading zero). > > Is it the w

[web2py] Re: SOLVED join and sum - display in view

2011-10-20 Thread Massimo Di Pierro
Please use Anthony's advice: row[sum] Do not use _extra because it is deprecated and do not use row['SUM(t_payement.f_value)'] because the syntax may not work with every database engine. On Oct 20, 12:17 pm, andrej burja wrote: > this one works > > TD(row['SUM(t_payement.f_value)']) > > and

[web2py] Ajax sample function does not work on Update form

2011-10-20 Thread Franklin Freitas
I am using a form very similar to the Ajax sample on chapter 3 to search for customers and once you see the results, you click on the record you want so customer id and name are added to the form fields on my main processing form. This works fine on my "add new" records form. I have another page t

Re: [web2py] Template var doesn't appear with leading zero

2011-10-20 Thread Richard Vézina
Sorry, '%03d'%n 00n '%02d'%n 0n http://stackoverflow.com/questions/134934/display-number-with-leading-zeros Richard On Thu, Oct 20, 2011 at 3:17 PM, Richard Vézina wrote: > > Try > '%002d'%n > > Richard > > > On Thu, Oct 20, 2011 at 2:43 PM, Vinicius Assef wrote: > >> Hi guys, >> I'm facin

[web2py] uploading files to the database

2011-10-20 Thread apple
I am now experimenting with uploading files to the database but have not been successful and have some questions: 1) Field('file','upload', uploadfield='fileblob'), I understand this is supposed to create the fileblob field automatically. However it does not seem to do this for me. Does it not wo

[web2py] Re: Ajax sample function does not work on Update form

2011-10-20 Thread Anthony
Can you show some code? On Thursday, October 20, 2011 3:21:12 PM UTC-4, Franklin Freitas wrote: > > I am using a form very similar to the Ajax sample on chapter 3 to > search for customers and once you see the results, you click on the > record you want so customer id and name are added to the f

[web2py] Re: uploading files to the database

2011-10-20 Thread Anthony
On Thursday, October 20, 2011 3:57:24 PM UTC-4, apple wrote: > > I am now experimenting with uploading files to the database but have > not been successful and have some questions: > > 1) Field('file','upload', uploadfield='fileblob'), > > I understand this is supposed to create the fileblob fie

[web2py] Re: Best way to toggle db migration on production server?

2011-10-20 Thread pbreit
Reminds me of a recent inquiry about the possibility of more visibility and control of migrations. I'm curious if other frameworks have interesting migration capabilities? Like would it be possible to review a migration before it is performed? Would it be possible to explicitly run that migrati

Re: [web2py] Template var doesn't appear with leading zero

2011-10-20 Thread Vinicius Assef
I cannot believe I made this mistake! :-O Sure it worked, Richard. Sorry, guys. On Thu, Oct 20, 2011 at 5:23 PM, Richard Vézina wrote: > Sorry, > '%03d'%n > 00n > '%02d'%n > 0n > http://stackoverflow.com/questions/134934/display-number-with-leading-zeros > > Richard > On Thu, Oct 20, 2011 at 3:

[web2py] Re: Error: Start as Windows Service

2011-10-20 Thread Brian M
Check that you've got the pywin32 module installed. http://pypi.python.org/pypi/pywin32/214 ~Brian

[web2py] @auth.requires_login problem

2011-10-20 Thread brushek
Hello, I craated test app, in default.py added above index (and no other changes in project): @auth.requires_login() def index(): ... After logging in, and going to index I get folowing error: Traceback (most recent call last): File "/home/users/brushek/web2py/gluon/restricted.py", line 192,

[web2py] Plugin files disappearing during editing

2011-10-20 Thread Matthew
I am trying to create a plugin. Is there any reason that files prefixed with "plugin_" do not show up when you restart web2py to edit them again? http://img7.imagebanana.com/img/wcibbzg2/Selection_010.png Thanks, Matthew

[web2py] Re: Plugin files disappearing during editing

2011-10-20 Thread Anthony
Plugin files are shown separately -- scroll to the bottom of the page, and you should see the plugins listed in the Plugins section. Click on one, and you'll get a separate page for the plugin files.

[web2py] Re: Plugin files disappearing during editing

2011-10-20 Thread Matthew
Thank you! On Oct 20, 7:47 pm, Anthony wrote: > Plugin files are shown separately -- scroll to the bottom of the page, and > you should see the plugins listed in the Plugins section. Click on one, and > you'll get a separate page for the plugin files.

[web2py] Navigation links with Plugin & CRUD

2011-10-20 Thread Matthew
Is there any way to change the default behavior of the CRUD select view when using a plugin? Right now, I have to navigate to the select screen with ".../plugin_wmgraph/data...", but the generated links on the page point to ".../default/data...", so an error occurs when clicking them. http://img6.

[web2py] Learning to test

2011-10-20 Thread Joseph Jude
All, I have been looking into automated testing of web2py. I have looked at the below pages: http://web2py.com/AlterEgo/default/show/260 http://packages.python.org/web2py_utils/test_runner.html http://www.web2pyslices.com/slices/take_slice/67 http://ncdegroot.blogspot.com/2011/09/web2py-automate-

[web2py] Re: Error: Start as Windows Service

2011-10-20 Thread toan75
I have not tried it but it will run. Thank very much.

[web2py] Re: @auth.requires_login problem

2011-10-20 Thread Massimo Di Pierro
This is not fixed in trunk. Please check it. On Oct 20, 4:45 pm, brushek wrote: > Hello, > > I craated test app, in default.py added above index (and no other > changes in project): > > @auth.requires_login() > def index(): > ... > > After logging in, and going to index I get folowing error: > >

[web2py] Re: Navigation links with Plugin & CRUD

2011-10-20 Thread Massimo Di Pierro
Do not use crud.select. use SQLFORM.grid instead. So much better. On Oct 20, 8:34 pm, Matthew wrote: > Is there any way to change the default behavior of the CRUD select > view when using a plugin? Right now, I have to navigate to the select > screen with ".../plugin_wmgraph/data...", but the gen

[web2py] a couple of related questions

2011-10-20 Thread niknok
I have a person table[1] with a parent field with a clickable representation view of the record. If I put this on a grid and click on the link, I get a "not authorized" error message. I thought I need to pass the signature so I can make it viewable. (This works fine if parameter user_signature=Fals

[web2py] Re: Navigation links with Plugin & CRUD

2011-10-20 Thread greenpoise
I keep reading SQLFORM.grid. Any example out there with the different options? thanks Dan On Oct 20, 7:35 pm, Massimo Di Pierro wrote: > Do not use crud.select. use SQLFORM.grid instead. So much better. > > On Oct 20, 8:34 pm, Matthew wrote: > > > > > > > > > Is there any way to change the

[web2py] Re: Best way to toggle db migration on production server?

2011-10-20 Thread Cliff
With Ruby on Rails you can roll migrations back. I think you can even roll migrations back to a prior level, not just the last one. Every migration has its own log file. Relying on hazy memory here, but I think Rails puts the SQL for the migration in the log file along with the SQL to roll back

[web2py] Re: Navigation links with Plugin & CRUD

2011-10-20 Thread Cliff
The very long thread (~115 posts) about grid and smartgrid is the best source. Sorry, don't recall the title. On Oct 20, 10:57 pm, greenpoise wrote: > I keep reading SQLFORM.grid. Any example out there with the different > options? > > thanks > > Dan > > On Oct 20, 7:35 pm, Massimo Di Pierro >

[web2py] Re: Navigation links with Plugin & CRUD

2011-10-20 Thread greenpoise
got it..thanks On Oct 20, 8:04 pm, Cliff wrote: > The very long thread (~115 posts) about grid and smartgrid is the best > source.  Sorry, don't recall the title. > > On Oct 20, 10:57 pm, greenpoise wrote: > > > > > > > > > I keep reading SQLFORM.grid. Any example out there with the different

[web2py] SQLFORM.grid / Powergrid

2011-10-20 Thread greenpoise
I have a few questions regarding the grids. 1. Is SQLFORM.grid the implementation of Powergrid? meaning, does SQLFORM.grid has all the features of Powergrid? 2. Is there an option to edit a value on the fly rather than using an edit button? sort of like edit in place pyslice. 3. Is search as you

[web2py] Found a bug: XMLRPC with basic authorization fails

2011-10-20 Thread Robin Marshall
Hi, Just wanted to say that we found a bug in 1.99.2 when using XMLRPC services with the @auth.requires_login decorator using basic authentication. It looks like some code was refactored out of requires_login into a generic requires method which might be the cause of the problem. A quick hack wa

[web2py] Re: DAL: Selecting using the 'WHERE' clause

2011-10-20 Thread Sathvik Ponangi
Am I getting this error because of a timeout on the Appengine SDK? INFO 2011-10-21 03:43:14,782 dal.py:3399] 1 INFO 2011-10-21 03:43:14,786 gaehandler.py:72] Request: > 64720.00ms/64719.96ms (real time/cpu time) INFO 2011-10-21 03:43:14,913 recording.py:371] Saved; key: > __ap

[web2py] Hide menu until after authentication.

2011-10-20 Thread Mike Veltman
Gentle people, First a remark I started playing with SQLFORM.grid and it was very ugly, until I did throw away my application and recreated it with the wizard, and then it was fine. ;-) Second, I would like my response.menu to show up after authentication. What is the most elegant way of doi

[web2py] Re: FluxFlex hosting

2011-10-20 Thread Lazarof
https://github.com/nus/web2py-for-fluxflex/blob/master/README.md On Oct 20, 8:07 pm, raven wrote: > free FluxFlex hosting seems to work well, > except that it will not install a packed application.   James