Re: [web2py] Re: Web2py admin page causing internal error (version 2.9.10)
Don't forget to update the web2py file in your app... Backup your app before :) https://groups.google.com/d/msg/web2py/tVyL7z7WHkw/mce13Vh-k3UJ Richard On Thu, Jul 30, 2015 at 12:48 AM, Mark Li markruole...@gmail.com wrote: Deleting all the .pyc files from the web2py directory seems to have done the trick. On Wed, Jul 29, 2015 at 8:31 PM, Mark Li markruole...@gmail.com wrote: I've updated to version 2.11.2, and the problem still persists. I've deleted all errors, cache, and sessions for both admin app and myapp I am getting the following traceback when I look in the admin/errors files: Traceback (most recent call last): File /home/marladarla7/web2py/ gluon/restricted.py, line 224, in restricted exec ccode in environment File applications/admin/models/0_imports.py, line 15, in module from mercurial import ui, hg, cmdutil File /home/marladarla7/web2py/gluon/custom_import.py, line 71, in custom_importer return NATIVE_IMPORTER(oname, globals, locals, fromlist, level) File mercurial.py, line 3, in module if DEMO_MODE or MULTI_USER_MODE: NameError: name 'DEMO_MODE' is not defined I have checked 0.py model, and DEMO_MODE = False, so I have no idea why I am getting this error On Wednesday, July 29, 2015 at 12:52:54 PM UTC-7, Richard wrote: sorry I miss read... 2.9.10... Why not 2.9.12... Why not install 2.11.2?? Richard On Wed, Jul 29, 2015 at 3:49 PM, Richard Vézina ml.richa...@gmail.com wrote: Did you update the admin app? Also, if I remember there have been many correction over 2.10.x web2py build... I would avoid the 2.10.x series for this reason... I remember having testing and having found it not that stable and I stay with 2.9.5... 2.11.2 seems to work great... Richard On Wed, Jul 29, 2015 at 3:30 PM, Dave S snide...@gmail.com wrote: On Wednesday, July 29, 2015 at 11:44:44 AM UTC-7, Mark Li wrote: I am looking at the errors for the admin (at the files), and I am getting a type 'exceptions.NameError' name 'DEMO_MODE' is not defined error That doesn't ring any bells for me, although I'm currently on 2.11.2. I think the step that required some extra effort for pydal 2.10.x. /dps On Wednesday, July 29, 2015 at 11:24:07 AM UTC-7, Mark Li wrote: I've run sessions2trash.py to remove all sessions, as well as remove all the files from the errors folder. Unfortunately I'm still getting the error loop. Should I do this for the admin app as well? On Wednesday, July 29, 2015 at 10:52:06 AM UTC-7, Dave S wrote: On Wednesday, July 29, 2015 at 10:20:36 AM UTC-7, Mark Li wrote: I just upgraded my web2py version on Pythonanywhere from 2.7.4 to 2.9.10, so my live site can match my test site web2py version This in turn has caused the admin page to start producing errors, so I am unable to look at error tickets (they will just produce more errors). I'm quite lost as to what I can do to fix this problem, as I can't even read the error tickets (it's just a continuing cycle of internal errors). You probably need to clear old sessions and old tickets out (back up the tickets, then clear the directory). As I remember it, old sessions and old tickets were the two biggest sources of error loops. /dps -- 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 you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+un...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- 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 you are subscribed to a topic in the Google Groups web2py-users group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/web2py/Z84QlkT6MqE/unsubscribe. To unsubscribe from this group and all its topics, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- 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 you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- 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: Will database callbacks be appended each time model is changed?
Sorry I should have clarified my question. The part I'm concerned about is the use of *append* when adding the callback. If append is being used is there any check to make sure a function is not already in the list. I do not want to call the same callback multiple times when a record is updated. In the sourcecode _after_callback is implemented as a list and I see no checks to make sure the same function isn't inserted/called more than once. Perhaps it should be a set? On Thursday, 30 July 2015 00:50:49 UTC-4, Anthony wrote: auth.add_group() actually does a database insert, so you don't want to keep repeating it on every request (actually, I would probably move that code out of the app altogether, as it really only needs to be run once ever). Specifying the after update callback, on the other hand, does not affect the database at all -- it simply tells the DAL what to do after a database update. In fact, you need this to run on every request because it is part of the model definition (for the same reason you need to run the associated db.define_table() on every request). Anthony On Wednesday, July 29, 2015 at 10:59:59 PM UTC-4, Thomas Sitter wrote: Hello, I'm adding an _after_update callback to my table in db.py using: def myfunc(s,f): #do stuff return False db.tt._after_update.append(myfunc) My question is whether this will continuously append this method every time a database table is modified. I'm asking because I had a similar issue when creating the initial auth users/groups in db.py. I had to wrap the code in the following logic to prevent them being added multiple times if not db().select(db.auth_user.ALL).first(): group_1 = auth.add_group('group1', 'group1 employees') ... Thanks -- 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 you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [web2py] Re: When will we have a proper forum ?
Discourse seems really nice... It represents a lot of work... But as a proof of concept I think we should considering to use our own tool (web2py) to create our own mailing-list... Could we seriously be able to manage our own list and write our own app for this? This is a big undertake and maintenance contract... What do you think? Richard On Thu, Jul 30, 2015 at 10:40 AM, Anthony abasta...@gmail.com wrote: On Thursday, July 30, 2015 at 10:34:54 AM UTC-4, xmarx wrote: Google Groups: pros: + email integration (quick question and quick answer mostly) You can post/reply via email on Discourse as well. Discourse also allows you to use Markdown in both the web UI and via email. + well known, wide usage (not necessery to sign up for another forum) True, though Discourse has social login, allowing you to use Google, Yahoo, Facebook, Twitter, or Github to sign in. + google power (search) (but when i search a problem, stackowerflow is first and right result) Discourse appears to have pretty decent search, plus it can be indexed by Google. Anthony -- 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 you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- 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 you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [web2py] Re: When will we have a proper forum ?
On Thursday, July 30, 2015 at 11:08:09 AM UTC-4, Richard wrote: Discourse seems really nice... It represents a lot of work... But as a proof of concept I think we should considering to use our own tool (web2py) to create our own mailing-list... Could we seriously be able to manage our own list and write our own app for this? This is a big undertake and maintenance contract... Although open source, Discourse is developed by a commercial enterprise (they offer hosting), and so it represents a substantial amount of development effort (though perhaps a web2py version could get a head start by using the Discourse Ember.js front end and attempting to replicate the Rails back end -- but if making a near exact copy, why bother?). For someone, perhaps developing a commercially-backed web2py-based alternative to Discourse would be worthwhile (though probably tough competition), but for the web2py core developers, I think the time might be better spent on (a) further developing web2py, (b) developing plugins and re-usable apps for web2py, and (c) web3py. Anthony -- 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 you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [web2py] Re: When will we have a proper forum ?
Google Groups: pros: + email integration (quick question and quick answer mostly) + well known, wide usage (not necessery to sign up for another forum) + google power (search) (but when i search a problem, stackowerflow is first and right result) cons: - very (and very) bad interface - recently unknown issues - not enough social - unused tag system (because of email send messages) we should look alternatives' pros and cons to make right desicion. 2015-07-30 17:24 GMT+03:00 Alex mrauc...@gmail.com: I too would be very happy if web2py got a real forum. The UI experience with google groups is very bad, I can understand that it doesn't work properly with old Opera browser, but sometimes I'm also having issues with newest Firefox. The whole UI just feels very slow because everything is loaded dynamically. The search often doesn't deliver the results I'm expecting. And finally I think google already knows way too much about everyone on this planet. I can easily avoid google services for almost everything, except when I need web2py support - although I'm probably the only one who cares about this. You owning the data is also a strong argument for using an own forum. Alex -- 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 you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- Selman Kocael İsabet Yayınları -- 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 you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: When will we have a proper forum ?
I too would be very happy if web2py got a real forum. The UI experience with google groups is very bad, I can understand that it doesn't work properly with old Opera browser, but sometimes I'm also having issues with newest Firefox. The whole UI just feels very slow because everything is loaded dynamically. The search often doesn't deliver the results I'm expecting. And finally I think google already knows way too much about everyone on this planet. I can easily avoid google services for almost everything, except when I need web2py support - although I'm probably the only one who cares about this. You owning the data is also a strong argument for using an own forum. Alex -- 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 you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [web2py] Re: When will we have a proper forum ?
On Thursday, July 30, 2015 at 10:34:54 AM UTC-4, xmarx wrote: Google Groups: pros: + email integration (quick question and quick answer mostly) You can post/reply via email on Discourse as well. Discourse also allows you to use Markdown in both the web UI and via email. + well known, wide usage (not necessery to sign up for another forum) True, though Discourse has social login, allowing you to use Google, Yahoo, Facebook, Twitter, or Github to sign in. + google power (search) (but when i search a problem, stackowerflow is first and right result) Discourse appears to have pretty decent search, plus it can be indexed by Google. Anthony -- 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 you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [web2py] Re: Web2py admin page causing internal error (version 2.9.10)
If you have not customized them it is a not brainer and you are much more confident that your app is working properly with the new web2py version... The only thing is that the new welcome is BS3 based, so you may take care if you are not ready for it... Richard On Thu, Jul 30, 2015 at 4:39 PM, Mark Li markruole...@gmail.com wrote: I didn't update the extra files from web2py (like appadmin.py) into my app folder, but it still worked. I've updated the files now as well though. On Thu, Jul 30, 2015 at 11:45 AM, Richard Vézina ml.richard.vez...@gmail.com wrote: You mean you don't do it and your app still works? Or you are not there yet... Hope it works for you... Richard On Thu, Jul 30, 2015 at 2:39 PM, Mark Li markruole...@gmail.com wrote: I did miss this, I keep skipping over this part! On Thu, Jul 30, 2015 at 6:28 AM, Richard Vézina ml.richard.vez...@gmail.com wrote: Don't forget to update the web2py file in your app... Backup your app before :) https://groups.google.com/d/msg/web2py/tVyL7z7WHkw/mce13Vh-k3UJ Richard On Thu, Jul 30, 2015 at 12:48 AM, Mark Li markruole...@gmail.com wrote: Deleting all the .pyc files from the web2py directory seems to have done the trick. On Wed, Jul 29, 2015 at 8:31 PM, Mark Li markruole...@gmail.com wrote: I've updated to version 2.11.2, and the problem still persists. I've deleted all errors, cache, and sessions for both admin app and myapp I am getting the following traceback when I look in the admin/errors files: Traceback (most recent call last): File /home/marladarla7/web2py/ gluon/restricted.py, line 224, in restricted exec ccode in environment File applications/admin/models/0_imports.py, line 15, in module from mercurial import ui, hg, cmdutil File /home/marladarla7/web2py/gluon/custom_import.py, line 71, in custom_importer return NATIVE_IMPORTER(oname, globals, locals, fromlist, level) File mercurial.py, line 3, in module if DEMO_MODE or MULTI_USER_MODE: NameError: name 'DEMO_MODE' is not defined I have checked 0.py model, and DEMO_MODE = False, so I have no idea why I am getting this error On Wednesday, July 29, 2015 at 12:52:54 PM UTC-7, Richard wrote: sorry I miss read... 2.9.10... Why not 2.9.12... Why not install 2.11.2?? Richard On Wed, Jul 29, 2015 at 3:49 PM, Richard Vézina ml.richa...@gmail.com wrote: Did you update the admin app? Also, if I remember there have been many correction over 2.10.x web2py build... I would avoid the 2.10.x series for this reason... I remember having testing and having found it not that stable and I stay with 2.9.5... 2.11.2 seems to work great... Richard On Wed, Jul 29, 2015 at 3:30 PM, Dave S snide...@gmail.com wrote: On Wednesday, July 29, 2015 at 11:44:44 AM UTC-7, Mark Li wrote: I am looking at the errors for the admin (at the files), and I am getting a type 'exceptions.NameError' name 'DEMO_MODE' is not defined error That doesn't ring any bells for me, although I'm currently on 2.11.2. I think the step that required some extra effort for pydal 2.10.x. /dps On Wednesday, July 29, 2015 at 11:24:07 AM UTC-7, Mark Li wrote: I've run sessions2trash.py to remove all sessions, as well as remove all the files from the errors folder. Unfortunately I'm still getting the error loop. Should I do this for the admin app as well? On Wednesday, July 29, 2015 at 10:52:06 AM UTC-7, Dave S wrote: On Wednesday, July 29, 2015 at 10:20:36 AM UTC-7, Mark Li wrote: I just upgraded my web2py version on Pythonanywhere from 2.7.4 to 2.9.10, so my live site can match my test site web2py version This in turn has caused the admin page to start producing errors, so I am unable to look at error tickets (they will just produce more errors). I'm quite lost as to what I can do to fix this problem, as I can't even read the error tickets (it's just a continuing cycle of internal errors). You probably need to clear old sessions and old tickets out (back up the tickets, then clear the directory). As I remember it, old sessions and old tickets were the two biggest sources of error loops. /dps -- 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 you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+un...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- 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 you are subscribed to a topic in the Google Groups web2py-users group. To unsubscribe from this
Re: [web2py] Re: When will we have a proper forum ?
+1 Michele, you resumed my thought... I am thinking too that having to maintain our own mailing-list and use our own tool to do so, will make us improve web2py... At the same time if web3py is coming, I guess as Anthony mention ressources being scarce we may have to choose... I also, use mail, so I don't understand exactly what the issue with google group... Richard On Thu, Jul 30, 2015 at 4:34 PM, Michele Comitini michele.comit...@gmail.com wrote: The choice is about maintaining the infrastructure to run a forum or not. If we choose to maintain it, I am in favor of a self hosted web2py solution. It takes resources, but it is not a waste of resources, since it is a real world testbed for web2py and would generate contributions for stability and speed, so it would have a positive impact on web2py engineering. The critical point could be development of new components (specifically web3py), since much resources would work on the stable version having to deliver a good service... Following the same reasoning, I am against having to use resources to maintain something that requires tinkering with another framework. In that case we must rely on a 3rd party service as we do now with google, where we do not have to maintain their (falling apart? I don't know since I tend to use the e-mail channel) framework for discussion groups. 2015-07-30 20:15 GMT+02:00 Anthony abasta...@gmail.com: + well known, wide usage (not necessery to sign up for another forum) True, though Discourse has social login, allowing you to use Google, Yahoo, Facebook, Twitter, or Github to sign in. Actually not true. The one service requiring login is actually google groups. You HAVE to have a google account, Actually, not not true. Technically, you don't need a Google account if you interact with the group via email only. Anyway, I think the real point was that if you already have a Google account, which many people have for other reasons (and especially if you are already using Google Groups for other communities), you don't have to sign up for yet another independent forum account. Anthony -- 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 you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- 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 you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- 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 you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [web2py] Re: When will we have a proper forum ?
Discourse lacks at least two important search features https://support.google.com/websearch/answer/2466433?hl=en - - dash, exclude - exact strings containing multiple words critical for finding help when similar words appear in irrelevant posts Alex Glaros -- 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 you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [web2py] Re: Query and Manage profiles
Hello Daniel, Sorry to be late, I didn't see your last post But frankly about Odoo, I don't know, it surely can be customized... You seems you want a electronic bids system... I know that you can define and manage your supplier chain in Odoo... But having them to long in your system and submit bids throught it I don't know... Odoo project is modular by nature, I guess you can develop a module for that or outsource to some Odoo shop depends of your budget. The thing is that Odoo already support many of your requirements so you don't have to reinvent the wheel for the CRM part, UI, reporting, etc. Write a good CRM with web2py is a good amount of work... I would suggest your to establish your requirements, evaluate Odoo or other software and then think to wrote your own thing from scratch since you seems something that may exist already... Good luck Richard On Tue, Jul 14, 2015 at 9:30 PM, Daniel Dos Santos Guilhermino danielguilherm...@gmail.com wrote: 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 vendor companies to enroll on our website to participate in quotes. We will have two profiles: Buyer and Seller. Sellers are separated by departments such as services, consumer and etc. When the buyer need to make a quotation, it will complete the form with the request, select the department and submit, The system will automatically send the form to sellers that department, inviting them to participate in the quote. We need to create a room of quotations, where the buyer has access to the suppliers answers. It is different from Odoo, we have to register the suppliers, in this case, they will be invited to participate. I dont know if I was clear on my explanation, What you think about? Best regards, Daniel - From Brazil! On Tuesday, July 14, 2015 at 10:23:06 AM UTC-3, Richard wrote: I would suggest if you need CRM functionnality that you have a look to the existing open source project, let say Odoo (OpenERP) which contain an CRM module and planty of orther thing... There is a Docker Odoo package that may help you deploy it rapidly for testing... Richard On Tue, Jul 14, 2015 at 8:46 AM, 黄祥 steve.van...@gmail.com wrote: I would like to deploy the Company to work a form query where employees create requests for certain departments , and these departments must respond to these requests. How best to work ? Using SQLform or Form ? please start from simple first, after it run well, then go ahead to make it complex, the simple way to have it work is using SQLFORM.grid (CRUDS) We will need two profiles of users, developers and departments , how to manage this profile ? just create it in auth_groups (users, developers and departments), after that assign the user (auth_users) to it's own group 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 received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+un...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- 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 you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- 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 you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [web2py] Re: When will we have a proper forum ?
The choice is about maintaining the infrastructure to run a forum or not. If we choose to maintain it, I am in favor of a self hosted web2py solution. It takes resources, but it is not a waste of resources, since it is a real world testbed for web2py and would generate contributions for stability and speed, so it would have a positive impact on web2py engineering. The critical point could be development of new components (specifically web3py), since much resources would work on the stable version having to deliver a good service... Following the same reasoning, I am against having to use resources to maintain something that requires tinkering with another framework. In that case we must rely on a 3rd party service as we do now with google, where we do not have to maintain their (falling apart? I don't know since I tend to use the e-mail channel) framework for discussion groups. 2015-07-30 20:15 GMT+02:00 Anthony abasta...@gmail.com: + well known, wide usage (not necessery to sign up for another forum) True, though Discourse has social login, allowing you to use Google, Yahoo, Facebook, Twitter, or Github to sign in. Actually not true. The one service requiring login is actually google groups. You HAVE to have a google account, Actually, not not true. Technically, you don't need a Google account if you interact with the group via email only. Anyway, I think the real point was that if you already have a Google account, which many people have for other reasons (and especially if you are already using Google Groups for other communities), you don't have to sign up for yet another independent forum account. Anthony -- 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 you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- 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 you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: File upload/download over https freezes site
looks like that change came from here: https://groups.google.com/forum/#!searchin/web2py/processes$3D1$20threads$3D1|sort:date/web2py/jumZFKX2614/pu-NNXSMKHgJ based on the post from Thomas... Thomas J. 10/3/13 I've recently been comparing Web2py and PHP, this is what i found, maybe it helps: 1.: PHP is faster whereever it can do stuff within the interpreter, that includes handling post/get-data or templates. The PHP interpreter is written in C, so these things are really fast, whereas Web2py has to to them in Python. 2. DB access is heavily dependent on how many records you retrieve. Translating a query from DAL to SQL is basically free (so using the DAL syntax for DB access isn't an issue), putting the data into Python objects is quite expensive however. Only query what you really need. Also, using executesql() instead of the regular DAL syntax may help there, as it returns tuples, not complex data structures 3. I've found the default config for Apache2 to be somewhat broken as far as concurrency is concerned. Check your Apache/WSGI config, you probably have a line like WSGIDaemonProcess web2py user=www-data group=www-data in there. This actually defaults to 1 process with 15 threads, which -- on my machine -- completely kills performance (Python doesn't do threads well because of the global interpreter lock). I've found that even something like WSGIDaemonProcess web2py user=www-data group=www-data processes=1 threads=1 improves performance for concurrent requests dramatically. Try tinkering with the processes-value to find the best config for your machine. You should probably change processes before you change threads. On Wednesday, July 29, 2015 at 3:40:30 PM UTC-7, Dave wrote: That would be good to know. Nothing in the web2py docs suggests that Apache should not be used in production, it actually seems more like the default since it is the first discussed in the documentation and it's used in the one-step production deployment. The line of code in question is also in the one-step deployment script here: http://web2py.googlecode.com/hg/scripts/setup-web2py-ubuntu.sh On Wednesday, 29 July 2015 14:32:19 UTC-6, Niphlod wrote: I dropped off the apache train too soon to have any issues with it, but frankly, given the total sum of issues encountered so far on the forums, I'm starting to think that we'd need to officially discontinue our apache support.. may be total lack of luck in setting it up or very biased perspective, or total lack of internal knowledge but it seems that every problem that pops up with deployments have apache as the common ground. looks like this is the commit to be blamed https://github.com/web2py/web2py/commit/2a062a2ff5aa1e07e7bfcfdbf36b7f72e8aac5b4 I don't know the specifics around it but if it acts like it suggests, 1 thread and 1 process as a total sum aren't really worth of a production deployment. On Wednesday, July 29, 2015 at 6:00:47 PM UTC+2, Dave wrote: Actually, it looks like i was chasing the wrong issue... It wasn't https after all. Everything seems to be working after changing this line in apache default.conf: WSGIDaemonProcess web2py user=www-data group=www-data processes=1 threads=1 to: WSGIDaemonProcess web2py user=www-data group=www-data processes=5 threads=15 Is there any reason not to change this default setting from one-step deployment? Can I likely set these values higher based on my hardware? Thanks again, Dave On Wednesday, 29 July 2015 02:52:20 UTC-6, Niphlod wrote: uhm, you left out some pretty specific details what resources has the server web2py is deployed on ? moreover, what's the size of the file ? and what code are you using to handle the upload? are you using the default 'upload' Field or is it in conjunction with a 'blob' one to store the file on the database ? On Wednesday, July 29, 2015 at 4:59:29 AM UTC+2, Dave wrote: I have this same behavior on multiple web2py servers. If a large file is being uploaded using a SQLFORM or downloaded using the default download controller, over HTTPS, the entire web server becomes unresponsive until the transfer is completed or cancelled. However, I have no issues uploading/downloading the same file over HTTP, which can also take several minutes to complete, but the web server is still responsive during those transfers. I am using the one-step deployment with Apache and a wildcard certificate (RapidSSL). Would switching to nginx or cherokee give better performance for https file transfers, or is this likely an issue with the SSL certificate format? Or if the file transfers over HTTPS are too CPU intensive, am i better off setting up multiple servers and a load balancer? Thanks! Dave R -- 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
Re: [web2py] Re: Web2py admin page causing internal error (version 2.9.10)
I didn't update the extra files from web2py (like appadmin.py) into my app folder, but it still worked. I've updated the files now as well though. On Thu, Jul 30, 2015 at 11:45 AM, Richard Vézina ml.richard.vez...@gmail.com wrote: You mean you don't do it and your app still works? Or you are not there yet... Hope it works for you... Richard On Thu, Jul 30, 2015 at 2:39 PM, Mark Li markruole...@gmail.com wrote: I did miss this, I keep skipping over this part! On Thu, Jul 30, 2015 at 6:28 AM, Richard Vézina ml.richard.vez...@gmail.com wrote: Don't forget to update the web2py file in your app... Backup your app before :) https://groups.google.com/d/msg/web2py/tVyL7z7WHkw/mce13Vh-k3UJ Richard On Thu, Jul 30, 2015 at 12:48 AM, Mark Li markruole...@gmail.com wrote: Deleting all the .pyc files from the web2py directory seems to have done the trick. On Wed, Jul 29, 2015 at 8:31 PM, Mark Li markruole...@gmail.com wrote: I've updated to version 2.11.2, and the problem still persists. I've deleted all errors, cache, and sessions for both admin app and myapp I am getting the following traceback when I look in the admin/errors files: Traceback (most recent call last): File /home/marladarla7/web2py/ gluon/restricted.py, line 224, in restricted exec ccode in environment File applications/admin/models/0_imports.py, line 15, in module from mercurial import ui, hg, cmdutil File /home/marladarla7/web2py/gluon/custom_import.py, line 71, in custom_importer return NATIVE_IMPORTER(oname, globals, locals, fromlist, level) File mercurial.py, line 3, in module if DEMO_MODE or MULTI_USER_MODE: NameError: name 'DEMO_MODE' is not defined I have checked 0.py model, and DEMO_MODE = False, so I have no idea why I am getting this error On Wednesday, July 29, 2015 at 12:52:54 PM UTC-7, Richard wrote: sorry I miss read... 2.9.10... Why not 2.9.12... Why not install 2.11.2?? Richard On Wed, Jul 29, 2015 at 3:49 PM, Richard Vézina ml.richa...@gmail.com wrote: Did you update the admin app? Also, if I remember there have been many correction over 2.10.x web2py build... I would avoid the 2.10.x series for this reason... I remember having testing and having found it not that stable and I stay with 2.9.5... 2.11.2 seems to work great... Richard On Wed, Jul 29, 2015 at 3:30 PM, Dave S snide...@gmail.com wrote: On Wednesday, July 29, 2015 at 11:44:44 AM UTC-7, Mark Li wrote: I am looking at the errors for the admin (at the files), and I am getting a type 'exceptions.NameError' name 'DEMO_MODE' is not defined error That doesn't ring any bells for me, although I'm currently on 2.11.2. I think the step that required some extra effort for pydal 2.10.x. /dps On Wednesday, July 29, 2015 at 11:24:07 AM UTC-7, Mark Li wrote: I've run sessions2trash.py to remove all sessions, as well as remove all the files from the errors folder. Unfortunately I'm still getting the error loop. Should I do this for the admin app as well? On Wednesday, July 29, 2015 at 10:52:06 AM UTC-7, Dave S wrote: On Wednesday, July 29, 2015 at 10:20:36 AM UTC-7, Mark Li wrote: I just upgraded my web2py version on Pythonanywhere from 2.7.4 to 2.9.10, so my live site can match my test site web2py version This in turn has caused the admin page to start producing errors, so I am unable to look at error tickets (they will just produce more errors). I'm quite lost as to what I can do to fix this problem, as I can't even read the error tickets (it's just a continuing cycle of internal errors). You probably need to clear old sessions and old tickets out (back up the tickets, then clear the directory). As I remember it, old sessions and old tickets were the two biggest sources of error loops. /dps -- 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 you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+un...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- 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 you are subscribed to a topic in the Google Groups web2py-users group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/web2py/Z84QlkT6MqE/unsubscribe. To unsubscribe from this group and all its topics, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -
[web2py] Re: File upload/download over https freezes site
Thanks for tracking that down! So based on that post, and this one, it looks like i should be setting proccesses = # of cores, and threads = 1? https://groups.google.com/forum/#!topic/web2py/mPdn1ClxLTI Massimo DI Pierro: There are pros and cons. If you use threads in a python program, the more computing cores you have, the slower - not faster - the program gets. This is a python feature because even if you have threads, there is only one interpreted and therefore execution is serialized anyway. For scalability you should have processes (not threads) one per core. On Thursday, 30 July 2015 14:15:36 UTC-6, Derek wrote: looks like that change came from here: https://groups.google.com/forum/#!searchin/web2py/processes$3D1$20threads$3D1|sort:date/web2py/jumZFKX2614/pu-NNXSMKHgJ based on the post from Thomas... Thomas J. 10/3/13 I've recently been comparing Web2py and PHP, this is what i found, maybe it helps: 1.: PHP is faster whereever it can do stuff within the interpreter, that includes handling post/get-data or templates. The PHP interpreter is written in C, so these things are really fast, whereas Web2py has to to them in Python. 2. DB access is heavily dependent on how many records you retrieve. Translating a query from DAL to SQL is basically free (so using the DAL syntax for DB access isn't an issue), putting the data into Python objects is quite expensive however. Only query what you really need. Also, using executesql() instead of the regular DAL syntax may help there, as it returns tuples, not complex data structures 3. I've found the default config for Apache2 to be somewhat broken as far as concurrency is concerned. Check your Apache/WSGI config, you probably have a line like WSGIDaemonProcess web2py user=www-data group=www-data in there. This actually defaults to 1 process with 15 threads, which -- on my machine -- completely kills performance (Python doesn't do threads well because of the global interpreter lock). I've found that even something like WSGIDaemonProcess web2py user=www-data group=www-data processes=1 threads=1 improves performance for concurrent requests dramatically. Try tinkering with the processes-value to find the best config for your machine. You should probably change processes before you change threads. On Wednesday, July 29, 2015 at 3:40:30 PM UTC-7, Dave wrote: That would be good to know. Nothing in the web2py docs suggests that Apache should not be used in production, it actually seems more like the default since it is the first discussed in the documentation and it's used in the one-step production deployment. The line of code in question is also in the one-step deployment script here: http://web2py.googlecode.com/hg/scripts/setup-web2py-ubuntu.sh On Wednesday, 29 July 2015 14:32:19 UTC-6, Niphlod wrote: I dropped off the apache train too soon to have any issues with it, but frankly, given the total sum of issues encountered so far on the forums, I'm starting to think that we'd need to officially discontinue our apache support.. may be total lack of luck in setting it up or very biased perspective, or total lack of internal knowledge but it seems that every problem that pops up with deployments have apache as the common ground. looks like this is the commit to be blamed https://github.com/web2py/web2py/commit/2a062a2ff5aa1e07e7bfcfdbf36b7f72e8aac5b4 I don't know the specifics around it but if it acts like it suggests, 1 thread and 1 process as a total sum aren't really worth of a production deployment. On Wednesday, July 29, 2015 at 6:00:47 PM UTC+2, Dave wrote: Actually, it looks like i was chasing the wrong issue... It wasn't https after all. Everything seems to be working after changing this line in apache default.conf: WSGIDaemonProcess web2py user=www-data group=www-data processes=1 threads=1 to: WSGIDaemonProcess web2py user=www-data group=www-data processes=5 threads=15 Is there any reason not to change this default setting from one-step deployment? Can I likely set these values higher based on my hardware? Thanks again, Dave On Wednesday, 29 July 2015 02:52:20 UTC-6, Niphlod wrote: uhm, you left out some pretty specific details what resources has the server web2py is deployed on ? moreover, what's the size of the file ? and what code are you using to handle the upload? are you using the default 'upload' Field or is it in conjunction with a 'blob' one to store the file on the database ? On Wednesday, July 29, 2015 at 4:59:29 AM UTC+2, Dave wrote: I have this same behavior on multiple web2py servers. If a large file is being uploaded using a SQLFORM or downloaded using the default download controller, over HTTPS, the entire web server becomes unresponsive until the transfer is completed or cancelled. However, I have no issues uploading/downloading the same file over HTTP, which can also
[web2py] GAE/Google AppEngine problem with web2py: Deployment successful but GAE does not launch
My AppEngine ID is memberable0. I copied examples/app.example.yaml to web2py root as app.yaml Only change I made was: application: memberable0 Web2py lives in /Users/tom/Dropbox/work/m/web2py and that path shows successfully in GoogleAppEngineLauncher, which shows port 8081 for the web server (not running web2py's Rocket server). Nothing happens. GoogleAppEngineLauncher just sits there with the yellow wait icon in the leftmost column. The Log Console for memberable0 shows literally nothing. In Chrome the Network tab in the dev tools shows nothing was ever loaded. If I run this from the shell: $ appcfg.py update . I get tons of output, with thousand of lines that look like this: # Tons of the following: Could not guess mimetype for applications/lte/static/css/fontawesome/src/3.2.1/assets/less/bootstrap-2.3.2/responsive.less. Using application/octet-stream. # Finally ending with: 03:25 PM Cloning 8105 static files. 03:25 PM Cloned 2000 files. 03:25 PM Cloned 4000 files. 03:25 PM Cloned 6000 files. 03:25 PM Cloned 8000 files. 03:25 PM Cloning 1097 application files. 03:25 PM Compilation starting. 03:25 PM Compilation completed. 03:25 PM Starting deployment. 03:25 PM Checking if deployment succeeded. 03:25 PM Deployment successful. 03:25 PM Checking if updated app version is serving. 03:25 PM Completed update of app: memberable0, version: 1 Nonetheless, when I click Run, GoogleAppEngineLauncher is still inert. Out of desperation I have tried other ports like 12080 but to no avail. Can anyone tell me what I'm doing wrong or if there's some other diagnostic tool I'm missing? Version 2.9.12-stable+timestamp.2015.01.17.06.11.03 Running on a high end Mac, OS X Yosemite 10.10.4 -- 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 you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: favicon.ico
Thank you very much. It worked. пятница, 31 июля 2015 г., 1:06:15 UTC+7 пользователь Dave S написал: On Wednesday, July 29, 2015 at 9:26:11 PM UTC-7, Александр Остыловский wrote: Hello! I replaced the files favicon.ico and favicon.png on the site and nothing has changed. Why is that? thanks Did you flush the browser cache? (I use Firefox a lot, and usually have a lot of tabs open, so I'm inclined to close FF down periodically so keep it from slowing to a crawl; this took care of flushing the cache, but you can try within the browser but using the gear menu to get to the right submenu.) /dps -- 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 you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: How to use uploaded image
Hi Anthony, sorry about the late reply. Thank you very much for your detailed answers. On Sunday, July 26, 2015 at 5:46:05 AM UTC-7, Anthony wrote: First, three corrections: - The upload field does not name the stored file the same as the name of the uploaded file. The stored file gets renamed, with the new name including an encoded version of the original filename (which gets decoded upon retrieveal). It is this new filename that actually gets stored in the upload field (the file itself is stored on the filesystem). - The attribute after a table name is a field name, not the name of an uploaded file, so you would do db.image.file (db.image.water makes no sense, as the table does not include a field named water). - The URL argument passed to the download function to indicate which file to download must be the filename stored in the upload field, not a Field object. So, to display a given image, you must somehow be able to query the database to retrieve the image you want, and then access the file field of that record to get the filename, which you will then pass as a URL arg to the download function. For example: In a controller: row = db(db.image.title == 'some title').select().first() In the view: img src={{=URL('default', 'download', args=row.file)}} Anthony On Sunday, July 26, 2015 at 12:41:06 AM UTC-4, michael sun wrote: I build a table: db.define_table('image', Field('title', unique=True), Field('file', 'upload'), format = '%(title)s') then upload a image called 'water'. in index.html, I wrote: img src={{=URL('download',args=db.image.water)}} / but then it gives me the error: type 'exceptions.AttributeError'() Function argument list (self=Table image (id,title,file), key='water') Code listing 343. 344. 345. 346. 347. 348. 349. 350. 351. 352. def __getattr__(self, key): try: return self.__dict__.__getitem__(str(key)) except: raise AttributeError def __setitem__(self, key, value): self.__dict__.__setitem__(key, value) -- 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 you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [web2py] Re: When will we have a proper forum ?
On Thursday, July 30, 2015 at 7:34:54 AM UTC-7, xmarx wrote: Google Groups: pros: + email integration (quick question and quick answer mostly) + well known, wide usage (not necessery to sign up for another forum) + google power (search) (but when i search a problem, stackowerflow is first and right result) cons: - very (and very) bad interface I guess I'm atypical, but I don't find the GG interface to be bad (even after the change 2 years ago). I grew up in the Usenet environment, with readnews, rn, and the emacs interfaces to same (both Gosling and GNU) and still use a variety of newsreaders for the small number of groups I'm still active in. *And* I still use GG as the backup reader for those Usenet groups. I've also used a variety of web forums (see the one for Beyond Compare at scootersotware.com, frex,which used vBulletin) and I've use a couple of web archive interfaces to help with mailing lists (Mercurial and Mercurial Developers in particular). *I AM VERY COMFORTABLE USING GOOGLE GROUPS.* On the other hand, my opinion is probably worthless because I don't hate Windows 8.x or even Windows Vista. I'm still using an old Fedora, so I might not be up to date on rants about Linux UX horrors. I have yet to set up my Mint machine. - recently unknown issues - not enough social - unused tag system (because of email send messages) It appears that the original poster is the only one who can set tags. Ok, maybe the moderators can play Deus Ex Machina with tags, but the rest of us can't add a tag ex post facto. we should look alternatives' pros and cons to make right desicion. /dps -- 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 you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [web2py] Re: When will we have a proper forum ?
On Thursday, July 30, 2015 at 5:25:40 PM UTC-4, Alex Glaros wrote: Discourse lacks at least two important search features https://support.google.com/websearch/answer/2466433?hl=en - - dash, exclude - exact strings containing multiple words critical for finding help when similar words appear in irrelevant posts In addition to its built-in search (which includes a number of forum-specific advanced search operators not available when searching Google Groups), Discourse also includes a Search with Google feature, allowing you to execute any search using Google (taking advantage of all of Google's advanced search operators). Anthony -- 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 you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [web2py] Re: When will we have a proper forum ?
I guess I'm atypical, but I don't find the GG interface to be bad (even after the change 2 years ago). I agree -- in general, Google Groups is fairly good, especially given that it is free (and has no ads). It's also nice that so many other communities use it, which makes it easy to follow and interact with multiple groups from a single interface. Some discussion about possibly moving originally arose when last week Google introduced a bug that rendered web2py-users unusable via the web interface. There is also more general concern with not owning the data and the risk that Google might shut down Google Groups (just as it shut down Google Code and many other former products). Anthony -- 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 you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [web2py] Re: Web2py admin page causing internal error (version 2.9.10)
You mean you don't do it and your app still works? Or you are not there yet... Hope it works for you... Richard On Thu, Jul 30, 2015 at 2:39 PM, Mark Li markruole...@gmail.com wrote: I did miss this, I keep skipping over this part! On Thu, Jul 30, 2015 at 6:28 AM, Richard Vézina ml.richard.vez...@gmail.com wrote: Don't forget to update the web2py file in your app... Backup your app before :) https://groups.google.com/d/msg/web2py/tVyL7z7WHkw/mce13Vh-k3UJ Richard On Thu, Jul 30, 2015 at 12:48 AM, Mark Li markruole...@gmail.com wrote: Deleting all the .pyc files from the web2py directory seems to have done the trick. On Wed, Jul 29, 2015 at 8:31 PM, Mark Li markruole...@gmail.com wrote: I've updated to version 2.11.2, and the problem still persists. I've deleted all errors, cache, and sessions for both admin app and myapp I am getting the following traceback when I look in the admin/errors files: Traceback (most recent call last): File /home/marladarla7/web2py/ gluon/restricted.py, line 224, in restricted exec ccode in environment File applications/admin/models/0_imports.py, line 15, in module from mercurial import ui, hg, cmdutil File /home/marladarla7/web2py/gluon/custom_import.py, line 71, in custom_importer return NATIVE_IMPORTER(oname, globals, locals, fromlist, level) File mercurial.py, line 3, in module if DEMO_MODE or MULTI_USER_MODE: NameError: name 'DEMO_MODE' is not defined I have checked 0.py model, and DEMO_MODE = False, so I have no idea why I am getting this error On Wednesday, July 29, 2015 at 12:52:54 PM UTC-7, Richard wrote: sorry I miss read... 2.9.10... Why not 2.9.12... Why not install 2.11.2?? Richard On Wed, Jul 29, 2015 at 3:49 PM, Richard Vézina ml.richa...@gmail.com wrote: Did you update the admin app? Also, if I remember there have been many correction over 2.10.x web2py build... I would avoid the 2.10.x series for this reason... I remember having testing and having found it not that stable and I stay with 2.9.5... 2.11.2 seems to work great... Richard On Wed, Jul 29, 2015 at 3:30 PM, Dave S snide...@gmail.com wrote: On Wednesday, July 29, 2015 at 11:44:44 AM UTC-7, Mark Li wrote: I am looking at the errors for the admin (at the files), and I am getting a type 'exceptions.NameError' name 'DEMO_MODE' is not defined error That doesn't ring any bells for me, although I'm currently on 2.11.2. I think the step that required some extra effort for pydal 2.10.x. /dps On Wednesday, July 29, 2015 at 11:24:07 AM UTC-7, Mark Li wrote: I've run sessions2trash.py to remove all sessions, as well as remove all the files from the errors folder. Unfortunately I'm still getting the error loop. Should I do this for the admin app as well? On Wednesday, July 29, 2015 at 10:52:06 AM UTC-7, Dave S wrote: On Wednesday, July 29, 2015 at 10:20:36 AM UTC-7, Mark Li wrote: I just upgraded my web2py version on Pythonanywhere from 2.7.4 to 2.9.10, so my live site can match my test site web2py version This in turn has caused the admin page to start producing errors, so I am unable to look at error tickets (they will just produce more errors). I'm quite lost as to what I can do to fix this problem, as I can't even read the error tickets (it's just a continuing cycle of internal errors). You probably need to clear old sessions and old tickets out (back up the tickets, then clear the directory). As I remember it, old sessions and old tickets were the two biggest sources of error loops. /dps -- 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 you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+un...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- 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 you are subscribed to a topic in the Google Groups web2py-users group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/web2py/Z84QlkT6MqE/unsubscribe. To unsubscribe from this group and all its topics, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- 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 you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop
[web2py] Is it possible to translate data in SQLFORM.grid?
Hello all. Is it possible to translate data in SQLFORM.grid? MODEL: db.define_table('fruits', Field('name', type='string'), format='%(name)s') db.define_table('cake', Field('name', type='string'), Field('fruit', 'reference fruits', requires = IS_IN_DB(db, db.fruits.id, '%(name)s'), represent=lambda id, r: db.fruits[id].name)) CONTROLLER: grid=SQLFORM.grid(db.cake) VIEW: {{=grid}} In the fruits table, names are in english, for example Apple. Is it possible to set for this field in the grid automatic traductions like T()? In this case for example I would like to have in an Italian page Mela instead of Apple. Thanks. -- 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 you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [web2py] Is it possible to translate data in SQLFORM.grid?
Have you tried? db.cake.fruit.represent = lambda v, r: T(db.fruits[v].name) grid=SQLFORM.grid(db.cake) On Thu, Jul 30, 2015 at 8:55 AM, Gael Princivalle gaelprinciva...@gmail.com wrote: Hello all. Is it possible to translate data in SQLFORM.grid? MODEL: db.define_table('fruits', Field('name', type='string'), format='%(name)s') db.define_table('cake', Field('name', type='string'), Field('fruit', 'reference fruits', requires = IS_IN_DB(db, db.fruits.id, '%(name)s'), represent=lambda id, r: db.fruits[id].name)) CONTROLLER: grid=SQLFORM.grid(db.cake) VIEW: {{=grid}} In the fruits table, names are in english, for example Apple. Is it possible to set for this field in the grid automatic traductions like T()? In this case for example I would like to have in an Italian page Mela instead of Apple. Thanks. -- 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 you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- Massimiliano -- 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 you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [web2py] Re: When will we have a proper forum ?
+ well known, wide usage (not necessery to sign up for another forum) True, though Discourse has social login, allowing you to use Google, Yahoo, Facebook, Twitter, or Github to sign in. Actually not true. The one service requiring login is actually google groups. You HAVE to have a google account, Actually, not not true. Technically, you don't need a Google account if you interact with the group via email only. Anyway, I think the real point was that if you already have a Google account, which many people have for other reasons (and especially if you are already using Google Groups for other communities), you don't have to sign up for yet another independent forum account. Anthony -- 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 you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [web2py] Re: Web2py admin page causing internal error (version 2.9.10)
I did miss this, I keep skipping over this part! On Thu, Jul 30, 2015 at 6:28 AM, Richard Vézina ml.richard.vez...@gmail.com wrote: Don't forget to update the web2py file in your app... Backup your app before :) https://groups.google.com/d/msg/web2py/tVyL7z7WHkw/mce13Vh-k3UJ Richard On Thu, Jul 30, 2015 at 12:48 AM, Mark Li markruole...@gmail.com wrote: Deleting all the .pyc files from the web2py directory seems to have done the trick. On Wed, Jul 29, 2015 at 8:31 PM, Mark Li markruole...@gmail.com wrote: I've updated to version 2.11.2, and the problem still persists. I've deleted all errors, cache, and sessions for both admin app and myapp I am getting the following traceback when I look in the admin/errors files: Traceback (most recent call last): File /home/marladarla7/web2py/ gluon/restricted.py, line 224, in restricted exec ccode in environment File applications/admin/models/0_imports.py, line 15, in module from mercurial import ui, hg, cmdutil File /home/marladarla7/web2py/gluon/custom_import.py, line 71, in custom_importer return NATIVE_IMPORTER(oname, globals, locals, fromlist, level) File mercurial.py, line 3, in module if DEMO_MODE or MULTI_USER_MODE: NameError: name 'DEMO_MODE' is not defined I have checked 0.py model, and DEMO_MODE = False, so I have no idea why I am getting this error On Wednesday, July 29, 2015 at 12:52:54 PM UTC-7, Richard wrote: sorry I miss read... 2.9.10... Why not 2.9.12... Why not install 2.11.2?? Richard On Wed, Jul 29, 2015 at 3:49 PM, Richard Vézina ml.richa...@gmail.com wrote: Did you update the admin app? Also, if I remember there have been many correction over 2.10.x web2py build... I would avoid the 2.10.x series for this reason... I remember having testing and having found it not that stable and I stay with 2.9.5... 2.11.2 seems to work great... Richard On Wed, Jul 29, 2015 at 3:30 PM, Dave S snide...@gmail.com wrote: On Wednesday, July 29, 2015 at 11:44:44 AM UTC-7, Mark Li wrote: I am looking at the errors for the admin (at the files), and I am getting a type 'exceptions.NameError' name 'DEMO_MODE' is not defined error That doesn't ring any bells for me, although I'm currently on 2.11.2. I think the step that required some extra effort for pydal 2.10.x. /dps On Wednesday, July 29, 2015 at 11:24:07 AM UTC-7, Mark Li wrote: I've run sessions2trash.py to remove all sessions, as well as remove all the files from the errors folder. Unfortunately I'm still getting the error loop. Should I do this for the admin app as well? On Wednesday, July 29, 2015 at 10:52:06 AM UTC-7, Dave S wrote: On Wednesday, July 29, 2015 at 10:20:36 AM UTC-7, Mark Li wrote: I just upgraded my web2py version on Pythonanywhere from 2.7.4 to 2.9.10, so my live site can match my test site web2py version This in turn has caused the admin page to start producing errors, so I am unable to look at error tickets (they will just produce more errors). I'm quite lost as to what I can do to fix this problem, as I can't even read the error tickets (it's just a continuing cycle of internal errors). You probably need to clear old sessions and old tickets out (back up the tickets, then clear the directory). As I remember it, old sessions and old tickets were the two biggest sources of error loops. /dps -- 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 you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+un...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- 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 you are subscribed to a topic in the Google Groups web2py-users group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/web2py/Z84QlkT6MqE/unsubscribe. To unsubscribe from this group and all its topics, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- 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 you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- Resources: - http://web2py.com -
Re: [web2py] Please help: issue sending SMS as e-mail
Hi I see you got your web2py sms function to work please help me get mine working, how did you get it to work??? On Monday, November 25, 2013 at 9:38:09 AM UTC+2, melmg wrote: I got it working :) ... I'm not sure what finally did it because I ended up modifying several things. -- 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 you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: OpenLDAP and TLS auth example, please
Hmm, we may have an LDAP server issue. Ignore for now; sorry for the noise. -- 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 you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [web2py] Re: When will we have a proper forum ?
2015-07-30 11:40 GMT-03:00 Anthony abasta...@gmail.com: On Thursday, July 30, 2015 at 10:34:54 AM UTC-4, xmarx wrote: Google Groups: pros: + email integration (quick question and quick answer mostly) You can post/reply via email on Discourse as well. Discourse also allows you to use Markdown in both the web UI and via email. Endorsing this. Discourse deals better with e-mail than google groups, so that's really a con on google groups. + well known, wide usage (not necessery to sign up for another forum) True, though Discourse has social login, allowing you to use Google, Yahoo, Facebook, Twitter, or Github to sign in. Actually not true. The one service requiring login is actually google groups. You HAVE to have a google account, which in turn means accepting a terms of service that states explicitly that whenever google get honest and decides to sell your soul to the devil, you have granted them permission to do so when you created the account in the first place. Discourse has OpenID, so no, you don't have to signup. + google power (search) (but when i search a problem, stackowerflow is first and right result) Discourse appears to have pretty decent search, plus it can be indexed by Google. I think google groups ranks worse than debian-user mailing lists. I can't say for sure, but I expect that a software of the nature of discourse should have SEO properly implemented by now. If not, a simple issue on their tracker shall raise awareness on that. We are getting behind Ruby, peepz! -- 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 you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [web2py] Re: When will we have a proper forum ?
I really dislike Discourse. It's a Ruby app, and it requires a ton of addons. It's bloated and slow, and since it uses virtual infinite scroll, it's very difficult to search within discussions. https://www.techfuel.net/pyforum/default/index pyForum is based on web2py, though it looks like the project has been abandoned and it needs spam filtering / moderation. there's Uforum (http://www.uforum.nl/topic/active) for which there is no source and I don't know if the authors would be willing to share. Personally, my favorite it is a mix of python and javascript and it's called geiwiki. Of course it's not a forum, more like a tiddlywiki with discussion features added. That may be difficult to use, not recommended. Finally, last but not least, there's http://web2pyslices.pythonanywhere.com/home. It has a 'questions' function which will allow people to post questions and get answers, but it's not prominently featured. This site is geared towards showing you how to do neat stuff, yet the questions portion is not front and center so people don't use it. Also the format of it is not quite optimized for question asking and answering (those icons right next to each question are repetitive). In the running is stackoverflow.com which is widely used, already has a web2py tag, and the interface is ideal for asking questions as well as answering them. It even has gaming to incentivize people to answer questions. The only issues are, this forum is not promoted on the web2py main page, and thus there are a lot of unanswered questions. On Thursday, July 30, 2015 at 8:20:51 AM UTC-7, Anthony wrote: On Thursday, July 30, 2015 at 11:08:09 AM UTC-4, Richard wrote: Discourse seems really nice... It represents a lot of work... But as a proof of concept I think we should considering to use our own tool (web2py) to create our own mailing-list... Could we seriously be able to manage our own list and write our own app for this? This is a big undertake and maintenance contract... Although open source, Discourse is developed by a commercial enterprise (they offer hosting), and so it represents a substantial amount of development effort (though perhaps a web2py version could get a head start by using the Discourse Ember.js front end and attempting to replicate the Rails back end -- but if making a near exact copy, why bother?). For someone, perhaps developing a commercially-backed web2py-based alternative to Discourse would be worthwhile (though probably tough competition), but for the web2py core developers, I think the time might be better spent on (a) further developing web2py, (b) developing plugins and re-usable apps for web2py, and (c) web3py. Anthony -- 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 you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: Will database callbacks be appended each time model is changed?
Thank you, that clarifies things for me. On Thursday, 30 July 2015 11:09:07 UTC-4, Anthony wrote: Same answer. Each request is handled in a separate thread, so any code in a model, controller, or view is run in a fresh environment. When you define a table or specify callbacks in a model file, it's like it is happening for the first time (as it only applies to the current request) -- it is not as if a new copy of your callback function is being appended to an ever-growing list on every request. You would only be appending the same function twice if your code includes: db.tt._after_update.append(myfunc) in two separate places. Anthony On Thursday, July 30, 2015 at 11:01:51 AM UTC-4, Thomas Sitter wrote: Sorry I should have clarified my question. The part I'm concerned about is the use of *append* when adding the callback. If append is being used is there any check to make sure a function is not already in the list. I do not want to call the same callback multiple times when a record is updated. In the sourcecode _after_callback is implemented as a list and I see no checks to make sure the same function isn't inserted/called more than once. Perhaps it should be a set? On Thursday, 30 July 2015 00:50:49 UTC-4, Anthony wrote: auth.add_group() actually does a database insert, so you don't want to keep repeating it on every request (actually, I would probably move that code out of the app altogether, as it really only needs to be run once ever). Specifying the after update callback, on the other hand, does not affect the database at all -- it simply tells the DAL what to do after a database update. In fact, you need this to run on every request because it is part of the model definition (for the same reason you need to run the associated db.define_table() on every request). Anthony On Wednesday, July 29, 2015 at 10:59:59 PM UTC-4, Thomas Sitter wrote: Hello, I'm adding an _after_update callback to my table in db.py using: def myfunc(s,f): #do stuff return False db.tt._after_update.append(myfunc) My question is whether this will continuously append this method every time a database table is modified. I'm asking because I had a similar issue when creating the initial auth users/groups in db.py. I had to wrap the code in the following logic to prevent them being added multiple times if not db().select(db.auth_user.ALL).first(): group_1 = auth.add_group('group1', 'group1 employees') ... Thanks -- 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 you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [web2py] Joined query help
You may consider db.executesql( YOUR SQL QUERY ) You may also have a look to the generated query with ._select(...). If you add an underscore before the .select web2py return a string of the generated query instead of the results of the query... So you can see what is the issue and fix your web2py query... But basically I think your aggregate are wrong... I am pretty sure that source_count and source_sum are made against the table 2 without considering the join with table 1... Also... I really not understand you plain SQL query : table2.table1.batch_id Richard On Thu, Jul 30, 2015 at 6:50 AM, Ian Ryder i.ry...@appichar.com.au wrote: Hi, I’m trying to construct a query in web2py which I’m struggling with - help appreciated :) Table 1 table1.batch_id Table 2 table2.table1 table2.table3 table2.amount Table 3 table3.name Query is roughly: select table3.name, sum(table2.amount), count(table2.table3) where table2.table1.batch_id = batch_x groupby table2.table3 Achievable without a subquery of table1s that have a batch_id of batch_x? I have this but not getting the results I’d like: query = db.table1.batch_id == batch_x query = db.table2.table1 == db.table1.id source_count = db.table2.id.count().with_alias(*'source_count'*) source_sum = db.tabel2.amount.sum().with_alias(*'source_sum'*) sources = db(query).select( db.table2.table3, db.table3.name, source_count, source_sum, groupby=db.table2.table3 ) Essentially the records are in a batch, but the batch is stamped on the parent record only. I need to count the children of the parent and get the details of the reference records on those children. Thanks Ian PS - the tables are more imaginatively named in reality, just simplified it for here :) -- 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 you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- 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 you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Error in scheduler.py when scheduled task uses a jsonrpc webservice
I've been several hours trying to figure out what's happening, thinking that my code had a bug. But I think the problem is in scheduler.py. I think, not sure. The simplified scenario is the following. Two web2py apps running on the same web2py installation. App A defines a public jsonrpc service with a simple test() function. All defined in controller ws.py: # -*- coding: utf-8 -*- # appA/controllers/ws.py from gluon.tools import Service service = Service() def call(): session.forget() return service() @service.jsonrpc def test(): return True App B has the function newsletter() defined in db.py model, that consumes the webservice: # -*- coding: utf-8 -*- # appB/models/db.py # ... here, the table definitions, etc def newsletter(): from gluon.contrib.simplejsonrpc import ServerProxy ws = ServerProxy(CONFIG.url_webservice) ws.test() return True When I call the newsletter() function from inside app B (for example, from a controller), the function works ok: it connects to the webservice, calls the webservice function, and returns True. However, when I schedule the newsletter() function as a scheduler task, it always fails with this traceback: Traceback (most recent call last): File /home/gonguinguen/medios/gluon/scheduler.py, line 315, in executor result = dumps(_function(*args, **vars)) File applications/demo/models/db.py, line 837, in newsletter ws.test() File /home/gonguinguen/medios/gluon/contrib/simplejsonrpc.py, line 108, in lambda return lambda *args: self.call(attr, *args) File /home/gonguinguen/medios/gluon/contrib/simplejsonrpc.py, line 140, in call self.error.get('data', None)) File /home/gonguinguen/medios/gluon/contrib/simplejsonrpc.py, line 37, in __init__ value = %s: %s\n%s % (code, message, '\n'.join(data)) TypeError One detail that has been really confusing me: if I rename the test function to get_stats, it works. Don't ask me how. I've done a search in ALL files of both apps, the get_stats function isn't defined anywhere, it doesn't exists. The scheduled function fails always when calling the webservice method, except when the method is called get_stats. Really confusing. I've found a get_stats function defined in gluon/contrib/memcache.py, but I don't know if it has something to do with this scenario. If anyone is seeing something that I don't, please point it out! I'm pulling my hair off with this :P -- 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 you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [web2py] Re: When will we have a proper forum ?
In the running is stackoverflow.com which is widely used, already has a web2py tag, and the interface is ideal for asking questions as well as answering them. It even has gaming to incentivize people to answer questions. The only issues are, this forum is not promoted on the web2py main page, and thus there are a lot of unanswered questions. I think Stack Overflow is a great place for QA, but we still need a separate forum for the types of discussions and questions that don't fit the SO format. Anthony -- 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 you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: favicon.ico
On Wednesday, July 29, 2015 at 9:26:11 PM UTC-7, Александр Остыловский wrote: Hello! I replaced the files favicon.ico and favicon.png on the site and nothing has changed. Why is that? thanks Did you flush the browser cache? (I use Firefox a lot, and usually have a lot of tabs open, so I'm inclined to close FF down periodically so keep it from slowing to a crawl; this took care of flushing the cache, but you can try within the browser but using the gear menu to get to the right submenu.) /dps -- 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 you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [web2py] Re: When will we have a proper forum ?
On Thursday, July 30, 2015 at 12:26:40 PM UTC-4, Derek wrote: I really dislike Discourse. It's a Ruby app, and it requires a ton of addons. It's bloated and slow None of the Discourse based forums I've seen appear to be slow. Who cares if it's written in Ruby? , and since it uses virtual infinite scroll, it's very difficult to search within discussions. The built-in forum search has a search within topic option. But if you do prefer to use the browser's within-page search, in the topic progress bar in the lower right, you can click to jump to the bottom, which loads everything -- then you can search the page. This is actually superior to Google Groups, which doesn't enable searching an entire discussion unless you manually expand each post. Forums that paginate posts also don't enable you to search the entire discussion within the page (because the entire discussion cannot be loaded in a single page). Anthony -- 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 you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Joined query help
Hi, I’m trying to construct a query in web2py which I’m struggling with - help appreciated :) Table 1 table1.batch_id Table 2 table2.table1 table2.table3 table2.amount Table 3 table3.name Query is roughly: select table3.name, sum(table2.amount), count(table2.table3) where table2.table1.batch_id = batch_x groupby table2.table3 Achievable without a subquery of table1s that have a batch_id of batch_x? I have this but not getting the results I’d like: query = db.table1.batch_id == batch_x query = db.table2.table1 == db.table1.id source_count = db.table2.id.count().with_alias(*'source_count'*) source_sum = db.tabel2.amount.sum().with_alias(*'source_sum'*) sources = db(query).select( db.table2.table3, db.table3.name, source_count, source_sum, groupby=db.table2.table3 ) Essentially the records are in a batch, but the batch is stamped on the parent record only. I need to count the children of the parent and get the details of the reference records on those children. Thanks Ian PS - the tables are more imaginatively named in reality, just simplified it for here :) -- 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 you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [web2py] Is it possible to translate data in SQLFORM.grid?
Thank a lot Massimiliano. I've to remind to search more for solutions with the lambda function. Il giorno giovedì 30 luglio 2015 09:38:01 UTC+2, Massimiliano ha scritto: Have you tried? db.cake.fruit.represent = lambda v, r: T(db.fruits[v].name) grid=SQLFORM.grid(db.cake) On Thu, Jul 30, 2015 at 8:55 AM, Gael Princivalle gaelpri...@gmail.com javascript: wrote: Hello all. Is it possible to translate data in SQLFORM.grid? MODEL: db.define_table('fruits', Field('name', type='string'), format='%(name)s') db.define_table('cake', Field('name', type='string'), Field('fruit', 'reference fruits', requires = IS_IN_DB(db , db.fruits.id, '%(name)s'), represent=lambda id, r: db.fruits[id].name)) CONTROLLER: grid=SQLFORM.grid(db.cake) VIEW: {{=grid}} In the fruits table, names are in english, for example Apple. Is it possible to set for this field in the grid automatic traductions like T()? In this case for example I would like to have in an Italian page Mela instead of Apple. Thanks. -- 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 you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+un...@googlegroups.com javascript:. For more options, visit https://groups.google.com/d/optout. -- Massimiliano -- 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 you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.