Re: [web2py] Re: What if Massimo got hit by a Bus?

2015-07-15 Thread Michele Comitini
Massimo recently had a little accident with the byke, the consequence was a huge increase in his contributions. Not that I am wishing him an accident with a truck, but if we make a linear projection ;-) 2015-07-15 7:00 GMT+02:00 Kiran Subbaraman : > Well, someone couldn't let reassurances st

[web2py] Always sending a custom HTTP header regardless of error or success

2015-07-15 Thread Saifuddin Rangwala
Hi, I would like to a custom http header "X-APP-VERSION" alongwith all the web2py responses. For 200 OK I do it using code below in the models file: response.headers["X-APP-VERSION"] = config.version However, I would like to send this header for all error cases as well including the u

[web2py] Re: Another online store based in web2py+ractive+stripe

2015-07-15 Thread icodk
I think www.tindie.com has a very nice interface. Specifically, where you can add to cart you can also inc/dec quantity On Tuesday, July 14, 2015 at 6:44:29 PM UTC+2, Massimo Di Pierro wrote: > > I made another simple online store: https://github.com/mdipierro/estore3 > > Can you help me test, su

[web2py] Temp file with own name

2015-07-15 Thread reddyreddy
Hello all, I have a script which writes the output to a file. Now I want to make this file temporary that means when I close it it should deleted..but I do not want to change the name of the file. How can I do this? Thanks in advance.q -- Resources: - http://web2py.com - http://web2py.com/book

[web2py] Web2py and OODBMS?

2015-07-15 Thread Esteban Bulutsuzku
Hello, I am an experienced OOP programmer. I -fortunately- do not use relational technology anymore, so I won't plan get back to write SQL/RDBMS/ORM stuff (I really don't care if the relational math theory + ISO/IEC 9075-1 backs the stack). This could sound like a rare use case for you, but it

Re: [web2py] Re: Query and Manage profiles

2015-07-15 Thread Daniel Dos Santos Guilhermino
Dear Richard, Thank you for your comment, I just read and saw website Odoo, Good suggest! I had an idea when a I visit Odoo, Is possible We adapt CRM for purchase department, precisely for quotes? Let explain my idea: I will create a user for the buyer of the Company. It will request that the

[web2py] websocket_messaging.py does not work out of the box

2015-07-15 Thread jackson . read
I tried to setup a simple websocket to try and learn the concept so I can use it in my app. I took the instructions in websocket_messaging.py and built the following minimal app. I am on debian squeeze using chromium and tornado 4.2.. I started websocket_messaging.py as per the instructions: *p

[web2py] Re: Query and Manage profiles

2015-07-15 Thread Daniel Dos Santos Guilhermino
Dear Stifan, Thank you for your comment, I will try to follow your suggestion, using SQLFORM.grid (CRUDS). Where are you from, China or Japan? Best regards, On Tuesday, July 14, 2015 at 9:46:15 AM UTC-3, 黄祥 wrote: > > I would like to deploy the Company to work a form " query" where employees

Re: [web2py] Re: prettydate ago is not translated

2015-07-15 Thread Maxim Hrustalev
Don't you try ti access attribute 'year' of your prettydated expire_date somewhere in your code? On Sunday, July 12, 2015 at 12:10:09 PM UTC+3, icodk wrote: > > Thanks Maxim, > I tried : > db.place.expire_date.represent= lambda value,row: prettydate(value,T=T) > The problem is that I get the foll

Re: [web2py] Re: using PyCharm

2015-07-15 Thread Massimo Di Pierro
Oh! I thought you were talking a web2py issue. Our turnaround is much faster that that. That is a PyCharm issue. Next time if file an issue with them about web2py, you may want to also open a web2py issue so we can be proactive and help them resolve it. On Tuesday, 14 July 2015 17:34:28 UTC-5,

[web2py] Re: questions about autocomplete widget

2015-07-15 Thread Massimo Di Pierro
On Tuesday, 14 July 2015 19:34:50 UTC-5, 黄祥 wrote: > > is it possible to have the query in sqlform.autocomplete.widgets? > *e.g. no error occured but the result is not expected* > table.customer.widget = SQLFORM.widgets.autocomplete(request, > db.customer.keywords, id_field = db.customer.id, db =

[web2py] Re: websocket_messaging.py -t question

2015-07-15 Thread Massimo Di Pierro
This logic was added somewhat recently and I did not test it myself but reading the code it seems it should work this way: 1) run websocket_messaging.py -t to enable the token message 2) post a message to the /token API with a message containing a made up UUID token. This will create a token on

[web2py] Re: Another online store based in web2py+ractive+stripe

2015-07-15 Thread Massimo Di Pierro
Oops I added the missing file. private/appconfig.ini On Tuesday, 14 July 2015 18:50:58 UTC-5, 黄祥 wrote: > > great. btw it raise an error : > Error snapshot [image: help] > > > >

[web2py] Re: Another online store based in web2py+ractive+stripe

2015-07-15 Thread Massimo Di Pierro
You can do it here. The more times you click the more items you put the in the cart. If you edit the numbers in cart, everything changes in realtime without need to submit. On Wednesday, 15 July 2015 03:29:02 UTC-5, icodk wrote: > > I think www.tindie.com has a very nice interface. Specifically,

[web2py] Re: Invalid password reset

2015-07-15 Thread Massimo Di Pierro
Can you please post the list of steps to reproduce? We will fix it asap. On Wednesday, 15 July 2015 01:42:39 UTC-5, Annet wrote: > > > This would happen if the user has already clicked the link. >> > > This also happens when clicking the link for the very first time, > I noticed this after upgradi

[web2py] Re: questions about autocomplete widget

2015-07-15 Thread 黄祥
> > is it possible to have the query in sqlform.autocomplete.widgets? >> *e.g. no error occured but the result is not expected* >> table.customer.widget = SQLFORM.widgets.autocomplete(request, >> db.customer.keywords, id_field = db.customer.id, db = >> db(db.customer.keywords.contains(request) )

[web2py] Re: Always send a custom HTTP header with web2py responses

2015-07-15 Thread Massimo Di Pierro
Good point. Please open a ticket. There is no way to do this now. On Wednesday, 15 July 2015 01:52:55 UTC-5, Saifuddin Rangwala wrote: > > Hi, > > I would like to a custom http header "X-APP-VERSION" alongwith all > the web2py responses. > > For 200 OK I do it using code below in the mode

[web2py] Re: Temp file with own name

2015-07-15 Thread Massimo Di Pierro
https://docs.python.org/2/library/tempfile.html On Wednesday, 15 July 2015 03:29:03 UTC-5, reddyreddy wrote: > > Hello all, > > I have a script which writes the output to a file. > Now I want to make this file temporary that means when I close it it > should deleted..but I do not want to change

[web2py] Re: Web2py and OODBMS?

2015-07-15 Thread Massimo Di Pierro
web2py include pydal and pydal is an API for accessing RDBMs and some NoSQL engines. This is not your use case. web2py does not include a OODBM but nothing prevent you from accessing one and take advantage of all the other features. You simply would not do it through the DAL. The reason is that

[web2py] Re: Invalid password reset

2015-07-15 Thread Annet
> Can you please post the list of steps to reproduce? We will fix it asap. > I extended the auth_user table with username: auth.settings.extra_fields['auth_user']= [ Field('username', length=32, default='', requires=[IS_LENGTH(32, error_message='Lengte overschreidt 32 tekens'), IS_NOT_EMPTY

[web2py] bootstrap select writable = False

2015-07-15 Thread Annet
When I set writable = False on a field that is being rendered as a select it does not comply with Bootstraps disabled state for disabled selects: http://getbootstrap.com/css/#forms-control-disabled Disabled select menu Disabled select What I get instead is: Disabled select menu

[web2py] Re: websocket_messaging.py -t question

2015-07-15 Thread Samuel Sowah
On Wednesday, July 15, 2015 at 8:53:35 AM UTC, Massimo Di Pierro wrote: > > This logic was added somewhat recently and I did not test it myself but > reading the code it seems it should work this way: > > 1) run websocket_messaging.py -t to enable the token message > 2) post a message to the /t

[web2py] Re: bootstrap select writable = False

2015-07-15 Thread Anthony
When you set writable=False, web2py does not disable the form input element, but instead just writes the value in place of the input element. Instead, you can leave writable=True and manually set the select widget to be disabled: db.mytable.myfield.widget = lambda f, v: SQLFORM.widgets.options.

[web2py] Re: Always send a custom HTTP header with web2py responses

2015-07-15 Thread Anthony
There isn't an easy way to do it, so go ahead and open a ticket, but I think you can do it by creating a custom error handler (though will fail in case the error handler itself fails) or via external WSGI middleware

Re: [web2py] Re: Web2py and OODBMS?

2015-07-15 Thread Michele Comitini
Of course one can use the usual postgresql which an ORDBM... pyDAL does not (yet) support inheritance at DDL level, but can be used at DML level for most needs. 2015-07-15 11:09 GMT+02:00 Massimo Di Pierro : > web2py include pydal and pydal is an API for accessing RDBMs and some > NoSQL engines.

[web2py] module vs plugin

2015-07-15 Thread Fabiano Almeida
Hi @ll! I think about modularize my aplication. Then the question is: module or plugin? What's the difference? Thanks! Fabiano. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/l

Re: [web2py] Re: Another online store based in web2py+ractive+stripe

2015-07-15 Thread Michele Comitini
Massimo have you taken in account to use http://satchless.com/ ? It has a fairly complete API and it's easy to couple with DAL... 2015-07-15 10:55 GMT+02:00 Massimo Di Pierro : > You can do it here. The more times you click the more items you put the in > the cart. If you edit the numbers in ca

[web2py] Re: module vs plugin

2015-07-15 Thread Anthony
It's not module *or* plugin -- a plugin can contain modules. A plugin is any subset of an application's files. If you want to "modularize" the models, views, and/or controllers of an app, then you would need to create a plugin. You can also move a lot of functionality to modules (which get impo

[web2py] Re: Always send a custom HTTP header with web2py responses

2015-07-15 Thread Saifuddin Rangwala
Yep thanks, I have created a ticket for the same. A good way of achieving this helps with better error handling. On Wed, Jul 15, 2015 at 8:02 PM, Anthony wrote: > There isn't an easy way to do it, so go ahead and open a ticket, but I > think you can do it by creating a custom error handler >

Re: [web2py] Re: module vs plugin

2015-07-15 Thread Fabiano Almeida
Hi Anthony, I think add plugins to build a system. Eg customer registration, product registration, shopping trolley, service order, reports, etc. thks Fabiano. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://c

[web2py] Web2py is "Badly designed framework" and "Does not scale"

2015-07-15 Thread Matheus Cardoso
In Slant.com we have some Python Frameworks under criticism. One of them is web2py. But I got stunned when I saw two great cons: - Badly designed framework -

[web2py] Web2py is "Badly designed framework" and "Does not scale"

2015-07-15 Thread Anthony
I don't see where the second con is attributed to Bruno - no source is listed for that one. -- 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

Re: [web2py] Web2py is "Badly designed framework" and "Does not scale"

2015-07-15 Thread António Ramos
Look in the right side under activity . You will see Bruno saying it... Am i wrong too ? 2015-07-15 18:30 GMT+01:00 Anthony : > I don't see where the second con is attributed to Bruno - no source is > listed for that one. > > -- > Resources: > - http://web2py.com > - http://web2py.com/book (Do

Re: [web2py] Web2py is "Badly designed framework" and "Does not scale"

2015-07-15 Thread Samuel Sowah
On Wednesday, July 15, 2015 at 5:54:13 PM UTC, Ramos wrote: > > Look in the right side under activity . > You will see Bruno saying it... > That's an upvote, doesn't say he's not the source... > Am i wrong too ? > > 2015-07-15 18:30 GMT+01:00 Anthony >: > >> I don't see where the second con

Re: [web2py] Web2py is "Badly designed framework" and "Does not scale"

2015-07-15 Thread Anthony
On Wednesday, July 15, 2015 at 1:54:13 PM UTC-4, Ramos wrote: > > Look in the right side under activity . > You will see Bruno saying it... > Got it -- that is not visible in the mobile view. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/

[web2py] Re: websocket_messaging.py -t question

2015-07-15 Thread Massimo Di Pierro
The -t options does not take an argument. There are two security mechanisms. The key and the token. The key is unique and required. It is used to encrypt communications bewteen the web2py server and the websocket server. You set a key with -k . The token mechanism is optional. It is enabled wit

[web2py] Re: Web2py is "Badly designed framework" and "Does not scale"

2015-07-15 Thread Massimo Di Pierro
I posted a short rebuttal of those two negative points. It would help if somebody but me were to post sone positive comments. No need to target negative comments. Target prospective readers who may now know what web2py is. On Wednesday, 15 July 2015 12:20:11 UTC-5, Matheus Cardoso wrote: > > In

[web2py] Re: Web2py is "Badly designed framework" and "Does not scale"

2015-07-15 Thread Anthony
On Wednesday, July 15, 2015 at 1:20:11 PM UTC-4, Matheus Cardoso wrote: > > In Slant.com > > we > have some Python Frameworks under criticism. One of them is w

[web2py] Re: websocket_messaging.py -t question

2015-07-15 Thread Dave S
On Wednesday, July 15, 2015 at 11:40:08 AM UTC-7, Massimo Di Pierro wrote: > > [...] > Each client must have a unique token and pass it in the ws:// connection > string when it connects. If it up to you to make up tokens. They can be > random numbers, uuid, etc. You have to give a token to the

[web2py] Implementing hashids

2015-07-15 Thread Octavian G
Hello, I'm using hashids . I'm generating my own forms, without SQLFORM. My tables have a Field.Virtual('hashid', lambda row: current.hashids.encrypt(row.table.id)). I'd like to be able to use SQLFORM, so that a field's IS_IN_DB validator would help generate a form

[web2py] Re: websocket_messaging.py -t question

2015-07-15 Thread Dave S
On Wednesday, July 15, 2015 at 12:24:08 PM UTC-7, Dave S wrote: > > > > On Wednesday, July 15, 2015 at 11:40:08 AM UTC-7, Massimo Di Pierro wrote: >> >> [...] >> > Each client must have a unique token and pass it in the ws:// connection >> string when it connects. If it up to you to make up tok

[web2py] web2py.js websocket bug?

2015-07-15 Thread Samuel Sowah
I believe this is a bug. Please confirm what I'm thinking or correct me if I'm wrong. The web2py_websocket function in web2py.js takes 4 parameters (2 optional, onopen and onclose) web2py_websocket: function (url, onmessage, onopen, onclose) { if("WebSocket" in window) { var ws = ne

[web2py] Re: Web2py is "Badly designed framework" and "Does not scale"

2015-07-15 Thread rochacbruno
I edited my answer, I included more information and clarification about my CON points! http://www.slant.co/topics/426/viewpoints/4/~what-are-the-best-general-purpose-python-web-frameworks-usable-in-production-sites~web2py#3 On Wednesday, July 15, 2015 at 2:20:11 PM UTC-3, Matheus Cardoso wrote:

[web2py] listen on all interfaces 0.0.0.0 or specific interface - how ?

2015-07-15 Thread Gary Cowell
I'm trying to get the web2py.py to listen on all interfaces in development. I'm sure I've done this before. I know I have. But I can't make this work at all now. I get this: $ ./web2py.py --ip 10.2.1.15:8000 web2py Web Framework Created by Massimo Di Pierro, Copyright 2007-2015 Version 2.11.2-st

[web2py] Re: Changing order of auth_user fields

2015-07-15 Thread Mat Miles
Has this functionality been added? On Wednesday, October 22, 2014 at 8:24:05 PM UTC-6, Massimo Di Pierro wrote: > > Please open a ticket about this. There is not a way but there should be. > > On Friday, 17 October 2014 16:50:37 UTC-5, Spokes wrote: >> >> I've added a middle name field to *auth_us

[web2py] Re: redirecting app to another server

2015-07-15 Thread ari
it is interesting that not even the poeple who created the routes, nor the creator of web2py, doesn't have a clue how to redirect an app to another server. maybe de logic behind the app is usefull? vineri, 10 iulie 2015, 02:32:28 UTC+3, ari a scris: > Hello! > > I have an web2py server with mul

Re: [web2py] Re: module vs plugin

2015-07-15 Thread Vikash Sharma
Module defines grouping logic at one place, the way you want to design it. Example, all customer database, order details, vendor details and respective operation are organised & implemented separately. Read more about cohesion and coupling on wiki Plugins is more like a features you can attach to

Re: [web2py] Re: prettydate ago is not translated

2015-07-15 Thread icodk
No I don't. I only refers to it as in the line below db.place.expire_date.represent= lambda value,row: prettydate(value,T=T) On Wednesday, July 15, 2015 at 10:29:03 AM UTC+2, Maxim Hrustalev wrote: > > Don't you try ti access attribute 'year' of your prettydated expire_date > somewhere in your c

[web2py] Re: websocket_messaging.py -t question

2015-07-15 Thread Massimo Di Pierro
Yes and no. websocket_messaging is designed to deliver messages from the server to the clients. Clients communicate by sending messages to the web2py server which then sends to the websocket_messaging for delivery. The process of posting messages does not require a connection to the websocket_m

[web2py] Re: web2py.js websocket bug?

2015-07-15 Thread Massimo Di Pierro
you may be right. Will check asap. Please open a ticket. On Wednesday, 15 July 2015 18:17:00 UTC-5, Samuel Sowah wrote: > > I believe this is a bug. Please confirm what I'm thinking or correct me if > I'm wrong. > The web2py_websocket function in web2py.js takes 4 parameters (2 optional, > onope

[web2py] Re: listen on all interfaces 0.0.0.0 or specific interface - how ?

2015-07-15 Thread Massimo Di Pierro
This is not valid syntax: /web2py.py --ip 10.2.1.15:8000 #WRONG supposed to be /web2py.py --ip 10.2.1.15 --port 8000 On Wednesday, 15 July 2015 18:36:58 UTC-5, Gary Cowell wrote: > > I'm trying to get the web2py.py to listen on all interfaces in development. > > I'm

[web2py] Re: web2py.js websocket bug?

2015-07-15 Thread Samuel Sowah
On Wednesday, July 15, 2015 at 11:46:38 PM UTC, Massimo Di Pierro wrote: > > you may be right. Will check asap. Please open a ticket. > > I've never opened a ticket, where and how do I do that? > On Wednesday, 15 July 2015 18:17:00 UTC-5, Samuel Sowah wrote: >> >> I believe this is a bug. Plea

[web2py] Re: redirecting app to another server

2015-07-15 Thread Massimo Di Pierro
Who says we do not have a clue? ;-) There are multiple ways: 1) The easiest way is to create a model file in your app that does: redirect(URL(args=request.args, vars=request.vars, host='your.new.host.com')) 2) It can be done at the routes level routes_in = [ ('/appname','301->http://your.

[web2py] Re: web2py.js websocket bug?

2015-07-15 Thread Samuel Sowah
I found a work around to the whole problem. I just added this attribute to the body tag, onunload="ajax('{{='someone_offline/%s' % auth.user.id}}',[],'');" This does exactly what I want. However I think the onclose issue has to still be resolved or looked into. On Wednesday, July 15, 2015 at

[web2py] Re: web2py.js websocket bug?

2015-07-15 Thread 黄祥
please open a ticket in here (also please include this discussion): https://github.com/web2py/web2py/issues 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/li

Re: [web2py] Re: using PyCharm

2015-07-15 Thread Alex
web2py runs fine :) I never had serious problems with it. Here is a list of some PyCharm web2py issues: https://youtrack.jetbrains.com/issue/PY-10810 reported by Richard - if this would be solved then I could probably live with the other issue reported by me: https://youtrack.jetbrains.com/issue

[web2py] Re: AppConfig and Storage

2015-07-15 Thread Alex
thanks for the AppConfig implementation! this is really useful and allows easy configuration of db connections. Actually I posted a question about this a few years ago - in the meantime I found a workaround but I'll change it to AppConfig soon. Is this already mentioned in the book somewhere? I

[web2py] Re: Web2py is "Badly designed framework" and "Does not scale"

2015-07-15 Thread Alex
I never understood why ORM should be better than the DAL. Actually I think it's the other way around. I worked with ORM for years and I'm really happy I can now use only DAL. It's very easy to get performance problems with ORM when all references are automatically fetched, and then those referen

[web2py] Pass html in label of SQLFORM.factory Field without it by sanitized

2015-07-15 Thread Thomas Sitter
Hello, I am trying to pass HTML from my controller in a SQLFORM.factory but it keeps getting sanitized form = SQLFORM.factory( Field('install_consent', 'boolean', label='I consent for to provide my contact information to ___. I confirm that my house DOES NOT have aluminium siding. *',

[web2py] expand_one not working anymore?

2015-07-15 Thread Samuel Sowah
currently, when I use autolinks' expand_one, I don't get youtube videos rendering anymore, or anything for that matter, not even files. it just turns the urls into anchor links. something I'm missing? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com