[web2py] Re: CMS question

2012-05-02 Thread Gour
On Wed, 2 May 2012 15:03:36 -0700 (PDT) Massimo Di Pierro wrote: > There is theme folder. you can simply put it in there. Tis is very nice...simplicity rox. ;) > This is where I am stuck. I am leaning towards using something like > @{widget.name} to embed stuff in page. This also looks simpl

[web2py] Re: Why Bottle and Web2py?

2012-05-02 Thread pbreit
If you are new to Python, the Web2py book includes a brief but good summary. It's quite possible that's enough to get started developing with Web2py. http://web2py.com/books/default/chapter/29/2 Then, go through the "Overview" which is a pretty approachable introduction that covers most of what

Re: [web2py] Re: Major Bug with form submissions

2012-05-02 Thread Bruce Wade
Nope the sessions are stored on FS I was having issues with DB sessions under a load balancer. On Wed, May 2, 2012 at 8:47 PM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > Are you by any chance storing sessions on DB? In this case the double form > submission prevention may fail becau

Re: [web2py] Re: Major Bug with form submissions

2012-05-02 Thread Massimo Di Pierro
Are you by any chance storing sessions on DB? In this case the double form submission prevention may fail because sessions in DB are not locked. Sessions in DB may cause race conditions. On Wednesday, 2 May 2012 22:35:31 UTC-5, Bruce Wade wrote: > > Yes you are probably right, I just found out a

Re: [web2py] Re: Major Bug with form submissions

2012-05-02 Thread Bruce Wade
Yes you are probably right, I just found out about the problem as I thought it was protected from the multiple posts. The process was designed this way as some people were having selected the wrong products or at least calling and saying they have, the process now prevents that 100%. Now I just ne

[web2py] Re: Why Bottle and Web2py?

2012-05-02 Thread Massimo Di Pierro
I would not use web2py with bottle for a production environment. It may be a little faster because bottle does less (for example does not handle sessions unless you want to) but I do not think enough users have tested wb2py+bottle to know there are no problems. I personally still consider it an

Re: [web2py] list:reference question about order and unordered reference id list

2012-05-02 Thread Massimo Di Pierro
Are you talking about the IS_IN_SET() validator? I need to see some code. There is nothing in DAL that cases this. It must be a validator. So it depends on what you are using. On Wednesday, 2 May 2012 17:29:35 UTC-5, Richard wrote: > > Ok DAL do will return [1,2,3] in case of the user has select

[web2py] Re: Options for making a chat application with web2py

2012-05-02 Thread Anthony
Looks like you could also go with SockJS and sockjs-tornado ( https://github.com/MrJoes/sockjs-tornado). There's also an initial sockjs-gevent library (https://github.com/sdiehl/sockjs-gevent). Anthony On Wednesday, May 2, 2012 10:19:24 PM UTC-4, Anthony wrote: > > if I understand gevent-socketi

[web2py] Re: Options for making a chat application with web2py

2012-05-02 Thread Anthony
> > if I understand gevent-socketio ( > https://github.com/abourget/gevent-socketio) correctly, it is the same > idea as Tornadio except that it replaces Tornado with Gevent. Is there any > alternative that does not utilize Socket.io? If not, is there any working > code making Socket.io (ver. 0

[web2py] Re: Options for making a chat application with web2py

2012-05-02 Thread mrtn
Thanks for the recommendation. if I understand gevent-socketio (https://github.com/abourget/gevent-socketio) correctly, it is the same idea as Tornadio except that it replaces Tornado with Gevent. Is there any alternative that does not utilize Socket.io? If not, is there any working code maki

Re: [web2py] Re: Major Bug with form submissions

2012-05-02 Thread Anthony
> > However when they get to step 6 and click multiple times because of server > lag or being impatient they get step 4 loaded again which would be an empty > form in the normal since, and if they click pay again they end up double > paying for the same order. > I see. I think that's a design

[web2py] Why Bottle and Web2py?

2012-05-02 Thread David Johnston
Can someone explain to me why someone would want to use web2py with Bottle? I am considering the combination. Is it for when you want to keep the app very simple but need some of the more advanced functionality of Web2py such as the DAL? I am trying to learn web programming and wonder if this

[web2py] Re: Options for making a chat application with web2py

2012-05-02 Thread Anthony
Another option is Socket.IO, gevent, and gevent-socketio ( https://bitbucket.org/Jeffrey/gevent-socketio). Anthony On Wednesday, May 2, 2012 6:48:41 PM UTC-4, mrtn wrote: > > > So I've done some research on developing a chat app with web2py. First, I > took a look of: > http://code.google.com/p

Re: [web2py] Re: Major Bug with form submissions

2012-05-02 Thread Bruce Wade
It would be an empty form like you say however I am using an order key in the url: http://127.0.0.1:8000/products/payment/7bd9c66e-1271-4af9-9d6e-33d75b57533c which cause preloaded data basically this is the final confirm / pay page on the order and once the user clicks pay it finalizes the order.

[web2py] Options for making a chat application with web2py

2012-05-02 Thread mrtn
So I've done some research on developing a chat app with web2py. First, I took a look of: http://code.google.com/p/web2py/source/browse/gluon/contrib/comet_messaging.py, and then a related tutorial using it: http://vimeo.com/38972256 (not in english, so I might have missed a thing or two). Wha

Re: [web2py] Re: Major Bug with form submissions

2012-05-02 Thread Anthony
> > You click multiple times fast it inserts 1 record but puts you back on the > same page showing the form without an error so the member thinks it was > never processed and then they click it a second time creating a second > record. > When I double click the submit button, I get back the in

[web2py] Re: Major Bug with form submissions

2012-05-02 Thread Anthony
It appears that when you double click a submit button, the browser sends the post request twice, but it decides to ignore the response to the first request. web2py processes the first request and sends the redirect response, but the browser ignores it because of the second request. web2py also

Re: [web2py] Re: Major Bug with form submissions

2012-05-02 Thread Bruce Wade
Correct. You click multiple times fast it inserts 1 record but puts you back on the same page showing the form without an error so the member thinks it was never processed and then they click it a second time creating a second record. Where as if you click it once (no multiple fast clicks) it cre

[web2py] Re: Using xmlrpc + executesql('.schema') for database dictionary

2012-05-02 Thread Bill Thayer
Ok, I used a different query found on http://stackoverflow.com/questions/8287758/sqlite-data-dictionary-tables-and-columns @service.xmlrpc @service.run def schema(table=None): "returns the table schema or database schema when argument is None" tables = db.executesql("SELECT name FROM s

Re: [web2py] list:reference question about order and unordered reference id list

2012-05-02 Thread Richard Vézina
Ok DAL do will return [1,2,3] in case of the user has select the first 3 element of the referenced table. What Choosen plugin return (and what I would to be stored in database field) could be [1,3,2] or [3,1,2] or what ever other order in which the user had pick those referenced elements. Choosen

[web2py] Re: Major Bug with form submissions

2012-05-02 Thread Massimo Di Pierro
I cannot reproduce this: def test(): db.define_table('person',Field('name')) form = SQLFORM(db.person) print 'processing...' form.process(formname='test') print db(db.person).select() print 'done!' if form.accepted: print 'accepted' import time time.slee

Re: [web2py] .update_or_insert not optimized!!

2012-05-02 Thread Bruno Rocha
Sorry! On Wed, May 2, 2012 at 6:59 PM, Anthony wrote: > He's using update_or_insert, not validate_and_update, so no validation > involved. > > Anthony > > > On Wednesday, May 2, 2012 5:43:43 PM UTC-4, rochacbruno wrote: >> >> obviously it will take more time, and the time depend on the validator

[web2py] Re: modify standard layout in web2py

2012-05-02 Thread Pystar
I just download the dev version on github, I find it extremely buggy, the forms dont display as they should, until you comment out lines 2 - 37 and 100 in web2py,css. Then it works flawlessly. On Wednesday, May 2, 2012 4:48:33 PM UTC+1, pbreit wrote: > > I would suggest updating to the latest ve

[web2py] Re: CMS question

2012-05-02 Thread Massimo Di Pierro
On Wednesday, 2 May 2012 13:48:23 UTC-5, Gour wrote: > > On Tue, 1 May 2012 13:35:28 -0700 (PDT) > Massimo Di Pierro > wrote: > > > This is what I have so far... > > Thank you very much for working on it. > > > - can clone any existing web site (copies, html, css, js, images and > > fixes

[web2py] Re: .update_or_insert not optimized!!

2012-05-02 Thread Anthony
> > if row: > > row.update_record(Precio=float(Precio),Fecha_Actualizacion=Fecha_Actualizacion) > > > db.G95.update_or_insert(db.G95.LongitudLatitud==LongitudLatitud, > LongitudLatitud=LongitudLatitud,Latitud=float(Latitud),Longitu

Re: [web2py] .update_or_insert not optimized!!

2012-05-02 Thread Anthony
He's using update_or_insert, not validate_and_update, so no validation involved. Anthony On Wednesday, May 2, 2012 5:43:43 PM UTC-4, rochacbruno wrote: > > obviously it will take more time, and the time depend on the validators > you are using and the total of fields you are updating. > > Do yo

[web2py] Major Bug with form submissions

2012-05-02 Thread Bruce Wade
Hi, We have a form for buying products, the form generated has the _formkey when clicking the submit button quick it does look like it doesn't submit however it still runs all the code in the accepted method and if you go to another page you can see that it really has completed the order. if ucas

Re: [web2py] .update_or_insert not optimized!!

2012-05-02 Thread Bruno Rocha
obviously it will take more time, and the time depend on the validators you are using and the total of fields you are updating. Do you have custom validators? (share the code) Of the built in validators, which you are using? how? Validating is a pre-processing and of course it will take some more

[web2py] Using xmlrpc + executesql('.schema') for database dictionary

2012-05-02 Thread Bill Thayer
I am writing the database definition for my documentation. Is there not a way to use xmlrpc to export the schema? Here was my first attempt: @service.xmlrpc def schema(table=None): "returns the table schema or database schema when argument is None" return db.executesql('.schema') The

Re: [web2py] Re: Eclipse highlighting errors in my web2py app

2012-05-02 Thread Sebastian E. Ovide
same here... On Sun, Mar 4, 2012 at 2:10 AM, Marcelo Zamperetti wrote: > Thanks. > I updated and using this code disappeared with the errors on 'FORM' > and 'INPUT'. 'db', 'request', 'session', 'response' still with error. > > On Mar 3, 8:20 pm, Anthony wrote: > > Which version of web2py are you

[web2py] .update_or_insert not optimized!!

2012-05-02 Thread puercoespin
In my app, .update_or_insert takes more time that code by hand. In a database with 5 tables and 60.000 records in total, the execution time was: without .update_or_insert: 0 minutes. 48 secons (Code) if combustible == G95: row=db(db.G95.LongitudLatitud==L

Re: [web2py] Eclipse and autocomplete

2012-05-02 Thread Sebastian E. Ovide
any luck with that ? On Mon, Apr 16, 2012 at 12:33 PM, szimszon wrote: > Okay. The > > if 0: > from gluon import * > > request, session, response, T, cache = current.request, current. > session, current.response, current.t, current. > cache > from gluon.dal import DAL > from gluo

Re: [web2py] list:reference question about order and unordered reference id list

2012-05-02 Thread Massimo Di Pierro
Richard, I am at a loss about this. the dal does not sort, nor does the validator. Can you show me and example to reproduce this sorting? On Thursday, 19 April 2012 16:14:50 UTC-5, Richard wrote: > > Issue 768 : Allow > insert of unsorted or

[web2py] Moving web2py app to other server

2012-05-02 Thread mmstud
Hi, I need to move my 2-3 years old web2py app to other server. Its pretty simple member and magazine subscriber database working over https. I'd like to move it to the other server, either dedicated or cloud environment. Whats should I do to get current sqlite database and application moved w

Re: [web2py] Re: quick SQL question

2012-05-02 Thread Larry Wapnitsky
Here's what I used: f3o = '(\d{1,3}\.\d{1,3}\.\d{1,3})' fullrange = {} rg1 = re.compile(f3o,re.IGNORECASE|re.DOTALL) for row in db(db.ips).select():#db.ips.ipaddress, db.ips.reportedby, db.ips.dateadded): m = rg1.findall(row.ipaddress) if not m[0] in fullrange

Re: [web2py] Re: RFC: web2py-based workflow engine

2012-05-02 Thread José Ricardo Borba
Hi, Ross, I think that the entire community is thinking and walking in the RIGHT way. And your effort is a prove of this. Congratulations. So, IMHO, I think that workflows are not only linear, but in some cases we have concurrent tasks to do. If your algorithm is compliant with this, I think that

[web2py] Re: SOLVED Re: Inline image generation with matplotlib

2012-05-02 Thread Larry Wapnitsky
More updated code: def barPlot(data): from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas from matplotlib.figure import Figure import cStringIO print data stream = cStringIO.StringIO() cx = data.keys() cy = data.values() fig

[web2py] Re: CMS question

2012-05-02 Thread Gour
On Tue, 1 May 2012 13:35:28 -0700 (PDT) Massimo Di Pierro wrote: > This is what I have so far... Thank you very much for working on it. > - can clone any existing web site (copies, html, css, js, images and > fixes all links) What about creating from the scratch? > What else would you like t

Re: [web2py] bootstrap in trunck - make it more look and feel like bootstrap

2012-05-02 Thread Daniel González Zaballos
And FYI, if any of you are using the jQuery Plugin "DataTable", there is a how-to to customizate the plugin with the bootstrap look for v1.x http://datatables.net/blog/Twitter_Bootstrap and for 2.x http://datatables.net/blog/Twitter_Bootstrap_2 El 02/05/12 20:32, Omi Chiba escribió: I was tes

[web2py] Re: SOLVED Re: Inline image generation with matplotlib

2012-05-02 Thread Larry Wapnitsky
I'm having difficulty with this. Here is my code: def barPlot(data): from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas from matplotlib.figure import Figure import cStringIO stream = cStringIO.StringIO() cx = data.keys() cy = data.values

[web2py] Re: bootstrap in trunck - make it more look and feel like bootstrap

2012-05-02 Thread Omi Chiba
I attached what I'm using. I re-enabled h1 - h6 and right, left, center. On Wednesday, May 2, 2012 1:32:09 PM UTC-5, Omi Chiba wrote: > > I was testing bootstrap in trunk. This is very nice !! > > Now, by default, the layout doesn't look like bootstrap because some of > css are referencing to web

Re: [web2py] Re: quick SQL question

2012-05-02 Thread Richard Vézina
You could try also this : a = [ row.ipaddress for row in db().select(db.ips.ipaddress) if row.ipaddress.split('.')[3] == '35' ] db(db.ips.ipaddress.belongs(tuple(a))).select(db.ips.ipaddress).first().ipaddress And for the HAVING clause I solve it earlier this week like this : list_value = [] cou

Re: [web2py] Re: quick SQL question

2012-05-02 Thread Richard Vézina
Maybe raw SQL?? Richard On Wed, May 2, 2012 at 10:54 AM, Larry Wapnitsky wrote: > Here's the actual query: > > http://pastie.textmate.org/3848916 > > SELECT SUBSTRING_INDEX( ipaddress, '.', 3 ) AS first_three_octet, count( * ) > AS ipCount, updated > > FROM ips > GROUP

Re: [web2py] Trouble using URLs to specify the language

2012-05-02 Thread Jonathan Lundell
On May 2, 2012, at 8:58 AM, Jonathan Lundell wrote: > On May 1, 2012, at 4:27 PM, ender72 wrote: >> Hi, >> I'm reading "web2py application development cookbook", >> page 277 >> "To specify a language for outgoing URLs using URL(), set request.lang to >> one of the supported languages [...]". >

[web2py] Re: ajax() function doesn't work properly (returns parent page)

2012-05-02 Thread Anthony
Try going to http://127.0.0.1:8000/inventoryapp/default/index/ (note the trailing "/"), and you should see the same problem. On the storeadmin page, the problem should go away if you exclude the trailing "/" from the URL. The problem is, in the call to ajax(), the URL is just 'echo'. Because it

[web2py] Re: matplotlib + web2py question

2012-05-02 Thread Larry Wapnitsky
Can this be done without storing the image if it's only needed the one time? On Wednesday, April 4, 2012 4:45:50 PM UTC-4, dancer` wrote: > > Thank you very much. > > One more thing - if I understand correctly this allows me to keep my data > buffer clean and not worry about overwriting plots. I

[web2py] Re: modify standard layout in web2py

2012-05-02 Thread Anthony
Skeleton uses a 960-pixel grid -- see http://code.google.com/p/web2py/source/browse/applications/welcome/static/css/skeleton.css?name=R-1.99.7#416. You could make it wider, but then you'd have to change all the widths you see in lines 425 to 511 as well. Note, the trunk version of web2py now u

[web2py] Re: modify standard layout in web2py

2012-05-02 Thread pbreit
I would suggest updating to the latest version of Web2py which uses Twitter Bootstrap for layout. Then instead of editing the CSS files, you simply declare classes in your HTML. http://twitter.github.com/bootstrap/ Example: 1. 2. ... 3. ... 4.

[web2py] Re: Custom register in html view

2012-05-02 Thread Anthony
One simple option is to set the "readable" and "writable" attributes of the fields you don't want to display to False. If you never want to show these fields on any form (even the profile form), you could set the attributes in the model file where you define Auth. If you only want to hide them f

[web2py] Re: quick SQL question

2012-05-02 Thread Larry Wapnitsky
Here's the actual query: http://pastie.textmate.org/3848916 SELECT SUBSTRING_INDEX( ipaddress, '.', 3 ) AS first_three_octet, count( * ) AS ipCount, updated FROM ips GROUP BY SUBSTRING_INDEX( ipaddress, '.', 3 ) HAVING ipCount = 254 ORDER BY ipCou

[web2py] Custom register in html view

2012-05-02 Thread Roma Asnani
Hello, I am trying to customize the view of register form. Register form by default has 5 fields. But problem is as we have register custom.widget.fieldname and these fields are around of 7 like first_name, last_name, email, password, registration_key, registration_id, reset_password_key. But

Re: [web2py] Trouble using URLs to specify the language

2012-05-02 Thread Jonathan Lundell
On May 1, 2012, at 4:27 PM, ender72 wrote: > Hi, > I'm reading "web2py application development cookbook", > page 277 > "To specify a language for outgoing URLs using URL(), set request.lang to one > of the supported languages [...]". The book (and the example documentation) are wrong; not sure ho

Re: [web2py] Re: RFC: web2py-based workflow engine

2012-05-02 Thread António Ramos
Please see my workflow framework in Lotus Notes, in the end of creating rules, i use graphviz to draw the graph of the workflow.. http://www.youtube.com/watch?v=zMNwqAtiFOw Also i manage centrally all rules and all apps point to my framework like a workflow as a service. Easier to manage. i think

[web2py] Re: RFC: web2py-based workflow engine

2012-05-02 Thread Ross Peoples
Cliff, Thanks for the feedback. I added the ability to name / title steps. I also added the ability to set priorities for workflows. It is assumed that when a step is complete, that step is already "done" and the next step in workflow is "new". Each step has an order_id to show which order the

[web2py] Re: Strange Python error.

2012-05-02 Thread Andrew Cooper
Okay... I figured it out. I feel kinda stupid. I've been using Python 3 too much apparently and I added "()" to the end of the method when Python 2 didn't like it. Andrew On Wednesday, May 2, 2012 1:41:01 PM UTC+2, Andrew Cooper wrote: > > Hi. I'm running into a weird error. I've got a fu

[web2py] Strange Python error.

2012-05-02 Thread Andrew Cooper
Hi. I'm running into a weird error. I've got a function in my controller that is simply calling a method on an object... like such. "pagemanager.setIndex()". When it calls this method it gets the error... "TypeError: setIndex() takes no arguments (1 given)". I'm looking at the code. I'm

[web2py] Re: CMS question

2012-05-02 Thread Ross Peoples
Looks pretty nice, Massimo. I look forward to trying it out and contributing to it.

[web2py] standalone app with web2py and pyqt

2012-05-02 Thread Giovanni Cavallin
Hello everybody. A very interesting way of building standalone app with web2py and wxPython is mentioned in the excellent "web2py Application Development Cookbook". Any similar receipt for pyqt-biased people? In the attached code you can see where I'm stuck. Any suggestion welcome. Thanks. Giovan

[web2py] modify standard layout in web2py

2012-05-02 Thread BlueShadow
Hi I'm using the standard layout one sidebar (left) and the middle colums for the content of my page. I like to modify the width(increase) of the columns but every change I did to the skeletton.css turned out in funny results. I can't use more colums. And I don't know why because even though they

[web2py] Re: CMS question

2012-05-02 Thread stefaan
> > It still needs some work before I can release it. > > Hmmm.. wondering now if we will see a sudden spike in web2py based phishing sites ;)

Re: [web2py] Re: File generation using web2py

2012-05-02 Thread RAHUL PRIYADARSI
Dear Mr.Brian, Thank you very much for you reply. " If you're worried about text alignment and other layout stuff, why not just use HTML templates" Well because I wish to get prints from them using dot matrix printer, which prints only txt files! But any way your response did help me very much. W

[web2py] Re: Escaping objects, and a book error...

2012-05-02 Thread encompass
permitted_tags... bingo that is what I was looking for. :) BR, Jason On Tuesday, May 1, 2012 8:23:36 PM UTC+3, Anthony wrote: > > I am looking how to escape particular items in html and want to know what >> is actually being escaped. Is there a list on this page somewhere to show >> me this? I

Re: [web2py] is it possible to communicate over webservices in web2py application?

2012-05-02 Thread Bruno Rocha
http://web2py.com/books/default/chapter/29/10 On Wed, May 2, 2012 at 3:54 AM, Amit wrote: > Hi, > I have to develop one web2py application which will run on one machine > (lets say SERVER), this machine will have MySql database also installed and > running. > Users can connect remotely to the We