[web2py] Re: Dropboxing movies into Web2py Server?
Hi thanks for that dropbox info! Really helpful! When it comes down to showing video at one side and presentation at another it is actually not so smart as people think. The brain has to take the 2D picture of the person and convert it to a 3D picture when it sees a face. Presenting material at the same time, overloads the brain and reduces learning (so it looks great but reduces learning). The great thing with for example Khan academy was that he took himself out of the picture and let students brains only focus on the material and his presentation. So video2py is not really for us. But thanks for the tip! cheers On Monday, May 27, 2013 3:09:32 AM UTC+8, Alan Etkin wrote: We are trying to set up our production flow so that the guys making small instructional movies will automatically upload them to our server with dropbox. My question is how I can get those movies into a database automatically with the filename as the description into a Field('Description') of our videos table? Does anyone have an idea of how we can make somthing like this a reality? For using dropbox services from web2py apps, there's a recipe in the manual http://www.web2py.com/books/default/chapter/29/14#Dropbox-API If you want a video database integrated with slides and subtitles, try this app: http://code.google.com/p/video2py -- --- 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/groups/opt_out.
[web2py] Re: Dropboxing movies into Web2py Server?
Yes but how do I import the video into a field of web2py? I look in my app and it does not get inside my app folder - so where does it go? Say for example I download the movie via the Dropbox API, how do I then add it to my video table? Cheers On Monday, May 27, 2013 4:02:55 AM UTC+8, Niphlod wrote: if I understood correctly what you need is just something that updates a table whenever a new file pops up into your dropbox folder (that receives yet the files). Just schedule something that lists all contents of a directory and update your table accordingly, let's say every minute. Scheduler can fit the bill, cause you'll be sure to have just one running process that takes care of it. If you want a more refined solution ubuntu has filesystem notifications, so hooking up with something like https://pypi.python.org/pypi/watchdogwouldn't be difficult. On Sunday, May 26, 2013 9:09:32 PM UTC+2, Alan Etkin wrote: We are trying to set up our production flow so that the guys making small instructional movies will automatically upload them to our server with dropbox. My question is how I can get those movies into a database automatically with the filename as the description into a Field('Description') of our videos table? Does anyone have an idea of how we can make somthing like this a reality? For using dropbox services from web2py apps, there's a recipe in the manual http://www.web2py.com/books/default/chapter/29/14#Dropbox-API If you want a video database integrated with slides and subtitles, try this app: http://code.google.com/p/video2py -- --- 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/groups/opt_out.
Re: [web2py] Re: database shootout
I can't give you any specifics right now as I haven't done any migrations in a long time but the next time I come across what I think to be a bug I'll be sure to post here. It'll be really great if we can fix those glitches. On Sun, May 26, 2013 at 8:38 PM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: Can you tell us more. I believe firebird does not support multiple alter tables in transaction and that is cause of some problems. Make sure you always mgrate one table at the time. On Sunday, 26 May 2013 06:24:49 UTC-5, Alexei Vinidiktov wrote: I use Firebird with web2py but I often have problems migrating db schemas because of incorrect sql migration scripts that web2py issues. On Sat, Mar 9, 2013 at 1:04 AM, pjag pjagi...@gmail.com wrote: web2py works nicely with Firebird DB. Highly recommended. On Thursday, March 7, 2013 3:41:18 PM UTC-5, BlueShadow wrote: Hi guys so I learned that using SQLlite for me wasn't a great choice(thanks Niphlod). But since I started using databases when I started to use web2py. I got no clue what database to use. I used sqllite because it was in the welcome app and it worked while having my site offline and with me being the only user. I know the choice is mostly personal prefrence but I thought give it a trail and ask you guys why you chose your particular database. It would be really nice if you could tell me a few pros and cons. I researched a little on PostgreSQL, MySQL and SQLite the informations I got were sometimes contradicting. I got about 2 times a writing command per page per visit. (keeping track of views for articles) but apparently thats already too much for SQLite. -- --- 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/**groups/opt_outhttps://groups.google.com/groups/opt_out . -- Alexei Vinidiktov -- --- 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/groups/opt_out. -- Alexei Vinidiktov -- --- 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/groups/opt_out.
Re: [web2py] how to use cache decorator within modules?
Hey, I ran into a problem. I was trying to do logging in my web2py application. I did the following for the same( referred to some article on internet) Add following codes inside model/log.py: def _init_log(): import logging logger=logging.getLogger(request.application) logger.setLevel(logging.DEBUG) handler=logging.FileHandler(%s.log%request.application) handler.setLevel(logging.DEBUG) handler.setFormatter(logging.Formatter( %(levelname)s %(asctime)s %(funcName)s %(lineno)d %(message) s)) logger.addHandler(handler) return logger logging=cache.ram('once',lambda:_init_log(),time_expire=) now, since logging does not work in modules, I will have to use lazy_lazy_cache in my looging.py Now how can I access the |logging| object ( or equivalent) in my controller? I want to do logging. I was supposed to do |logging.warn('bla')|, but problem is that with lazy_lazy_cache, |logging| is not defined. On Thursday, July 26, 2012 4:22:32 AM UTC+5:30, Anthony wrote: I am ok with renaming lazy_cache (although some people will ask, isn't the cache lazy already by definition?). We cannot call it current_cache because it is not current.cache and that would cause confusion. It is a lazy current.cache. I was thinking current_cache because it's a decorator that uses current.cache. We can use current.cache in a module, but we can't decorate with @current.cache, so I was thinking the next closest thing would be @current_cache (which uses current.cache internally anyway). Anthony -- --- 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/groups/opt_out.
[web2py] Re: Dropboxing movies into Web2py Server?
do you need to load it in your database as it was if it was uploaded directly ? http://web2py.com/books/default/chapter/29/06#More-on-uploads Il giorno lunedì 27 maggio 2013 08:25:53 UTC+2, Mika Sjöman ha scritto: Yes but how do I import the video into a field of web2py? I look in my app and it does not get inside my app folder - so where does it go? Say for example I download the movie via the Dropbox API, how do I then add it to my video table? Cheers On Monday, May 27, 2013 4:02:55 AM UTC+8, Niphlod wrote: if I understood correctly what you need is just something that updates a table whenever a new file pops up into your dropbox folder (that receives yet the files). Just schedule something that lists all contents of a directory and update your table accordingly, let's say every minute. Scheduler can fit the bill, cause you'll be sure to have just one running process that takes care of it. If you want a more refined solution ubuntu has filesystem notifications, so hooking up with something like https://pypi.python.org/pypi/watchdogwouldn't be difficult. On Sunday, May 26, 2013 9:09:32 PM UTC+2, Alan Etkin wrote: We are trying to set up our production flow so that the guys making small instructional movies will automatically upload them to our server with dropbox. My question is how I can get those movies into a database automatically with the filename as the description into a Field('Description') of our videos table? Does anyone have an idea of how we can make somthing like this a reality? For using dropbox services from web2py apps, there's a recipe in the manual http://www.web2py.com/books/default/chapter/29/14#Dropbox-API If you want a video database integrated with slides and subtitles, try this app: http://code.google.com/p/video2py -- --- 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/groups/opt_out.
Re: [web2py] asynchronous respons using twisted... is it possible?
Il 25/05/13 13:19, Ricardo Pedroso ha scritto: On Fri, May 24, 2013 at 12:05 PM, Manuele Pesenti manuele.pese...@gmail.com mailto:manuele.pese...@gmail.com wrote: Hi! Starting from the fact that using the anyserver script web2py can be run under twistedmatrix web server... is it possible to combine web2py with twisted async way of programming? You can't, according to this http://twistedmatrix.com/documents/12.3.0/web/howto/web-in-60/wsgi.html: Note that WSGIResource is a multithreaded WSGI container. Like any other WSGI container, you can't do anything asynchronous in your WSGI applications, even though this is a Twisted WSGI container If you want to stay in WSGI land you need to use something that is built around greenlets or around the enhanced generators. Probably your best bet, currently, is using gevent with monkey patch. And if your are querying a database you should use a pure python driver implementation to be able to be monkey patched by gevent. ok, thank you! M. Ricardo -- --- 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/groups/opt_out. -- --- 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/groups/opt_out.
[web2py] Re: Error on start: 'Auth' object has no attribute 'wikimenu'
Well, I installed the linux version on a VM I have and it worked perfectly. So, I guess I will stick with that. But something appears to be off with the compiled .app for the Mac. On Sunday, 26 May 2013 17:26:23 UTC-5, jfinke wrote: I just downloaded the mac version of web2py. When I start the server with a password, I immediately get an error ticket. Error ticket for welcomeTicket ID 127.0.0.1.2013-05-26.17-23-02.b3d13a3c-4b2c-445a-a4cf-2722911fae41 type 'exceptions.AttributeError' 'Auth' object has no attribute 'wikimenu'Versionweb2py™Version (2, 4, 7, 'stable', datetime.datetime(2013, 5, 24, 17, 48, 47))PythonPython 2.5.1: /Users/jeremy/Downloads/web2py/web2py.app/Contents/MacOS/pythonTraceback 1. 2. 3. 4. 5. Traceback (most recent call last): File /home/mdipierro/web2py/gluon/restricted.py, line 212, in restricted File /Users/jeremy/Downloads/web2py/web2py.app/Contents/Resources/applications/welcome/models/menu.py http://localhost:8002/admin/default/edit/welcome/models/menu.py, line 140, in module AttributeError: 'Auth' object has no attribute 'wikimenu' Error snapshot [image: help]http://localhost:8002/admin/default/ticket/welcome/127.0.0.1.2013-05-26.17-23-02.b3d13a3c-4b2c-445a-a4cf-2722911fae41# type 'exceptions.AttributeError'('Auth' object has no attribute 'wikimenu') When I go to line 140 in models/menu.py, I see: if auth in locals(): auth.wikimenu() Any ideas? Thanks! -- --- 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/groups/opt_out.
[web2py] Re: Error on start: 'Auth' object has no attribute 'wikimenu'
By linux version you mean the source code version of the web2py download? You can run the source version on your Mac directly, you only need to install python. Can't help with the original error since I don't use mac os x, but I'm sure some other mac user will come along shortly. Regards, Ales On Monday, May 27, 2013 2:14:37 PM UTC+2, jfinke wrote: Well, I installed the linux version on a VM I have and it worked perfectly. So, I guess I will stick with that. But something appears to be off with the compiled .app for the Mac. On Sunday, 26 May 2013 17:26:23 UTC-5, jfinke wrote: I just downloaded the mac version of web2py. When I start the server with a password, I immediately get an error ticket. Error ticket for welcomeTicket ID 127.0.0.1.2013-05-26.17-23-02.b3d13a3c-4b2c-445a-a4cf-2722911fae41 type 'exceptions.AttributeError' 'Auth' object has no attribute 'wikimenu'Versionweb2py™Version (2, 4, 7, 'stable', datetime.datetime(2013, 5, 24, 17, 48, 47))PythonPython 2.5.1: /Users/jeremy/Downloads/web2py/web2py.app/Contents/MacOS/pythonTraceback 1. 2. 3. 4. 5. Traceback (most recent call last): File /home/mdipierro/web2py/gluon/restricted.py, line 212, in restricted File /Users/jeremy/Downloads/web2py/web2py.app/Contents/Resources/applications/welcome/models/menu.py http://localhost:8002/admin/default/edit/welcome/models/menu.py, line 140, in module AttributeError: 'Auth' object has no attribute 'wikimenu' Error snapshot [image: help]http://localhost:8002/admin/default/ticket/welcome/127.0.0.1.2013-05-26.17-23-02.b3d13a3c-4b2c-445a-a4cf-2722911fae41# type 'exceptions.AttributeError'('Auth' object has no attribute 'wikimenu') When I go to line 140 in models/menu.py, I see: if auth in locals(): auth.wikimenu() Any ideas? Thanks! -- --- 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/groups/opt_out.
[web2py] computed field and reference
Hi, I want to compute a field based on the value of another field, which is a foreign key, in a way similar to: db.define_table('language', Field('language', 'string', required = True, unique = True, length = 64 ), format='%(language)s' ) db.define_table('problemsHere', Field('language', 'reference language', required = True, unique = False ), Field('otherField', 'integer'), Field('computedField', length=32, unique=True, writable=False, readable=False, compute=lambda row: db.language(row['language']). language) ) I've tried both syntaxes from this similar questionhttps://groups.google.com/forum/?fromgroups#!topic/web2py/x53LPKqRpgIbut none of them seems to work for me. The computedField is always set to None. Does anybody knows a way to access a foreign key in a computed field, solving my problem? Thank you in advance, ~Matteo -- --- 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/groups/opt_out.
[web2py] Re: Refresh page on successful form submission; and response.flash?
Hi, I am having similar situation. It seems that after submission, the menu is not refreshed. My question is what is the command for refreshing the menu? the same effect of F5 regards, Ashraf On Wednesday, March 20, 2013 11:49:26 AM UTC+3, Niphlod wrote: if you're not using load the page refreshes entirely after a submission. the behaviour now is to redirect to #, so you see the switch from /foo/1 to /foo/1# . Inspect it with your preferred developers tools, you'll see a POST and a redirect On Wednesday, March 20, 2013 7:10:01 AM UTC+1, Alec Taylor wrote: (I'm using SQLFORM) Currently all I get is my `response.flash` message and the URL changes from: http://localhost/foo/1; to http://localhost/foo/1#;. Instead I want the whole page to refresh so the changes the user made propagates. I do not want to use LOAD. How do I refresh the page on successful form submission? Thanks for all suggestions, Alec Taylor -- --- 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/groups/opt_out.
[web2py] Re: Refresh page on successful form submission; and response.flash?
a normal form reloads the page entirely (as if you push f5). If you're fiddling with ajax, then of course the entire page is not reloaded, but if you need that kind of functionality switch to a normal form handling. Il giorno lunedì 27 maggio 2013 16:07:38 UTC+2, webpypy ha scritto: Hi, I am having similar situation. It seems that after submission, the menu is not refreshed. My question is what is the command for refreshing the menu? the same effect of F5 regards, Ashraf On Wednesday, March 20, 2013 11:49:26 AM UTC+3, Niphlod wrote: if you're not using load the page refreshes entirely after a submission. the behaviour now is to redirect to #, so you see the switch from /foo/1 to /foo/1# . Inspect it with your preferred developers tools, you'll see a POST and a redirect On Wednesday, March 20, 2013 7:10:01 AM UTC+1, Alec Taylor wrote: (I'm using SQLFORM) Currently all I get is my `response.flash` message and the URL changes from: http://localhost/foo/1; to http://localhost/foo/1#;. Instead I want the whole page to refresh so the changes the user made propagates. I do not want to use LOAD. How do I refresh the page on successful form submission? Thanks for all suggestions, Alec Taylor -- --- 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/groups/opt_out.
Re: [web2py] Restful authentication and CORS
Hi Alec, On Tuesday, July 17, 2012 1:03:04 AM UTC+8, Alec Taylor wrote: On Tue, Jul 17, 2012 at 2:20 AM, David Marko dma...@tiscali.czjavascript: wrote: +1 from me having this. Btw. On client side i'm using AngularJS and Trigger.io (instead of PhoneGap) I've been looking around, and will have one of the following setups: - *AngularJS http://angularjs.org/* with *BarristerRPChttp://barrister.bitmechanic.com/ * - *BackboneJS http://backbonejs.org/* with *Backbone.Rpchttps://github.com/asciidisco/Backbone.Rpc * - *JQuery mobile* http://jquerymobile.com/ with *jquery-jsonrpc*https://github.com/datagraph/jquery-jsonrpc(or plain JSON.stringify) All within a *PhoneGap http://phonegap.com/* (*Apache Cordovahttp://incubator.apache.org/cordova/ *) app using the* Facebook connect pluginhttps://github.com/davejohnson/phonegap-plugin-facebook-connect * for authentication (for graceful downgrade from Facebook mobile apphttps://www.facebook.com/mobile/to Facebook website auth https://touch.facebook.com). I should have a PoC http://en.wikipedia.org/wiki/Proof_of_Concept on August 2 with a full backend written in web2py and two frontends (one in web2py views; the other in one of the above frameworks). Subsequently I'll release it under a full open-source license onto Bitbucket. I'll post to the web2py list with link + slides when the repo is live Sorry for late response. I am a web2py veteran who dives into restful world only recently. Do you have any finding to share about the restful authentication in web2py? Thanks in advance! Regards, Ray -- --- 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/groups/opt_out.
[web2py] Re: Refresh page on successful form submission; and response.flash?
Thank you Niphlod, no ajax. let me rephrase my question, I have a button, once clicked, I have to do things before defining the url of the controller. Doing these things in the beginning of the controller means after the refreshing. I hope my English is not very much confusing. regards, Ashraf -- --- 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/groups/opt_out.
[web2py] Re: Refresh page on successful form submission; and response.flash?
You can update the response.menu object wherever you want. Anthony On Monday, May 27, 2013 10:49:38 AM UTC-4, webpypy wrote: Thank you Niphlod, no ajax. let me rephrase my question, I have a button, once clicked, I have to do things before defining the url of the controller. Doing these things in the beginning of the controller means after the refreshing. I hope my English is not very much confusing. regards, Ashraf -- --- 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/groups/opt_out.
[web2py] hiding a column in smartgrid
Hi, My model contains a URL field, and I'm displaying the model in a SQLFORM.smartgrid. I don't want to show the whole URL, but I do want the user to be able to visit the URL directly from the grid. So I use the 'links' parameter to SQLFORM.smartgrid. It works very nicely: links=[dict(header=Link, body=lambda row: A(Go, _href=row.linkfield,_target =_blank))] But it doesn't work if I remove 'linkfield' from the 'fields' parameter to SQLFORM.smartgrid. That's because, according to the documentationhttp://web2py.com/books/default/chapter/29/07#SQLFORM.grid-and-SQLFORM.smartgrid : *'fields' is a list of fields to be fetched from the database. It is also used to determine which fields to be shown in the grid view.* In my use case, I want the field to be fetched, but not shown. Is there a smart (pun intended :) way to do this? best regards -Ricardo ps. I'd prefer not to mess around with jquery, and anyway it seems the th does not have a CSS class or id that would allow me to hide an undesired column. -- --- 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/groups/opt_out.
[web2py] PAAS supporting web2py
Hi Is there any PAAS (like openshift/cloudfoundry) which support web2py? regards Arvind -- --- 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/groups/opt_out.
[web2py] Re: Refresh page on successful form submission; and response.flash?
Thank you, Anthony. my question is where . what is the location , in which the response.menu can be updated, after clicking the button and before defining the url (controller) of the button ? in other words,where can I write commands , that will be executed after the button is clicked and before executing the controller? if i write these commands in the beginning of the controller, these commands will be executed after the refresh, but i need them executed before the refresh, and after the button is clicked. I understand that button is defined in the view with the url of the controller, is it possible to write something in between? Regards, Ashraf -- --- 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/groups/opt_out.
[web2py] Re: Refresh page on successful form submission; and response.flash?
Sorry, it's not at all clear to me what you are asking. Perhaps you can show some code and explain the exact workflow to clarify. Anthony On Monday, May 27, 2013 12:19:48 PM UTC-4, webpypy wrote: Thank you, Anthony. my question is where . what is the location , in which the response.menu can be updated, after clicking the button and before defining the url (controller) of the button ? in other words,where can I write commands , that will be executed after the button is clicked and before executing the controller? if i write these commands in the beginning of the controller, these commands will be executed after the refresh, but i need them executed before the refresh, and after the button is clicked. I understand that button is defined in the view with the url of the controller, is it possible to write something in between? Regards, Ashraf -- --- 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/groups/opt_out.
[web2py] Re: PAAS supporting web2py
Also, GAE, Heroku, DotCloud, etc. On Monday, May 27, 2013 12:22:04 PM UTC-4, Relsi Hur Maron wrote: Pythonanywhere https://www.pythonanywhere.com/ Em segunda-feira, 27 de maio de 2013 13h14min39s UTC-3, Arvind Gupta escreveu: Hi Is there any PAAS (like openshift/cloudfoundry) which support web2py? regards Arvind -- --- 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/groups/opt_out.
Re: [web2py] database shootout
Among RDBMSs, I personally prefer Postgres too, for many of the reasons mentioned - quality of build and add-ons, platform availability, SQL compliance, optional commercial support, Oracle compatibility. But another factor to consider is deployment on IaaS/PaaS options. Heroku and OpenShift can provision Postgres and MySQL; Google App Engine and PythonAnywhere only provide MySQL. PythonAnywhere is a terrific option; I'm a bit surprised they don't offer Postgres. Maybe someone with influence on the PythonAnywhere folks can give them a nudge? Could push many projects their way. On Thursday, March 7, 2013 4:36:29 PM UTC-5, Richard wrote: Also you should consider that DAL adapter are not all equal on quality, quality for a given adapter is correlated to the user base for a given (my interpretation) and since Postgres is largely used it adapter is really good. Notice that there is two adapter for postgres psycopg2 and pg8000 the former is much better then the latter that is still experimental I think. Richard On Thu, Mar 7, 2013 at 4:15 PM, BlueShadow kevin@gmail.comjavascript: wrote: Thanks Richard. Postgres Pros: Many User in web2py, open source Cons: Speed MySQL Pros: Speed On Thursday, March 7, 2013 9:57:48 PM UTC+1, Richard wrote: Postgres, full open source, supported by a consortium, commercial support available (ex.: Enterprise DB), build-in Foreing key constraint, PL SQL (so you can migrate to Oracle), Still with commercial build you are still at one/ten the price of Oracle DB... Also, I think many serious web2py user here are using Postgres. You will have Cons about speed... And Pros for MySQL for the inverse (MySQL speedier). The rule of thumd is, if you need speed on retreiving information (you mostly do select query) go with MySQL. It is reputed faster on select. Richard On Thu, Mar 7, 2013 at 3:41 PM, BlueShadow kevin@gmail.com wrote: Hi guys so I learned that using SQLlite for me wasn't a great choice(thanks Niphlod). But since I started using databases when I started to use web2py. I got no clue what database to use. I used sqllite because it was in the welcome app and it worked while having my site offline and with me being the only user. I know the choice is mostly personal prefrence but I thought give it a trail and ask you guys why you chose your particular database. It would be really nice if you could tell me a few pros and cons. I researched a little on PostgreSQL, MySQL and SQLite the informations I got were sometimes contradicting. I got about 2 times a writing command per page per visit. (keeping track of views for articles) but apparently thats already too much for SQLite. -- --- 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/**groups/opt_outhttps://groups.google.com/groups/opt_out . -- --- 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/groups/opt_out. -- --- 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/groups/opt_out.
[web2py] Re: PAAS supporting web2py
Pythonanywhere https://www.pythonanywhere.com/ Em segunda-feira, 27 de maio de 2013 13h14min39s UTC-3, Arvind Gupta escreveu: Hi Is there any PAAS (like openshift/cloudfoundry) which support web2py? regards Arvind -- --- 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/groups/opt_out.
[web2py] Re: [web2py:9361] Re: web2py + opencv
Hello there! I know this topic is a bit old but have you managed to do something about face detection in web2py? I'm currently trying to do the same so it will be nice if you have some advices to share. Cheers, On Monday, September 22, 2008 4:32:29 AM UTC+7, Jailson Brito Jr. wrote: It worked... thanks... I`m trying to make an OpenCV face detect code to work together with web2py... Sooner or later I`be here reporting my success or not.. :) On Sun, Sep 21, 2008 at 5:25 PM, mdipierro mdip...@cs.depaul.edujavascript: wrote: #2 yes python web2py.py (assuming you have python 2.5) On Sep 21, 3:22 pm, Jailson Brito Jr. jail...@gmail.com wrote: Hi, I tried both. #1 using double slashs to path on applications Traceback (most recent call last): File gluon\restricted.pyc, line 62, in restricted File G:\web2py\applications\teteia/controllers/default.py, line 11, in module File G:\web2py\applications\teteia\modules\opencv\__init__.py, line 55, in module MemoryError #2 using the path on site-packages but running from server Traceback (most recent call last): File gluon\restricted.pyc, line 62, in restricted File G:\web2py\applications\teteia/controllers/default.py, line 9, in module ImportError: No module named opencv.cv when you say, running from source... it means I should run the web2py.py instead of the web2py.exe ? On Sun, Sep 21, 2008 at 5:11 PM, mdipierro mdipie...@cs.depaul.edu wrote: Try: #session.forget() # comment or remove if you want to store sessions import sys.path='G:\\web2py\\applications\\teteia\\modules\\' if not path in sys.path: sys.path.append(path) import applications.teteia.modules.opencv.cv as cv def index(): response.flash=T('Welcome to web2py') return dict(message=T('Hello World')) and, if you are running from source, try simply import opencv.cv as cv def index(): response.flash=T('Welcome to web2py') return dict(message=T('Hello World')) Paths under windows are always a mess. Massimo On Sep 21, 2:46 pm, Jailson Brito Jr. jail...@gmail.com wrote: Good to hear that! :) I tried the solution 1, and I got the error: Traceback (most recent call last): File gluon\restricted.pyc, line 61, in restricted File G:\web2py\applications\teteia/controllers/default.py, line 4 path='G:\web2py\applications\teteia\modules\' ^ SyntaxError: EOL while scanning single-quoted string I tried double-quoted string too, but got the exact same error. I'm in the beginning of my project, so I just changed the default.py from the Hello World to #session.forget() # comment or remove if you want to store sessions import sys path='G:\web2py\applications\teteia\modules\' if not path in sys.path: sys.path.append(path) import applications.teteia.modules.opencv.cvas cv def index(): response.flash=T('Welcome to web2py') return dict(message=T('Hello World')) OpenCV is correctly installed in site-packages also, as you proposed in your second solution, but maybe I tried to import it in a wrong way also. But I prefer to put everything inside the applications path, if possible. On Sun, Sep 21, 2008 at 4:32 PM, mdipierro mdipie...@cs.depaul.edu wrote: The fact is, this not a web2py error. this is a opencv error. If this is thread related you are going to face the same problem with any framework out there. But I think this is not the case. Anyway, I am reading your original post again and some blogs. opencv appears to be thread safe. I think your problem is just path related. If this is the case there are two possible solutions: 1) In you app, before importing opencv, add opencv to the path: import sys path='G:\web2py\applications\teteia\modules\' if not path in sys.path: sys.path.append(path) 2) install opencv where it is intended to be in site-packages, not under your app, and run web2py from source. I am sure this is an easy one to fix. If you want, send me the app and I will be happy yo take a look at it. Massimo I`m trying to develop a web interface for OpenCV... I made a sketch of how I want it, see the pictures below: http://jailson.googlepages.com/indigestus.pnghttp://jailson.googlepag. .. http://jailson.googlepages.com/indigestus.png Sorry for non english texts. For the graphical interface I think that ExtJS could do the trick. And to handle with OpenCV functions I thought Web2Py could work... But I am starting to think that maybe I was wrong! On Sun, Sep 21, 2008 at 3:24 PM, mdipierro mdipie...@cs.depaul.edu wrote: I do not know opencv and I need to look into this but here are some
[web2py] No module named connections
* Hi all I have just uploaded some new code to our existing web2py instance. I am getting the following error: type 'exceptions.RuntimeError' Failure to connect, tried 5 times: Traceback (most recent call last): File /opt/web2py/gluon/dal.py, line 6755, in __init__ self._adapter = ADAPTERS[self._dbname](**kwargs) File /opt/web2py/gluon/dal.py, line 2384, in __init__ if do_connect: self.reconnect() File /opt/web2py/gluon/dal.py, line 562, in reconnect self.connection = f() File /opt/web2py/gluon/dal.py, line 2382, in connector return self.driver.connect(**driver_args) File /opt/web2py/gluon/contrib/pymysql/__init__.py, line 92, in Connect from connections import Connection File /opt/web2py/gluon/custom_import.py, line 83, in custom_importer return base_importer(pname, globals, locals, fromlist, level) File /opt/web2py/gluon/custom_import.py, line 124, in __call__ result = NATIVE_IMPORTER(name, globals, locals, fromlist, level) ImportError: No module named connections The only thing that the developer changed was some xlrd stuff which I have installed on the OS Centos 6.4. The developer also does not have a module named connections yet it runs on his Ubuntu box without issue. I had a similar issue with rq, but I simply removed the relevant queue.py and everything was fine? The problem here is that there is noe connections module? Could somebody please point me in the right direction as we need to get the site live. tia ed * -- --- 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/groups/opt_out.
[web2py] Re: Refresh page on successful form submission; and response.flash?
ok, let me try again. my description of a normal scenario: i have a view displaying list of rows. there is a button (link) for each row. The link is pointing to a controller, which is related to a second view. once the button(link) is clicked, the controller will start and show the second view. ( the menu is also refreshed). what i am trying to do is: change the menu, based on the selected row (clicked button). Where do i write these changes? when: This needs to be done after the button clicking and before the start of the controller . I did: changing the menu in the beginning of the controller definition will not be reflected in the menu, because at that time, it has been refreshed already and to see the change, a manual f5 refresh is required. I am trying to do the menu change before the refresh, so i will not need to refresh using f5. Thank you for your patience. Ashraf -- --- 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/groups/opt_out.
[web2py] Re: hiding a column in smartgrid
before the call to SQLFORM.smartgrid, add db.tablename.linkfield.readable=False On Monday, 27 May 2013 23:57:31 UTC+8, Ricardo Cárdenas wrote: Hi, My model contains a URL field, and I'm displaying the model in a SQLFORM.smartgrid. I don't want to show the whole URL, but I do want the user to be able to visit the URL directly from the grid. So I use the 'links' parameter to SQLFORM.smartgrid. It works very nicely: links=[dict(header=Link, body=lambda row: A(Go, _href=row.linkfield,_target =_blank))] But it doesn't work if I remove 'linkfield' from the 'fields' parameter to SQLFORM.smartgrid. That's because, according to the documentationhttp://web2py.com/books/default/chapter/29/07#SQLFORM.grid-and-SQLFORM.smartgrid : *'fields' is a list of fields to be fetched from the database. It is also used to determine which fields to be shown in the grid view.* In my use case, I want the field to be fetched, but not shown. Is there a smart (pun intended :) way to do this? best regards -Ricardo ps. I'd prefer not to mess around with jquery, and anyway it seems the th does not have a CSS class or id that would allow me to hide an undesired column. -- --- 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/groups/opt_out.
Re: [web2py] Login with ID rather than email?
Hmm, that does slightly confuse me. Am I supposed to add in a 'username' field? This is how the `auth_user` table looks by default, and after registering I tried the value in each column for username; but nothing logged me in: CREATE TABLE auth_user( id INTEGER PRIMARY KEY AUTOINCREMENT, first_name CHAR(128), last_name CHAR(128), email CHAR(512), password CHAR(512), registration_key CHAR(512), reset_password_key CHAR(512), registration_id CHAR(512) ); On Mon, May 27, 2013 at 3:13 PM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: auth.define_tables(username=True) On Sunday, 26 May 2013 22:41:09 UTC-5, marco mansilla wrote: El Mon, 27 May 2013 13:00:11 +1000 Alec Taylor alec.t...@gmail.com escribió: Is it possible to login to web2py by ID rather than by email? Thanks for all information, Alec Taylor if you mean something like username yes... and there are some ways to hardcode the behaviour for this field to take the id value... when you define a username field, automatically auth asks for it instead of email. Marco. -- --- 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/groups/opt_out. -- --- 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/groups/opt_out.
[web2py] how display var in menu
How would I display the output of this function in a menu? def test1(): a = 20 b = 30 myval = a+b return myval These come close but I don't understand how to implement the second one, response.menu = [ [CAT(I(_class='icon-home'), T('Home')), False, URL('default', 'index')], # shows an icon, not a variable [[' name',request.function=='item',URL(r=request,f='item')]] # is item the function? ] I want to display a summary variable that changes upon conditions, and want to display a sparkline graph below that under the menu item. thanks for any suggestions, Margaret -- --- 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/groups/opt_out.
[web2py] How to mark the 'id' field as readable and writable?
Here is what I've tried on my auth_user table: Field('id', 'id', readable=True, writable=True, unique=True), But it makes not difference to what is displayed on screen. How do I get this to work? Thanks for all suggestions -- --- 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/groups/opt_out.
[web2py] Re: How to mark the 'id' field as readable and writable?
you DO know that id is by default a serial, hence is calculated by the db an there's no way to force a value for it, right ? On Monday, May 27, 2013 9:12:42 PM UTC+2, Alec Taylor wrote: Here is what I've tried on my auth_user table: Field('id', 'id', readable=True, writable=True, unique=True), But it makes not difference to what is displayed on screen. How do I get this to work? Thanks for all suggestions -- --- 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/groups/opt_out.
[web2py] Re: how display var in menu
depends on what you need to be the output of that function. is is something that needs to be visible, something that needs to be put in the link of that menu item, other things ? a simple myresult = test1() response.menu = [ (myresult, False, URL('default', 'index'), []) ] should get you started in the right direction On Monday, May 27, 2013 8:50:05 PM UTC+2, greaneym wrote: How would I display the output of this function in a menu? def test1(): a = 20 b = 30 myval = a+b return myval These come close but I don't understand how to implement the second one, response.menu = [ [CAT(I(_class='icon-home'), T('Home')), False, URL('default', 'index')], # shows an icon, not a variable [[' name',request.function=='item',URL(r=request,f='item')]] # is item the function? ] I want to display a summary variable that changes upon conditions, and want to display a sparkline graph below that under the menu item. thanks for any suggestions, Margaret -- --- 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/groups/opt_out.
[web2py] Re: computed field and reference
I can't replicate the issue you're having. That syntax works. Check again your code BTW: it's quite a strange model. you want the language to be unique in the first table. In the second one you reference the first table (that is unique by definition) with a non unique reference, but then you compute a field to be unique...if this is not a cut/paste just to show us a possible problem and is in fact your underlying model, I'd advise to rethink to it :P On Monday, May 27, 2013 3:53:03 PM UTC+2, Matteo Luperto wrote: Hi, I want to compute a field based on the value of another field, which is a foreign key, in a way similar to: db.define_table('language', Field('language', 'string', required = True, unique = True, length = 64), format='%(language)s' ) db.define_table('problemsHere', Field('language', 'reference language', required = True, unique = False), Field('otherField', 'integer'), Field('computedField', length=32, unique=True, writable=False, readable=False, compute=lambda row: db.language(row['language']). language) ) I've tried both syntaxes from this similar questionhttps://groups.google.com/forum/?fromgroups#!topic/web2py/x53LPKqRpgIbut none of them seems to work for me. The computedField is always set to None. Does anybody knows a way to access a foreign key in a computed field, solving my problem? Thank you in advance, ~Matteo -- --- 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/groups/opt_out.
Re: [web2py] Login with ID rather than email?
if you do auth.define_tables(username=True) a username field is added. BTW: by id we all understood you want to login using the username in the registration rather than the email. If instead you meant by the serial id associated with the auth_user row then forget about username On Monday, May 27, 2013 8:38:30 PM UTC+2, Alec Taylor wrote: Hmm, that does slightly confuse me. Am I supposed to add in a 'username' field? This is how the `auth_user` table looks by default, and after registering I tried the value in each column for username; but nothing logged me in: CREATE TABLE auth_user( id INTEGER PRIMARY KEY AUTOINCREMENT, first_name CHAR(128), last_name CHAR(128), email CHAR(512), password CHAR(512), registration_key CHAR(512), reset_password_key CHAR(512), registration_id CHAR(512) ); On Mon, May 27, 2013 at 3:13 PM, Massimo Di Pierro massimo@gmail.com javascript: wrote: auth.define_tables(username=True) On Sunday, 26 May 2013 22:41:09 UTC-5, marco mansilla wrote: El Mon, 27 May 2013 13:00:11 +1000 Alec Taylor alec.t...@gmail.com escribió: Is it possible to login to web2py by ID rather than by email? Thanks for all information, Alec Taylor if you mean something like username yes... and there are some ways to hardcode the behaviour for this field to take the id value... when you define a username field, automatically auth asks for it instead of email. Marco. -- --- 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/groups/opt_out. -- --- 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/groups/opt_out.
[web2py] Re: Refresh page on successful form submission; and response.flash?
To Anthony , Niphlod and Massimo : I am asking for an answer to my question. But, Now I have a different question. Is my question valid? or am i making myself clear? Regards, Ashraf -- --- 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/groups/opt_out.
Re: [web2py] Re: hiding a column in smartgrid
Thanks Calvin! Exactly what I needed. Is there be a way to hide it at the grid level, but let it be readable when viewing the record detail? (I can do without it -- just curious really.) best regards On Mon, May 27, 2013 at 1:21 PM, Calvin calvin@gmail.com wrote: before the call to SQLFORM.smartgrid, add db.tablename.linkfield.readable=False On Monday, 27 May 2013 23:57:31 UTC+8, Ricardo Cárdenas wrote: Hi, My model contains a URL field, and I'm displaying the model in a SQLFORM.smartgrid. I don't want to show the whole URL, but I do want the user to be able to visit the URL directly from the grid. So I use the 'links' parameter to SQLFORM.smartgrid. It works very nicely: links=[dict(header=Link, body=lambda row: A(Go, _href=row.linkfield,_target =_blank))] But it doesn't work if I remove 'linkfield' from the 'fields' parameter to SQLFORM.smartgrid. That's because, according to the documentationhttp://web2py.com/books/default/chapter/29/07#SQLFORM.grid-and-SQLFORM.smartgrid : *'fields' is a list of fields to be fetched from the database. It is also used to determine which fields to be shown in the grid view.* In my use case, I want the field to be fetched, but not shown. Is there a smart (pun intended :) way to do this? best regards -Ricardo ps. I'd prefer not to mess around with jquery, and anyway it seems the th does not have a CSS class or id that would allow me to hide an undesired column. -- --- 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/wKKlDWIuA3U/unsubscribe?hl=en. 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/groups/opt_out. -- http://alum.mit.edu/www/rcardenas Ricardo Cárdenasrcarde...@alum.mit.edu| http://alum.mit.edu/www/rcardenas | Perú: (+51) 96176-3092 | USA: +1 650 395-7772 | México: +52 (155) 2691-9958 -- --- 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/groups/opt_out.
Re: [web2py] asynchronous respons using twisted... is it possible?
Il 25/05/13 13:19, Ricardo Pedroso ha scritto: Note that WSGIResource is a multithreaded WSGI container. Like any other WSGI container, you can't do anything asynchronous in your WSGI applications, even though this is a Twisted WSGI container If you want to stay in WSGI land you need to use something that is built around greenlets or around the enhanced generators. Probably your best bet, currently, is using gevent with monkey patch. And if your are querying a database you should use a pure python driver implementation to be able to be monkey patched by gevent. Ricardo Hi Riccardo, just a clarification... any contraindication to use DAL with do_connect=False out of web2py to build up query I need in async programming with twisted? Thank you M. -- --- 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/groups/opt_out.
[web2py] Re: Refresh page on successful form submission; and response.flash?
I didn't understand what you need. if you need to update just the menu, then you HAVE to do it in ajax (and by hand, there's no web2py facility to change just the menu portion). If instead you want a page reload, than the normal link should provide exactly what you need.at most, once you click on the grid and you're redirected to the second controller, if you need to adjust the menu inside it you can issue a redirect(URL('anothercontroller')) alltogether. Maybe if you can post the workflow with a simple example on the behaviour you'd like, it would be more understandable. On Monday, May 27, 2013 10:14:46 PM UTC+2, webpypy wrote: To Anthony , Niphlod and Massimo : I am asking for an answer to my question. But, Now I have a different question. Is my question valid? or am i making myself clear? Regards, Ashraf -- --- 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/groups/opt_out.
[web2py] Re: Refresh page on successful form submission; and response.flash?
Thank you, Niphlod. As you said,I created an extra controller, who solved my problem. Regards, Ashraf -- --- 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/groups/opt_out.
[web2py] Re: database shootout
On 05/27/2013 09:29 AM, Ricardo Cárdenas wrote: PythonAnywhere is a terrific option; I'm a bit surprised they don't offer Postgres. Maybe someone with influence on the PythonAnywhere folks can give them a nudge? Could push many projects their way. I've been following their 'forum' for a little while now... Postgres has been in fairly high demand over on pythonanywhere.com, judging by requests for it. From the looks of things, they recently made 9.2 available... but I haven't tested that to confirm. -- --- 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/groups/opt_out.
Re: [web2py] Login with ID rather than email?
I have actually migrated some data, and have a second userid type field; and the email field isn't unique. How do I enable login with that second userid field (of type integer)? On Tue, May 28, 2013 at 5:48 AM, Niphlod niph...@gmail.com wrote: if you do auth.define_tables(username=True) a username field is added. BTW: by id we all understood you want to login using the username in the registration rather than the email. If instead you meant by the serial id associated with the auth_user row then forget about username On Monday, May 27, 2013 8:38:30 PM UTC+2, Alec Taylor wrote: Hmm, that does slightly confuse me. Am I supposed to add in a 'username' field? This is how the `auth_user` table looks by default, and after registering I tried the value in each column for username; but nothing logged me in: CREATE TABLE auth_user( id INTEGER PRIMARY KEY AUTOINCREMENT, first_name CHAR(128), last_name CHAR(128), email CHAR(512), password CHAR(512), registration_key CHAR(512), reset_password_key CHAR(512), registration_id CHAR(512) ); On Mon, May 27, 2013 at 3:13 PM, Massimo Di Pierro massimo@gmail.com wrote: auth.define_tables(username=True) On Sunday, 26 May 2013 22:41:09 UTC-5, marco mansilla wrote: El Mon, 27 May 2013 13:00:11 +1000 Alec Taylor alec.t...@gmail.com escribió: Is it possible to login to web2py by ID rather than by email? Thanks for all information, Alec Taylor if you mean something like username yes... and there are some ways to hardcode the behaviour for this field to take the id value... when you define a username field, automatically auth asks for it instead of email. Marco. -- --- 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/groups/opt_out. -- --- 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/groups/opt_out. -- --- 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/groups/opt_out.
Re: [web2py] Login with ID rather than email?
(I have tried the `auth.settings.login_userfield = 'olduserid'` option; but all it did was change the input label, the validator (for email) remained) On Tue, May 28, 2013 at 11:24 AM, Alec Taylor alec.tayl...@gmail.com wrote: I have actually migrated some data, and have a second userid type field; and the email field isn't unique. How do I enable login with that second userid field (of type integer)? On Tue, May 28, 2013 at 5:48 AM, Niphlod niph...@gmail.com wrote: if you do auth.define_tables(username=True) a username field is added. BTW: by id we all understood you want to login using the username in the registration rather than the email. If instead you meant by the serial id associated with the auth_user row then forget about username On Monday, May 27, 2013 8:38:30 PM UTC+2, Alec Taylor wrote: Hmm, that does slightly confuse me. Am I supposed to add in a 'username' field? This is how the `auth_user` table looks by default, and after registering I tried the value in each column for username; but nothing logged me in: CREATE TABLE auth_user( id INTEGER PRIMARY KEY AUTOINCREMENT, first_name CHAR(128), last_name CHAR(128), email CHAR(512), password CHAR(512), registration_key CHAR(512), reset_password_key CHAR(512), registration_id CHAR(512) ); On Mon, May 27, 2013 at 3:13 PM, Massimo Di Pierro massimo@gmail.com wrote: auth.define_tables(username=True) On Sunday, 26 May 2013 22:41:09 UTC-5, marco mansilla wrote: El Mon, 27 May 2013 13:00:11 +1000 Alec Taylor alec.t...@gmail.com escribió: Is it possible to login to web2py by ID rather than by email? Thanks for all information, Alec Taylor if you mean something like username yes... and there are some ways to hardcode the behaviour for this field to take the id value... when you define a username field, automatically auth asks for it instead of email. Marco. -- --- 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/groups/opt_out. -- --- 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/groups/opt_out. -- --- 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/groups/opt_out.
[web2py] Re: help with functions index
O I got that... thanks for the response... However I still miss some details... like for an example I was looking some way to redirect the successful register to another view... to continue the registration process with other fields I could not find anything on documentation... I found this: def somefunc(var): do_something_with(var) auth.settings.login_onaccept=somefunc but only for page login... and how about after register??? another question could be, how to change register behavior... and put like 2 or 3 screens llike NEXT... NEXT... FINISH... to collect more data? I know you guys in this forum can help... but documentation is not clear... but thanks anyway!! Em domingo, 26 de maio de 2013 20h54min05s UTC-3, Anthony escreveu: globals()http://docs.python.org/2/library/functions.html?highlight=globals#globalsis a Python built-in function that returns a dictionary of objects in the current global environment. You can use it to check whether a particular object name exists in the current environment to avoid generating an exception by referencing a name that doesn't exist. The .get() method can be used with any dictionary -- the first argument is the key you want to retrieve from the dictionary, and the second is a default value to return in case the key does not exist. Anthony On Sunday, May 26, 2013 3:38:17 PM UTC-4, André Kablu wrote: Hi all, I have been adventuring myself with web2py for some months now, just to learn it, and I am enjoying very much. web2py is an awesome MVC. However it is my first time with python (yes I am only using python now b/c of web2py :D ), and I am missing so much some kind of functions index for web2py. Let me show an example, today I was looking for some details on the function globals().get(param,param2) I don`t know what param1 and param2 means, for what they are used... and I could not find anything googling... I know this is a kind of noob question but it is the reality for some guys like me that are not heavy coders... so I needed more information. Did anybody knows where I can find more reference to all web2py exclusive functions, like what we have on jquery website about jquery functions for an example? Thanks guys! -- --- 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/groups/opt_out.
[web2py] Autocomplete widget on SQLFORM.grid search?
I haven't been able to get this to work: # Models db.define_table('category',Field('name')) db.define_table('product',Field('name'),Field('category')) db.product.category.widget = SQLFORM.widgets.autocomplete(request, db.category.name, limitby=(0,10), min_length=2) # View {{= SQLFORM.grid(db.product) }} How do I bind the search input box to the autocomplete widget? Thanks for all suggestions, Alec Taylor -- --- 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/groups/opt_out.
[web2py] Re: Autocomplete widget on SQLFORM.grid search?
The autocomplete widget is for when a field appears in a create or update form -- it is used to help you fill in a value for the field. Anthony On Monday, May 27, 2013 10:43:11 PM UTC-4, Alec Taylor wrote: I haven't been able to get this to work: # Models db.define_table('category',Field('name')) db.define_table('product',Field('name'),Field('category')) db.product.category.widget = SQLFORM.widgets.autocomplete(request, db.category.name, limitby=(0,10), min_length=2) # View {{= SQLFORM.grid(db.product) }} How do I bind the search input box to the autocomplete widget? Thanks for all suggestions, Alec Taylor -- --- 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/groups/opt_out.
[web2py] Re: PAAS supporting web2py
Thanks, Antrhony and Reisl All of these seems to be a excellent, I will evaluate all I am more incliend towards pythonanywhere but evaluate all of these Can any one point me to a strengths or weakness of these sites, I have to build a site for teaching python site to k-12 students in india. Does web2py suport any other frontends in addition to jquery? On Tue, May 28, 2013 at 8:41 AM, Arvind Gupta arvind.gupt...@gmail.comwrote: Thanks, Antrhony and Reisl All of these seems to be a excellent, I will evaluate all I am more incliend towards pythonanywhere but evaluate all of these Can any one point me to a strengths or weakness of these sites, I have to build a site for teaching python site to k-12 students in india. Does web2py suport any other frontends in addition to jquery? On Mon, May 27, 2013 at 9:55 PM, Anthony abasta...@gmail.com wrote: Also, GAE, Heroku, DotCloud, etc. On Monday, May 27, 2013 12:22:04 PM UTC-4, Relsi Hur Maron wrote: Pythonanywhere https://www.pythonanywhere.**com/ https://www.pythonanywhere.com/ Em segunda-feira, 27 de maio de 2013 13h14min39s UTC-3, Arvind Gupta escreveu: Hi Is there any PAAS (like openshift/cloudfoundry) which support web2py? regards Arvind -- --- 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/groups/opt_out.
[web2py] Re: jquery mobile: popup calendar does not always appear
please open a ticket. Perhaps it is time to upgrade the calendar. On Tuesday, 23 April 2013 19:02:31 UTC-5, Rowdy wrote: Greetings, I am developing a desktop/mobile application using web2py 2.4.6 (currently hosted on CentOS 6.4 with Python 2.6.6, web2py running from source). If I have an SQLFORM containing a date field, when I tap on the field on a mobile device the popup calendar does not appear. Currently tested on iOS using Safari and Chrome, and on Android using Chrome, but this also happens when using a desktop version of Firefox with a user agent switcher and masquerading as a mobile device. If I simply reload the page (without doing anything else) and then tap on the date field again, the popup calendar appears. A similar page in the desktop version also contains a date field, and the popup calendar appears first time and every time the field is clicked without needing to reload the page. Anyone got any ideas why this is happening? I was wondering whether something was being cached, which prevented the page initialisation script from running, at least not until the page is reloaded, but that is grasping at straws. Looking at the page source (on the desktop Firefox masquerading as a mobile browser, where the same behaviour is exhibited), the before and after reload page source is identical. Any insight appreciated. Thank you in advance. Rowdy -- --- 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/groups/opt_out.
Re: [web2py] Re: Autocomplete widget on SQLFORM.grid search?
I know, but it could also help suggest possible values to search for details on in the grid On Tue, May 28, 2013 at 1:03 PM, Anthony abasta...@gmail.com wrote: The autocomplete widget is for when a field appears in a create or update form -- it is used to help you fill in a value for the field. Anthony On Monday, May 27, 2013 10:43:11 PM UTC-4, Alec Taylor wrote: I haven't been able to get this to work: # Models db.define_table('category',Field('name')) db.define_table('product',Field('name'),Field('category')) db.product.category.widget = SQLFORM.widgets.autocomplete(request, db.category.name, limitby=(0,10), min_length=2) # View {{= SQLFORM.grid(db.product) }} How do I bind the search input box to the autocomplete widget? Thanks for all suggestions, Alec Taylor -- --- 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/groups/opt_out. -- --- 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/groups/opt_out.
[web2py] Re: After update web2py version, invalid login.
Thank you. I cannot think of any change that should affect this. Keep us posted if you find the problem. On Monday, 27 May 2013 00:53:56 UTC-5, toni campins wrote: With another machine,and update from 2.4.6 to 2.4.7 no problem in postgresql database in localhost. If I can reproduce the error again I'll alert. Thanks On Monday, May 27, 2013 7:15:53 AM UTC+2, Massimo Di Pierro wrote: This is a serious issue. Anybody else having this problem can help us reproduce it? Massimo On Sunday, 26 May 2013 03:02:02 UTC-5, toni campins wrote: Hi, Why after update web2py i have to edit all passwords for invalid login? Thanks -- --- 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/groups/opt_out.
[web2py] Re: No module named connections
The error appears truncated and I cannot read it. Can you email it me as an attachment? On Monday, 27 May 2013 06:10:45 UTC-5, e...@littlebuddhadigital.com wrote: * Hi all I have just uploaded some new code to our existing web2py instance. I am getting the following error: type 'exceptions.RuntimeError' Failure to connect, tried 5 times: Traceback (most recent call last): File /opt/web2py/gluon/dal.py, line 6755, in __init__ self._adapter = ADAPTERS[self._dbname](**kwargs) File /opt/web2py/gluon/dal.py, line 2384, in __init__ if do_connect: self.reconnect() File /opt/web2py/gluon/dal.py, line 562, in reconnect self.connection = f() File /opt/web2py/gluon/dal.py, line 2382, in connector return self.driver.connect(**driver_args) File /opt/web2py/gluon/contrib/pymysql/__init__.py, line 92, in Connect from connections import Connection File /opt/web2py/gluon/custom_import.py, line 83, in custom_importer return base_importer(pname, globals, locals, fromlist, level) File /opt/web2py/gluon/custom_import.py, line 124, in __call__ result = NATIVE_IMPORTER(name, globals, locals, fromlist, level) ImportError: No module named connections The only thing that the developer changed was some xlrd stuff which I have installed on the OS Centos 6.4. The developer also does not have a module named connections yet it runs on his Ubuntu box without issue. I had a similar issue with rq, but I simply removed the relevant queue.py and everything was fine? The problem here is that there is noe connections module? Could somebody please point me in the right direction as we need to get the site live. tia ed * -- --- 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/groups/opt_out.
[web2py] Re: help with functions index
Look into this: https://github.com/mdipierro/web2py-recipes-source/tree/master/source/04_advanced_forms/06_Creating_a_Form_Wizard it is the source of the web2py recipes book. On Monday, 27 May 2013 20:50:08 UTC-5, André Kablu wrote: O I got that... thanks for the response... However I still miss some details... like for an example I was looking some way to redirect the successful register to another view... to continue the registration process with other fields I could not find anything on documentation... I found this: def somefunc(var): do_something_with(var) auth.settings.login_onaccept=somefunc but only for page login... and how about after register??? another question could be, how to change register behavior... and put like 2 or 3 screens llike NEXT... NEXT... FINISH... to collect more data? I know you guys in this forum can help... but documentation is not clear... but thanks anyway!! Em domingo, 26 de maio de 2013 20h54min05s UTC-3, Anthony escreveu: globals()http://docs.python.org/2/library/functions.html?highlight=globals#globalsis a Python built-in function that returns a dictionary of objects in the current global environment. You can use it to check whether a particular object name exists in the current environment to avoid generating an exception by referencing a name that doesn't exist. The .get() method can be used with any dictionary -- the first argument is the key you want to retrieve from the dictionary, and the second is a default value to return in case the key does not exist. Anthony On Sunday, May 26, 2013 3:38:17 PM UTC-4, André Kablu wrote: Hi all, I have been adventuring myself with web2py for some months now, just to learn it, and I am enjoying very much. web2py is an awesome MVC. However it is my first time with python (yes I am only using python now b/c of web2py :D ), and I am missing so much some kind of functions index for web2py. Let me show an example, today I was looking for some details on the function globals().get(param,param2) I don`t know what param1 and param2 means, for what they are used... and I could not find anything googling... I know this is a kind of noob question but it is the reality for some guys like me that are not heavy coders... so I needed more information. Did anybody knows where I can find more reference to all web2py exclusive functions, like what we have on jquery website about jquery functions for an example? Thanks guys! -- --- 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/groups/opt_out.
[web2py] Re: PAAS supporting web2py
On Monday, 27 May 2013 22:19:39 UTC-5, Arvind Gupta wrote: Thanks, Antrhony and Reisl All of these seems to be a excellent, I will evaluate all I am more incliend towards pythonanywhere but evaluate all of these Can any one point me to a strengths or weakness of these sites, I have to build a site for teaching python site to k-12 students in india. Does web2py suport any other frontends in addition to jquery? Most of web2py is JS agnostic. The Ajax features in components, the client side validators, and the grid search require jQuery. As long as you do not use these features, it works without jquery. On Tue, May 28, 2013 at 8:41 AM, Arvind Gupta arvind@gmail.comjavascript: wrote: Thanks, Antrhony and Reisl All of these seems to be a excellent, I will evaluate all I am more incliend towards pythonanywhere but evaluate all of these Can any one point me to a strengths or weakness of these sites, I have to build a site for teaching python site to k-12 students in india. Does web2py suport any other frontends in addition to jquery? On Mon, May 27, 2013 at 9:55 PM, Anthony abas...@gmail.com javascript: wrote: Also, GAE, Heroku, DotCloud, etc. On Monday, May 27, 2013 12:22:04 PM UTC-4, Relsi Hur Maron wrote: Pythonanywhere https://www.pythonanywhere.**com/ https://www.pythonanywhere.com/ Em segunda-feira, 27 de maio de 2013 13h14min39s UTC-3, Arvind Gupta escreveu: Hi Is there any PAAS (like openshift/cloudfoundry) which support web2py? regards Arvind -- --- 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/groups/opt_out.