[web2py] SQLForm set default values from database
Hello I have a SQLFORM and I would like to set the default values for user profile that are already in database (it is a reference of 2 tables) this is my current solution record = db((db.auth_user.organization==db.organization.id) (db.auth_user.id == uid)).select().as_list()[0] db.auth_user.first_name.default = record[auth_user][first_name] now since there is quite a lot of those fields i don't want to write sentance for each field. is it possible to do it with for loop or smth. thank you -- 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/groups/opt_out.
[web2py] Webfaction password problem with 2.8.2 installation
Hi. I've installed successfully on Webfaction web2py 2.7.4 about two months ago with this script: https://wiki.webfaction.com/wiki/Web2py-LatestSource?format=txt Automatically Webfaction set your Webfaction admin password as your web2py admin password, OK. Now I've installed another web2py application with the same script, that take the latest stable version so I think it's the 2.8.2. Unfortunately I cannot login, my password results invalid. I've installed two times the application, my URL is https, I've restart Apache. Is it due to Webfaction or to the last Web2py version ? Suggestion: is it possible to have the web2py version in the login page ? 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/groups/opt_out.
Re: [web2py] session cookie for two subdomains
up Marin (mobile) On Dec 6, 2013 12:12 AM, Marin Pranjić marin.pran...@gmail.com wrote: ^bump On Thu, Dec 5, 2013 at 8:22 PM, Marin Pranjić marin.pran...@gmail.comwrote: Hi, I have two subdomains for one app, and I need to use both. So I have to set Domain header in session cookie to the domain root (. domain.com). Where should I put that code? Not sure how exactly to do it for session cookie. Marin -- 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/groups/opt_out. -- 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/groups/opt_out.
[web2py] Re: After upgrade to 2.8.2: class 'sqlite3.IntegrityError' foreign key constraint failed
Hi Scott I don't fully understand you answer. Could you please show us what was your buggy code, and how you solved it? I'm still stuck with this problem... Thanks a lot -- 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/groups/opt_out.
[web2py] analysis Keywords from web pages text[Urgent]
Hello, I need to build a keyword generator from the any search output. For example if i am searching car in any search engine, based on car i am getting lots of result now in this page i need to find out whatever keywords can be made from the words. I need to return most possible word as keywords after analyzing a HTML page. I am using now BeautifulSoup , *Please also suggest me if we can implement http://scrapy.org/ http://scrapy.org/ for this task.* def myfunc(): form=FORM('Key Word Finder', INPUT(_name='URL', requires=IS_NOT_EMPTY()), INPUT(_type='submit')) if form.accepts(request,session): response.flash = 'form accepted' new_url=request.vars.URL usock = urllib2.urlopen(new_url) data = usock.read() usock.close() soup = BeautifulSoup(data) findKeywords=soup.get_text() key_words=Counter() key_words.update(findKeywords.split()) return dict( form=form , grid = key_words.most_common()) elif form.errors: response.flash = 'form has errors' else: response.flash = 'please fill the form' return dict(form=form) -- 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/groups/opt_out.
Re: [web2py] Social Login
I've got the same error. Maybe it's because of callback url in application. In a local application what i put in there? -- 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/groups/opt_out.
Re: [web2py] New Free Appliance - Ticketing Project Management System BugBuster Online
Hi Massimo, Will this appliance make its way to Web2py appliances section? Please let me know Cheers, Rahul. - On Monday, December 2, 2013 9:31:04 AM UTC+5:30, Rahul wrote: Ovidio, No problem, I'll check it on 2.8.x once stable build is available. Just wanted to know when you got this error though. Rahul On Sunday, December 1, 2013 5:50:53 PM UTC+5:30, Ovidio Marinho wrote: python 2.75, web2py 2.81. We have no such executable test programs.Sorry! Ovidio Marinho Falcao Neto ITJP.NET.BR ovid...@gmail.com Brasil 2013/12/1 Rahul rahul@gmail.com Hi Ovidio, Thanks for reporting this, however I was not able to reproduce this issue in my development environment. I am using web2py 2.7.4 on Win7 (tested on chrome, ie10, 11) and havent yet tested with 2.8.x versions of web2py(since i am waiting for it to stabilize). Which OS, browser version you are using ? The error you are getting is due to plugin_solidform (downloaded from scubism widgets) module that it could not import or is missing in your modules folder [Please make sure you have these compiled modules in your modules folder (see screenshot attached)]. I am using this plugin in my web2py app. The compiled appliance works for me without issues. If possible can you please tell me when you are getting this error? some steps or specific operation you are doing. I have fixed a small regression in the mean time and uploaded the fresh appliance on the same site with same name. *Sincerely, Rahul* On Saturday, November 30, 2013 9:06:27 PM UTC+5:30, Ovidio Marinho wrote: Error ticket for BBOnline Ticket ID 127.0.0.1.2013-11-30.12-26-35.346adcb0-d189-4a89-ad7d-e024bdda69a4 type 'exceptions.ImportError' No module named BBOnline.modules.plugin_ solidform Versão web2py™Version 2.8.1-stable+timestamp.2013. 11.27.20.07.10 Traceback 1. 2. 3. 4. 5. 6. 7. 8. Traceback (most recent call last): File C:\web2py281\gluon\restricted.py, line 217, in restricted exec ccode in environment File E:/web2py/web2py/applications/BBOnline\compiled\models.db.py, line 8, in module File C:\web2py281\gluon\custom_import.py, line 86, in custom_importer return base_importer(pname, globals, locals, fromlist, level) ImportError: No module named BBOnline.modules.plugin_solidform Ovidio Marinho Falcao Neto ITJP.NET.BR ovid...@gmail.com Brasil 2013/11/29 rahul dhakate rahul@gmail.com Hi Antonio, Ramos, All, I hope it worked for you. Please let me know if you find any regressions. Thanks Rahul On 29 Nov 2013 19:19, António Ramos ramst...@gmail.com wrote: [image: Imagem inline 1] 2013/11/29 黄祥 steve.van...@gmail.com Traceback (most recent call last): File /home/mdipierro/make_web2py/web2py/gluon/restricted.py, line 217, in restricted File E:/web2py/web2py/applications/BBOnline\compiled\controllers.default.index.py, line 17, in module File /home/mdipierro/make_web2py/web2py/gluon/custom_import.py, line 86, in custom_importer ImportError: No module named reportlab.platypus testing on windows 7. 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/groups/opt_out. -- 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/Qr5V185USIs/unsubscribe. To unsubscribe from this group and all its topics, send an email to web2py+un...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- 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/groups/opt_out. -- Resources: -
[web2py] How to send email of registration verification and reset password by my function not by auth
Hi, I'm using boto to send my emails through Amazon SES, like this: http://www.web2pyslices.com/slice/show/1448/amazon-web-services-simple-email-service-using-boto All email of the app is ok, are send by my function, but the verify register and reset password email already are sent automatically, how I can change this to my function? Thanks to all -- 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/groups/opt_out.
[web2py] Direct access to a SQLFORM.grid single record view
Hello all. Is it possible to call a function/page with an SQLFORM.grid asking for the single view mode instead of the list mode ? Something like ... {{=A('test link', _href=URL('products_listing/view/products/717'))}} 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/groups/opt_out.
Re: [web2py] Re: login crash under 2.8.2
does anyone else have this problem, or is it only me? is there at least acknowledgement that is is a problem, or is my sanity not in check? should i change my programming approach in some way or am i missing a handler or loading of a handler? just waiting on some expert advice. -- 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/groups/opt_out.
[web2py] SQLFORM.grid edit form pre populate field
Does anyone know how to pre populate a field when using the SQLFORM.grid edit function? I know that for a new record you can use: if request.args[-3] == edit: db.table.field.default = 'foo' but if the field already contains a value it gets ignored. so I tried: value = auth.user.value if request.args[-3] == edit: db.table.field.default = value this throws a Object exists and cannot be redefined: I am searching for the SQLFORM.grid equivalent of form.vars.field='' -- 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/groups/opt_out.
Re: [web2py] Social Login
Double check token, secret, and id. Important you must put the exact URI of your app in the developers panel on twitter. I have made a screenshot: http://goo.gl/Bg7HOQ HTH 2013/12/6 Cássio Botaro cassiobot...@gmail.com I've got the same error. Maybe it's because of callback url in application. In a local application what i put in there? -- 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/groups/opt_out. -- 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/groups/opt_out.
[web2py] Re: SQLFORM.grid edit form pre populate field
value = auth.user.value i'm not sure what do you want to retrieve in here. if you want to retrieve the value of current user id, i think you can achieve it using : current_user_id = auth.user_id 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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] Re: Direct access to a SQLFORM.grid single record view
Why don't you pass the product id as an arg[product_id]? You can have a link like this _href=URL(r=request, c='products_listing/view', f='products', args=[product_id]) you know it's not really userfriendly to manipulate the grid view form. On Friday, December 6, 2013 2:59:46 PM UTC+1, Gael Princivalle wrote: Hello all. Is it possible to call a function/page with an SQLFORM.grid asking for the single view mode instead of the list mode ? Something like ... {{=A('test link', _href=URL('products_listing/view/products/717'))}} 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/groups/opt_out.
Re: [web2py] Re: update table from sqlform
Are you using SQLFORM or SQLFORM.factory? Regards Johann -- Because experiencing your loyal love is better than life itself, my lips will praise you. (Psalm 63:3) -- 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/groups/opt_out.
[web2py] Re: SQLForm set default values from database
fields = [field for field in db.auth_user if field.name != 'id'] for field in fields: field.default = record.auth_user[field.name] Anthony On Friday, December 6, 2013 3:48:45 AM UTC-5, Yebach wrote: Hello I have a SQLFORM and I would like to set the default values for user profile that are already in database (it is a reference of 2 tables) this is my current solution record = db((db.auth_user.organization==db.organization.id) ( db.auth_user.id == uid)).select().as_list()[0] db.auth_user.first_name.default = record[auth_user][first_name] now since there is quite a lot of those fields i don't want to write sentance for each field. is it possible to do it with for loop or smth. thank you -- 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/groups/opt_out.
[web2py] Re: SQLFORM.grid edit form pre populate field
Hi Stifan I'm trying to retrieve the contents of auth.settings.extra_fields['auth_user']= [ Field('value') ] I hope that clarifies it a bit :) sorry if I'm unclear; still learning to code and thus how to properly formulate my questions in an understandable way On Friday, December 6, 2013 3:15:12 PM UTC+1, 黄祥 wrote: value = auth.user.value i'm not sure what do you want to retrieve in here. if you want to retrieve the value of current user id, i think you can achieve it using : current_user_id = auth.user_id 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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] Re: update table from sqlform
I don't think this is documented, but when dealing with a join, you have to specify the table in order to use .update_record(). So, it would be: record.organization.update_record(**db.organization._filter_fields(form.vars )) Anthony On Thursday, December 5, 2013 6:50:33 AM UTC-5, Yebach wrote: Hello I am trying to update records in user profile from form I have two tables that need to be updated auth_user and organization record = db((db.auth_user.organization==db.organization.id) ( db.auth_user.id == uid)).select().first() if form.process().accepted: record.update_record(**db.organization._filter_fields(form.vars)) I also tried the https://groups.google.com/forum/#!topic/web2py/hpH7a3Qz3Wg but kind of the same problem I am getting the following error type 'exceptions.KeyError' 'update_record' thank you in advance -- 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/groups/opt_out.
[web2py] Re: SQLFORM.grid edit form pre populate field
i think you can achieve it by simply doing : db.auth_user.value assumption you have the field name value in your auth_user table. for reference, please take a look at : https://groups.google.com/forum/#!topic/web2py/9H5ANdSzzVU 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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] Re: session cookie for two subdomains
What you need to use is response.cookies response.cookies['your_cookie_name''] = value_you_want_to_save response.cookies['your_cookie_name']['domain'] = '.example.com' response.cookies['your_cookie_name']['path'] = '/' response.cookies['your_cookie_name']['expires'] = 7 * 24 * 3600 This would set a cookie for example.com, subdomains and all paths, that would not expire for a week. Quinta-feira, 5 de Dezembro de 2013 19:22:08 UTC, Marin Pranjić escreveu: Hi, I have two subdomains for one app, and I need to use both. So I have to set Domain header in session cookie to the domain root (. domain.com). Where should I put that code? Not sure how exactly to do it for session cookie. Marin -- 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/groups/opt_out.
[web2py] Re: session cookie for two subdomains
I do not understand what you are trying to do. On Thursday, 5 December 2013 13:22:08 UTC-6, Marin Pranjić wrote: Hi, I have two subdomains for one app, and I need to use both. So I have to set Domain header in session cookie to the domain root (. domain.com). Where should I put that code? Not sure how exactly to do it for session cookie. Marin -- 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/groups/opt_out.
[web2py] Re: How to send email of registration verification and reset password by my function not by auth
Look into gluon/tools.py there is a class Mail:def send( self, to, subject = '[no subject]', message = '[no message]', attachments=None, cc=None, bcc=None, reply_to=None, sender=None, encoding='utf-8', raw=False, headers={} ): You can mail your own mail class and set: auth.settings.mailer = YourMail() On Friday, 6 December 2013 07:25:38 UTC-6, Relsi Maron wrote: Hi, I'm using boto to send my emails through Amazon SES, like this: http://www.web2pyslices.com/slice/show/1448/amazon-web-services-simple-email-service-using-boto All email of the app is ok, are send by my function, but the verify register and reset password email already are sent automatically, how I can change this to my function? Thanks to all -- 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/groups/opt_out.
[web2py] Re: For web2py V2.8.2, how can I customize the default layout, changing colors and background images?
Dear Niphlod, Thanks for the response. I DID get something going by FireBugging my page. Here is what I came up with: style /* // original from book SUCKS body { background: url('images/background.png') repeat-x #3A3A3A; } a { color: #349C01; } .header h1 { color: #349C01; } .header h2 { color: white; font-style: italic; font-size: 14px;} .statusbar { background: #33; border-bottom: 5px #349C01 solid; } .statusbar a { color: white; } .footer { border-top: 5px #349C01 solid; } // /original from book SUCKS */ // joe1 // WAS match [.header h1; .statusbar; .footer; ] = #XX == darkred = #88 // WAS match [.header h1; .statusbar; .footer; ] = #XX =! darkred = #AA // WAS #AA = #BB [too light for white links in menu ] // NOW #BB = #AA body { background: url('images/background.png') repeat-x #3A3A3A; } a { color: #349C01; } //.navbar {background: #AA; } .navbar-inverse .navbar-inner {background: #AA; } /* http://127.0.0.1:8000/songfest/static/css/bootstrap.min.css */ .navbar-inverse .nav li a{ color: #FF; /*color: #33;*/ } div.flash { background-color: #AA; background-image: -moz-linear-gradient(90deg, #AA, #AA); } .page-header h1 { color: #AA; } //.header h1 { color: #AA; } .header h2 { color: white; font-style: italic; font-size: 14px;} .statusbar { background: #AA; border-bottom: 5px #349C01 solid; } .statusbar a { color: white; } .footer { border-top: 5px #AA solid; } // /joe1 /style The navbar is red the links in the menu start out white. It could still use a little work on the menu hover. Thanks again for the response, Niphlod. I subbmitted a book bug == Issue 1802 http://code.google.com/p/web2py/issues/detail?id=1802 Love and peace, Joe On Thursday, December 5, 2013 12:33:17 PM UTC-8, Niphlod wrote: I guess that piece of the book needs an update. There is no .header nor .statusbar in the current scaffolding app. However, given that is based on bootstrap 2.3.2, you can find a boatload of pointers in google on how to customize the color scheme . -- 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/groups/opt_out.
[web2py] fetching db records with request.args(0)
# View - country.html {{for people in country:}} a href={{=URL('default','certificate', vars=dict(id=people.id))}}Birth Certificate/a {{=(people.name)}} {{=(people.dob)}} {{=(people.height)}} {{pass}} # Controller def certificate(): certificate = db(db.poeple.id==request.args(0)).select() return locals() # View - certificate.html {{for row in certificate:}} {{=(row.name)}} {{=(row.dob)}} {{=(row.height)}} {{pass}} Good day Guys, In the above code, the country function and its respective html view provides a list of people in a country. Each listed record has a href attribute that directs the user to the certificate page. Unfortunately, when I click on the link, the certificate page comes up blank. The aim of the code is to view the individual birth certificates of the people listed on the country page. When you click the on the link, the following url is generated; *app/default/certificate?id=7. *The purpose of the certificate function was to perform a db query on the people db table, and return the results of the id in the url (request.args(0)), that is the same as the people.id. However, as mentioned previously, the page comes up blank, and records are displayed. Once again, I would greatly appreciate any assistance. Regards, Rafer -- 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/groups/opt_out.
Re: [web2py] fetching db records with request.args(0)
You are sending vars to certificate and using args to retrieve the record. That's your problem. On Fri, Dec 6, 2013 at 2:10 PM, raferbop rafer...@gmail.com wrote: # View - country.html {{for people in country:}} a href={{=URL('default','certificate', vars=dict(id=people.id))}}Birth Certificate/a {{=(people.name)}} {{=(people.dob)}} {{=(people.height)}} {{pass}} # Controller def certificate(): certificate = db(db.poeple.id==request.args(0)).select() return locals() # View - certificate.html {{for row in certificate:}} {{=(row.name)}} {{=(row.dob)}} {{=(row.height)}} {{pass}} Good day Guys, In the above code, the country function and its respective html view provides a list of people in a country. Each listed record has a href attribute that directs the user to the certificate page. Unfortunately, when I click on the link, the certificate page comes up blank. The aim of the code is to view the individual birth certificates of the people listed on the country page. When you click the on the link, the following url is generated; app/default/certificate?id=7. The purpose of the certificate function was to perform a db query on the people db table, and return the results of the id in the url (request.args(0)), that is the same as the people.id. However, as mentioned previously, the page comes up blank, and records are displayed. Once again, I would greatly appreciate any assistance. Regards, Rafer -- 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/groups/opt_out. -- 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/groups/opt_out.
[web2py] Re: session cookie for two subdomains
For example, if I login on *www1.example.com*, I also want to be logged in *www2.example.com*. The code that Leonel provided would work. However, I am not setting a custom cookie (thanks anyway). I want to do it for session cookie. And I'm only asking where should I put that code. Would it be wrong if I put it in model, so it's executed on every request? something like: response.cookies['session_id_appname']['domain'] = '.example.com' Is there a better place to put this code? Dana petak, 6. prosinca 2013. 16:48:22 UTC+1, korisnik Massimo Di Pierro napisao je: I do not understand what you are trying to do. On Thursday, 5 December 2013 13:22:08 UTC-6, Marin Pranjić wrote: Hi, I have two subdomains for one app, and I need to use both. So I have to set Domain header in session cookie to the domain root (. domain.com). Where should I put that code? Not sure how exactly to do it for session cookie. Marin -- 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/groups/opt_out.
[web2py] Re: SQLFORM.grid edit form pre populate field
that's exatly how far I got :) I want to get db.authuser.value and apply it to a corresponding field in the edit form function of SQLFORM.grid. The problem is the last part not the first. thanks for the thread reference by the way. On Friday, December 6, 2013 4:17:20 PM UTC+1, 黄祥 wrote: i think you can achieve it by simply doing : db.auth_user.value assumption you have the field name value in your auth_user table. for reference, please take a look at : https://groups.google.com/forum/#!topic/web2py/9H5ANdSzzVU 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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [web2py] fetching db records with request.args(0)
Thanks viniciusban, request.vars.id did the trick. On Friday, December 6, 2013 11:16:04 AM UTC-5, viniciusban wrote: You are sending vars to certificate and using args to retrieve the record. That's your problem. On Fri, Dec 6, 2013 at 2:10 PM, raferbop rafe...@gmail.com javascript: wrote: # View - country.html {{for people in country:}} a href={{=URL('default','certificate', vars=dict(id=people.id))}}Birth Certificate/a {{=(people.name)}} {{=(people.dob)}} {{=(people.height)}} {{pass}} # Controller def certificate(): certificate = db(db.poeple.id==request.args(0)).select() return locals() # View - certificate.html {{for row in certificate:}} {{=(row.name)}} {{=(row.dob)}} {{=(row.height)}} {{pass}} Good day Guys, In the above code, the country function and its respective html view provides a list of people in a country. Each listed record has a href attribute that directs the user to the certificate page. Unfortunately, when I click on the link, the certificate page comes up blank. The aim of the code is to view the individual birth certificates of the people listed on the country page. When you click the on the link, the following url is generated; app/default/certificate?id=7. The purpose of the certificate function was to perform a db query on the people db table, and return the results of the id in the url (request.args(0)), that is the same as the people.id. However, as mentioned previously, the page comes up blank, and records are displayed. Once again, I would greatly appreciate any assistance. Regards, Rafer -- 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/groups/opt_out. -- 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/groups/opt_out.
[web2py] Re: The odd behavior of cacheable selects. Bug?
Issue submitted https://code.google.com/p/web2py/issues/detail?id=1803 Sorry for the delay. Quinta-feira, 5 de Dezembro de 2013 20:05:38 UTC, Leonel Câmara escreveu: If I have this in my DB: db = DAL('sqlite://storage.sqlite', check_reserved=[]) db.define_table('test_table', Field('value'), ) if db(db.test_table.id 0).count() == 0: db.test_table.bulk_insert([{'value': 'one'}, {'value': 'two'}, {'value': 'three'}, {'value': 'four'}, {'value': 'five'}]) And this in my default controller def index(): test_table_rows = db(db.test_table.id0).select(cache=(cache.ram, 1800), cacheable=True) for record in test_table_rows: # Suppose I want to change the way the values are returned, here I'm adding a # but I could be # doing something useful like turning them into an URL() record.value = record.value + '#' return {'values': test_table_rows} Then go to /default/index.json and keep refreshing. What you end up getting will be something like: {values: [{id: 1, value: one##}, {id: 2, value: two##}, {id: 3, value: three##}, {id: 4, value: four##}, {id: 5, value: five##}]} I find this behavior to be quite unexpected as I would think that the cached rows would not be affected, what I would expect would be for the select to always return me exactly the same cached Rows. This makes cacheable=True very dangerous in a way that reminds me of using mutables as default function arguments. -- 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/groups/opt_out.
[web2py] Reset Form with Errors
I have an SQLFORM.factory and I would like to have a form clear/reset button that wipes out the form but I cannot get some of the functionality I need. The form is mostly simple text fields with IS_NOT_EMPTY validators; if I submit a partially complete form, the little red error messages pop up saying to fill in the incomplete fields. However, if I click my 'Clear Form' button, the error messages remain and the text fields are reset to the user-entered values that were submitted, i.e. fields that were not empty on submission are not blanked out. I expect a form reset button to clear *all* text (not just what's been entered since the last submission) and I want the form errors to be reset too. Is there something in web2py forms that will accomplish what I want? If not, how would you suggest implementing this? My current Clear Form button is in here: btn_list = [TAG.button('Submit', _type='submit', _id='submit_btn'), TAG. button('Clear Form', _type='reset', _onclick='return confirm(Are you sure you want to clear the form?);', _id='clear_btn')] with my SQLFORM.factory buttons=btn_list -- 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/groups/opt_out.
Re: [web2py] Social Login
I made chages but doesn't work. Look the error: https://drive.google.com/file/d/0B8vO2VBhd7XVeF9WOW9aRlZ4Y28/edit?usp=sharing -- 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/groups/opt_out.
[web2py] Re: session cookie for two subdomains
I think putting this in a model file should do it: response.cookies['session_id_appname']['domain'] = '.example.com' Have you tried it? On Friday, 6 December 2013 10:28:44 UTC-6, Marin Pranjić wrote: For example, if I login on *www1.example.com http://www1.example.com*, I also want to be logged in *www2.example.com http://www2.example.com*. The code that Leonel provided would work. However, I am not setting a custom cookie (thanks anyway). I want to do it for session cookie. And I'm only asking where should I put that code. Would it be wrong if I put it in model, so it's executed on every request? something like: response.cookies['session_id_appname']['domain'] = '.example.com' Is there a better place to put this code? Dana petak, 6. prosinca 2013. 16:48:22 UTC+1, korisnik Massimo Di Pierro napisao je: I do not understand what you are trying to do. On Thursday, 5 December 2013 13:22:08 UTC-6, Marin Pranjić wrote: Hi, I have two subdomains for one app, and I need to use both. So I have to set Domain header in session cookie to the domain root (. domain.com). Where should I put that code? Not sure how exactly to do it for session cookie. Marin -- 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/groups/opt_out.
[web2py] Re: For web2py V2.8.2, how can I customize the default layout, changing colors and background images?
Dear Niphlod and Community, First, thanks Niphlod for putting me onto bootstrap 2.3.2http://getbootstrap.com/2.3.2/index.html. This looks GREAT. Finally, *I apologize* for using, what sometimes i *mistakenly think of *as a technical term SUCKS, in my above Post: // original from book SUCKS in my comments meant only for myself. This has *no place in this Very Supportive Community*. *I apologize.* Love and peace, Joe On Friday, December 6, 2013 8:05:08 AM UTC-8, JoeCodeswell wrote: Dear Niphlod, Thanks for the response. I DID get something going by FireBugging my page. Here is what I came up with: style /* // original from book SUCKS body { background: url('images/background.png') repeat-x #3A3A3A; } a { color: #349C01; } .header h1 { color: #349C01; } .header h2 { color: white; font-style: italic; font-size: 14px;} .statusbar { background: #33; border-bottom: 5px #349C01 solid; } .statusbar a { color: white; } .footer { border-top: 5px #349C01 solid; } // /original from book SUCKS */ // joe1 // WAS match [.header h1; .statusbar; .footer; ] = #XX == darkred = #88 // WAS match [.header h1; .statusbar; .footer; ] = #XX =! darkred = #AA // WAS #AA = #BB [too light for white links in menu ] // NOW #BB = #AA body { background: url('images/background.png') repeat-x #3A3A3A; } a { color: #349C01; } //.navbar {background: #AA; } .navbar-inverse .navbar-inner {background: #AA; } /* http://127.0.0.1:8000/songfest/static/css/bootstrap.min.css */ .navbar-inverse .nav li a{ color: #FF; /*color: #33;*/ } div.flash { background-color: #AA; background-image: -moz-linear-gradient(90deg, #AA, #AA); } .page-header h1 { color: #AA; } //.header h1 { color: #AA; } .header h2 { color: white; font-style: italic; font-size: 14px;} .statusbar { background: #AA; border-bottom: 5px #349C01 solid; } .statusbar a { color: white; } .footer { border-top: 5px #AA solid; } // /joe1 /style The navbar is red the links in the menu start out white. It could still use a little work on the menu hover. Thanks again for the response, Niphlod. I subbmitted a book bug == Issue 1802 http://code.google.com/p/web2py/issues/detail?id=1802 Love and peace, Joe On Thursday, December 5, 2013 12:33:17 PM UTC-8, Niphlod wrote: I guess that piece of the book needs an update. There is no .header nor .statusbar in the current scaffolding app. However, given that is based on bootstrap 2.3.2, you can find a boatload of pointers in google on how to customize the color scheme . -- 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/groups/opt_out.
Re: [web2py] Social Login
That error is usually caused by misconfigured OAuth, but there are different possible causes, the best way to find out is to trace all network requests using firefox firebug or chromium developer tools. 2013/12/6 Cássio Botaro cassiobot...@gmail.com I made chages but doesn't work. Look the error: https://drive.google.com/file/d/0B8vO2VBhd7XVeF9WOW9aRlZ4Y28/edit?usp=sharing -- 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/groups/opt_out. -- 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/groups/opt_out.
[web2py] Re: For web2py V2.8.2, how can I customize the default layout, changing colors and background images?
Dear Joe, While I believe it is important to keep our discussions here professional, civil, and focused, it is also clear that your comment was an oversight and I agree with the feeling being expressed. That section of the book should be improved and expanded. I trust nobody felt offended and I for sure was not. :-) Massimo On Friday, 6 December 2013 11:45:48 UTC-6, JoeCodeswell wrote: Dear Niphlod and Community, First, thanks Niphlod for putting me onto bootstrap 2.3.2http://getbootstrap.com/2.3.2/index.html. This looks GREAT. Finally, *I apologize* for using, what sometimes i *mistakenly think of *as a technical term SUCKS, in my above Post: // original from book SUCKS in my comments meant only for myself. This has *no place in this Very Supportive Community*. *I apologize.* Love and peace, Joe On Friday, December 6, 2013 8:05:08 AM UTC-8, JoeCodeswell wrote: Dear Niphlod, Thanks for the response. I DID get something going by FireBugging my page. Here is what I came up with: style /* // original from book SUCKS body { background: url('images/background.png') repeat-x #3A3A3A; } a { color: #349C01; } .header h1 { color: #349C01; } .header h2 { color: white; font-style: italic; font-size: 14px;} .statusbar { background: #33; border-bottom: 5px #349C01 solid; } .statusbar a { color: white; } .footer { border-top: 5px #349C01 solid; } // /original from book SUCKS */ // joe1 // WAS match [.header h1; .statusbar; .footer; ] = #XX == darkred = #88 // WAS match [.header h1; .statusbar; .footer; ] = #XX =! darkred = #AA // WAS #AA = #BB [too light for white links in menu ] // NOW #BB = #AA body { background: url('images/background.png') repeat-x #3A3A3A; } a { color: #349C01; } //.navbar {background: #AA; } .navbar-inverse .navbar-inner {background: #AA; } /* http://127.0.0.1:8000/songfest/static/css/bootstrap.min.css */ .navbar-inverse .nav li a{ color: #FF; /*color: #33;*/ } div.flash { background-color: #AA; background-image: -moz-linear-gradient(90deg, #AA, #AA); } .page-header h1 { color: #AA; } //.header h1 { color: #AA; } .header h2 { color: white; font-style: italic; font-size: 14px;} .statusbar { background: #AA; border-bottom: 5px #349C01 solid; } .statusbar a { color: white; } .footer { border-top: 5px #AA solid; } // /joe1 /style The navbar is red the links in the menu start out white. It could still use a little work on the menu hover. Thanks again for the response, Niphlod. I subbmitted a book bug == Issue 1802 http://code.google.com/p/web2py/issues/detail?id=1802 Love and peace, Joe On Thursday, December 5, 2013 12:33:17 PM UTC-8, Niphlod wrote: I guess that piece of the book needs an update. There is no .header nor .statusbar in the current scaffolding app. However, given that is based on bootstrap 2.3.2, you can find a boatload of pointers in google on how to customize the color scheme . -- 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/groups/opt_out.
[web2py] Re: Online classes
Thanks so much for these Massimo. Looking forward to watching the videos! -- 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/groups/opt_out.
Re: [web2py] Re: GAE - Not Working || Full Code Attached
Dear Massimo and Christian, You both were *right* about the *web2py version*. Since the latest version was not running or getting deployed on GAE, I used the old version which I had previously used to upload and deploy on GAE, hoping that might work. So, I corrected the old version issue and used the latest version : *web2py 2.8.2 * *Dignosis* *GAE-Launcher Problem* It seems that when Creating a New Application on GAE-launcher, and adding the *Application Directory* and *Application ID* to the settings, GAE-launcher would create a *new folder with the Appication ID as the name*, and would point to it, instead of pointing at the web2py main root directory. This was causing the major problems during deployment. GAE-Launcher Solution I went to GAE-launcher application settings directory in Mac OS *Library*, and edited the PLIST file to *reset the pointer to the web2py main root directory* instead of the automatically created Application ID directory. This *solved* the problem. So, I thank you both very much for looking at the problem, and suggesting the solutions. This was really very helpful, and also very quick. Thanks a lot. Gratefully, PRACHI -- 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/groups/opt_out.
[web2py] Re: GAE - Not Working || Full Code Attached
*New Error Ticket on GAE* What does this error mean? What is the solution to this error? Traceback (most recent call last):\n File /base/data/home/apps/s~myapp/1.372124618390164258/gluon/main.py, line 551, in wsgibase\n session._try_store_in_db(request, response)\n File /base/data/home/apps/s~pv-4-vp/1.372124618390164258/gluon/globals.py, line 728, in _try_store_in_db\n record_id = table.insert(**dd)\n File /base/data/home/apps/s~myapp/1.372124618390164258/gluon/dal.py, line 7806, in insert\n ret = self._db._adapter.insert(self,self._listify(fields))\n File /base/data/home/apps/s~myapp/1.372124618390164258/gluon/dal.py, line 4618, in insert\n rid = Reference(tmp.key().id())\nOverflowError: Python int too large to convert to C long\n' p6570 s. -- 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/groups/opt_out.
[web2py] Re: Reset Form with Errors
button with type=reset are old school : they don't take into consideration that the page can be built (as web2py does) with additional elements explaining the user what the error is BTW: why don't you just redirect to the original page on reset ? if you want it to work like the user never entered any values, it will work fine: the user will get back t the completely blank form. -- 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/groups/opt_out.
[web2py] Re: urllib2.URLError
its a problem on the url you're requesting, not web2py's. On Friday, December 6, 2013 1:34:29 AM UTC+1, sonu kumar wrote: Hi All, In my application I am trying to call external weblink to map data but it always gives me class 'urllib2.URLError' urlopen error timed out error. I am using several times urllib for calling same weblinks for different mappingWill this cause problem??? params = {'from':'ID', 'to':'MEROPS_ID', 'format':'tab', 'query':'P22894'} data = urllib.urlencode(params) request1 = urllib2.Request('http://www.uniprot.org/mapping/', data) response = urllib2.urlopen(request1, timeout=30) params3 = {'from':'ID', 'to':'P_ENTREZGENEID', 'format':'tab', 'query':'P22894'} coexdata = urllib.urlencode(params3) coexrequest = urllib2.Request('http://www.uniprot.org/mapping/', coexdata) coexresponse = urllib2.urlopen(coexrequest, timeout=30) params4 = {'from':'ID', 'to':'P_ENTREZGENEID', 'format':'tab', 'query': 'P22894'} data6 = urllib.urlencode(params4) requestmmpn = urllib2.Request('http://www.uniprot.org/mapping/', data6) responsemmpn = urllib2.urlopen(requestmmpn, timeout=30) I have seen one http_error_302 611. 612. 613. 614. 615. 616. 617. 618. 619. 620. # Don't close the fp until we are sure that we won't use it # with HTTPError. fp.read() fp.close() return self.parent.open(new, timeout=req.timeout) http_error_301 = http_error_303 = http_error_307 = http_error_302 inf_msg = The HTTP server returned a redirect error that would \ any suggestion to solve this issue 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/groups/opt_out.
[web2py] Re: Prevent multiple submit buttons from showing Working... on submit
can you please check that your web2py.js is the same one shipped with the latest web2py ? You can fetch it here https://raw.github.com/web2py/web2py/master/applications/welcome/static/js/web2py.js On Friday, December 6, 2013 12:31:17 AM UTC+1, Mark Li wrote: Hey Niphlod, The 2 submit buttons have different names, here's the resulting HTML. tr id=submit_record__row td class=w2p_fl/td td class=w2p_fw input name=save_progress type=submit value=Save Progress / input class=btn name=post_playlist type=submit value=Post Playlist / /td td class=w2p_fc/td /tr However, clicking on either results in both having the working... message. Is this not intended behavior? One of the form submit buttons is from the SQLFORM (i add a _name attribute later), and the other one I insert into the form. On Thursday, December 5, 2013 12:50:00 PM UTC-8, Niphlod wrote: uhm, you're right. However, usually with different submit buttons you'd likely have one of them having a name attribute (and those are excluded from being put in the working... state) is this your case ? How are you handling different posts based on the fact that the user clicks on one instead of the other ? BTW2: if any clickable-something has a data-w2p_disable_with attribute, that one is used instead of the default Working... message -- 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/groups/opt_out.
Re: [web2py] Re: session cookie for two subdomains
Yes, it works. Marin On Fri, Dec 6, 2013 at 6:37 PM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: I think putting this in a model file should do it: response.cookies['session_id_appname']['domain'] = '.example.com' Have you tried it? On Friday, 6 December 2013 10:28:44 UTC-6, Marin Pranjić wrote: For example, if I login on *www1.example.com http://www1.example.com*, I also want to be logged in *www2.example.com http://www2.example.com*. The code that Leonel provided would work. However, I am not setting a custom cookie (thanks anyway). I want to do it for session cookie. And I'm only asking where should I put that code. Would it be wrong if I put it in model, so it's executed on every request? something like: response.cookies['session_id_appname']['domain'] = '.example.com' Is there a better place to put this code? Dana petak, 6. prosinca 2013. 16:48:22 UTC+1, korisnik Massimo Di Pierro napisao je: I do not understand what you are trying to do. On Thursday, 5 December 2013 13:22:08 UTC-6, Marin Pranjić wrote: Hi, I have two subdomains for one app, and I need to use both. So I have to set Domain header in session cookie to the domain root (. domain.com). Where should I put that code? Not sure how exactly to do it for session cookie. Marin -- 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/groups/opt_out. -- 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/groups/opt_out.
[web2py] multiple path_prefix in routes.py?
Hello, I'm very fuzzy about the routes.py syntax, but I would like to know if I could use multiple path_prefixes based on request.env.http_host? For example, my linux production environment does not need a prefix: routers = dict( # base router BASE=dict( path_prefix = , ), ) while my osx development at home requires: routers = dict( # base router BASE=dict( path_prefix = /~me/web2py, ), ) Thanks! Ian -- 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/groups/opt_out.
[web2py] Re: urllib2.URLError
Hi Niphlod, same url working fine sometime but it gives error sometime. I tried several times this query. On Friday, 6 December 2013 11:54:21 UTC-8, Niphlod wrote: its a problem on the url you're requesting, not web2py's. On Friday, December 6, 2013 1:34:29 AM UTC+1, sonu kumar wrote: Hi All, In my application I am trying to call external weblink to map data but it always gives me class 'urllib2.URLError' urlopen error timed out error. I am using several times urllib for calling same weblinks for different mappingWill this cause problem??? params = {'from':'ID', 'to':'MEROPS_ID', 'format':'tab', 'query':'P22894'} data = urllib.urlencode(params) request1 = urllib2.Request('http://www.uniprot.org/mapping/', data) response = urllib2.urlopen(request1, timeout=30) params3 = {'from':'ID', 'to':'P_ENTREZGENEID', 'format':'tab', 'query':'P22894'} coexdata = urllib.urlencode(params3) coexrequest = urllib2.Request('http://www.uniprot.org/mapping/', coexdata) coexresponse = urllib2.urlopen(coexrequest, timeout=30) params4 = {'from':'ID', 'to':'P_ENTREZGENEID', 'format':'tab', 'query': 'P22894'} data6 = urllib.urlencode(params4) requestmmpn = urllib2.Request('http://www.uniprot.org/mapping/', data6) responsemmpn = urllib2.urlopen(requestmmpn, timeout=30) I have seen one http_error_302 611. 612. 613. 614. 615. 616. 617. 618. 619. 620. # Don't close the fp until we are sure that we won't use it # with HTTPError. fp.read() fp.close() return self.parent.open(new, timeout=req.timeout) http_error_301 = http_error_303 = http_error_307 = http_error_302 inf_msg = The HTTP server returned a redirect error that would \ any suggestion to solve this issue 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/groups/opt_out.
[web2py] Re: How to send email of registration verification and reset password by my function not by auth
Molte grazie Massimo! It worked perfectly! :D Em sexta-feira, 6 de dezembro de 2013 13h50min53s UTC-2, Massimo Di Pierro escreveu: Look into gluon/tools.py there is a class Mail:def send( self, to, subject = '[no subject]', message = '[no message]', attachments=None, cc=None, bcc=None, reply_to=None, sender=None, encoding='utf-8', raw=False, headers={} ): You can mail your own mail class and set: auth.settings.mailer = YourMail() On Friday, 6 December 2013 07:25:38 UTC-6, Relsi Maron wrote: Hi, I'm using boto to send my emails through Amazon SES, like this: http://www.web2pyslices.com/slice/show/1448/amazon-web-services-simple-email-service-using-boto All email of the app is ok, are send by my function, but the verify register and reset password email already are sent automatically, how I can change this to my function? Thanks to all -- 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/groups/opt_out.
[web2py] How to measure conversion rate with google analytics?
Hi I was wondering if it is possible to measure the conversion rate of how many people sign up to our service www.dominochinese.com with google analytics? If I understand it correct, I need to set up a goal URL with google analytics, but I then wonder how to redirect new users to that URL? Is there anything built into web2py so the stats become correct? I was just thinking that if I just redirect people who never signed in, I could possibly mess things up. Maybe I could just run a ajax call to the goal URL, if they are missing a database row value with the name has_signed_in_before? But will this give me the correct stats? Also any ideas on how to connect this to an Ad-words campaign? I use both email login and Janrain for people to sign up. Cheers! -- 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/groups/opt_out.
[web2py] Re: urllib2.URLError
Also I have seen this errorbut I am not getting it why it is happening msg'Moved Temporarily'code302requesturllib2.Request instanceresponseaddinfourl at 140652686281616 whose fp = Nonehdrshttplib.HTTPMessage instance On Friday, 6 December 2013 12:14:51 UTC-8, sonu kumar wrote: Hi Niphlod, same url working fine sometime but it gives error sometime. I tried several times this query. On Friday, 6 December 2013 11:54:21 UTC-8, Niphlod wrote: its a problem on the url you're requesting, not web2py's. On Friday, December 6, 2013 1:34:29 AM UTC+1, sonu kumar wrote: Hi All, In my application I am trying to call external weblink to map data but it always gives me class 'urllib2.URLError' urlopen error timed out error. I am using several times urllib for calling same weblinks for different mappingWill this cause problem??? params = {'from':'ID', 'to':'MEROPS_ID', 'format':'tab', 'query':'P22894'} data = urllib.urlencode(params) request1 = urllib2.Request('http://www.uniprot.org/mapping/', data) response = urllib2.urlopen(request1, timeout=30) params3 = {'from':'ID', 'to':'P_ENTREZGENEID', 'format':'tab', 'query':'P22894'} coexdata = urllib.urlencode(params3) coexrequest = urllib2.Request('http://www.uniprot.org/mapping/', coexdata) coexresponse = urllib2.urlopen(coexrequest, timeout=30) params4 = {'from':'ID', 'to':'P_ENTREZGENEID', 'format':'tab', 'query': 'P22894'} data6 = urllib.urlencode(params4) requestmmpn = urllib2.Request('http://www.uniprot.org/mapping/', data6) responsemmpn = urllib2.urlopen(requestmmpn, timeout=30) I have seen one http_error_302 611. 612. 613. 614. 615. 616. 617. 618. 619. 620. # Don't close the fp until we are sure that we won't use it # with HTTPError. fp.read() fp.close() return self.parent.open(new, timeout=req.timeout) http_error_301 = http_error_303 = http_error_307 = http_error_302 inf_msg = The HTTP server returned a redirect error that would \ any suggestion to solve this issue 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/groups/opt_out.
[web2py] Re: Reset Form with Errors
thanks! that works! On Friday, December 6, 2013 11:48:50 AM UTC-8, Niphlod wrote: button with type=reset are old school : they don't take into consideration that the page can be built (as web2py does) with additional elements explaining the user what the error is BTW: why don't you just redirect to the original page on reset ? if you want it to work like the user never entered any values, it will work fine: the user will get back t the completely blank form. -- 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/groups/opt_out.
[web2py] Re: analysis Keywords from web pages text[Urgent]
That's not how you find keywords, you need to use something like tf-idf. Removing stop words would also be useful. I don't really see how this is web2py related so maybe I'm misunderstanding something. -- 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/groups/opt_out.
[web2py] Re: GAE - Not Working || Full Code Attached
This is the same error as before. It should not happen with 2.8.2 On Friday, 6 December 2013 12:34:58 UTC-6, PRACHI VAKHARIA wrote: *New Error Ticket on GAE* What does this error mean? What is the solution to this error? Traceback (most recent call last):\n File /base/data/home/apps/s~myapp/1.372124618390164258/gluon/main.py, line 551, in wsgibase\n session._try_store_in_db(request, response)\n File /base/data/home/apps/s~pv-4-vp/1.372124618390164258/gluon/globals.py, line 728, in _try_store_in_db\n record_id = table.insert(**dd)\n File /base/data/home/apps/s~myapp/1.372124618390164258/gluon/dal.py, line 7806, in insert\n ret = self._db._adapter.insert(self,self._listify(fields))\n File /base/data/home/apps/s~myapp/1.372124618390164258/gluon/dal.py, line 4618, in insert\n rid = Reference(tmp.key().id())\nOverflowError: Python int too large to convert to C long\n' p6570 s. -- 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/groups/opt_out.
[web2py] Web2py, EMTE
Hi, I am very new to coding generally and have come across web2py. I was introduced whilst looking for a trade engine for my college (Highschool US) project. EMTE Trading (https://code.google.com/p/emte-trading/) looked ideal and was looking to get it setup running on my local webhost. I am sorry to be so specific in my question but I was wondering how to setup a new product in the application. On the form for adding a new product you have to specify a URL for the trade engine to access a QUOTE, WS and POST url. I have been lookng and experimenting to get this to work. By leaving these fields blank or incorrect the engine does not recive the price data. When on the PL section an error is always called, I suspect is due to the URLS not being properly setup. Thank you again, John -- 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/groups/opt_out.
Re: [web2py] most web2py appliances with appengine wont work out of the box.
Hi, thanks for replying; I have downloaded from the web2py.com, we2py for normal users souce code for ubuntu amd64. I can run some appliances on its own server. but even while running on its own server, for PyForum2, when i go to http://localhost:8000/pyforum/zadmin/forums i get this with a ticket; TypeError: object of type 'Row' has no len() when i run GAE/dev_appserver.py web2py, i can see the welcome page, but for pyforum http://localhost:8080/pyforum/default/index i get this error: Ticket issued: unknown thank you for helping :) On Tuesday, December 3, 2013 5:19:17 PM UTC+8, Philip Kilner wrote: Hi, On 03/12/13 03:16, ID wrote: I'm trying to setup web2py on Appengine, admin and example app works but, most of the apps under appliances wont work out of the box and issues a ticket.. in particular i'm interested to setup a little forum with pyforum2, that too does not work and issues a ticket. :( Can you tell us what error the ticket gives you? There isn't much to go on, so far. There is a section in the book on GAE deployment, which may be useful [1]. The biggest difference between AppEngine and other options is the GAE datastore, which does not support all of the features available to web2py with an RDBMS. It may be that the appliance you are using is configured to use an RDBMS, and that you would need to modify it to use the GAE datastore. Alternatively, if your issues is related to this, you may find that using Google's CloudSQL [2] (e.g. MySQL) is a better option for you. [1] http://web2py.com/books/default/chapter/29/13/deployment-recipes#Deploying-on-Google-App-Engine [2] https://developers.google.com/cloud-sql/ HTH -- Regards, PhilK 'a bell is a cup...until it is struck' -- 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/groups/opt_out.
[web2py] EMTE product URL
https://code.google.com/p/emte-trading/ Hi, I am struggling to setup EMTE trading engine. I am looking to set this up for my college (Highschool US) project. I am demonstrating trading and seeing this in action via the vemeo video, I was very impressed. It would be ideal. I think I have everything done, I am very new to progamming generally, especially web2py. The final issue I am having is setting the URL's on the product page. These point to the WEBSOCKET, QUOTE and POST of the traded product. I think this will solve the errors I am currently getting when clicking on the PL page. Thank you very much, John -- 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/groups/opt_out.
[web2py] grid with dictionary
Hi, Is it possible create a grid like SQLform.grid using a dictionay instead of a query result? Rgds, Diego -- 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/groups/opt_out.
[web2py] Re: grid with dictionary
I do not understand what you want to do. The grid is an interface to a database (i.e. an object you can select from, insert to, and update records). How is it supposed to work with a dictionary? What are you trying to accomplish? There may be a way to do it. On Friday, 6 December 2013 14:55:26 UTC-6, Diego Tostes wrote: Hi, Is it possible create a grid like SQLform.grid using a dictionay instead of a query result? Rgds, Diego -- 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/groups/opt_out.
[web2py] app not working after install 2.8.2 is_mobile error
I tried upgrading the web2py to 2.8.2 that was a bad idea... it totally killed the web2py app. I redownloaded a clean version and copied over my app now it throws the weirdest error: type 'exceptions.NameError''dict' object has no attribute 'is_mobile' it traces to user.html, but in reality it's caused by layout.htm the welcome app is working so I had a look inside the layout.html basicly the same except for a few mods I made that are unrelated. what am I missing? -- 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/groups/opt_out.
[web2py] Re: urllib2.URLError
Any update. I am struggling with this error... On Thursday, 5 December 2013 16:34:29 UTC-8, sonu kumar wrote: Hi All, In my application I am trying to call external weblink to map data but it always gives me class 'urllib2.URLError' urlopen error timed out error. I am using several times urllib for calling same weblinks for different mappingWill this cause problem??? params = {'from':'ID', 'to':'MEROPS_ID', 'format':'tab', 'query':'P22894'} data = urllib.urlencode(params) request1 = urllib2.Request('http://www.uniprot.org/mapping/', data) response = urllib2.urlopen(request1, timeout=30) params3 = {'from':'ID', 'to':'P_ENTREZGENEID', 'format':'tab', 'query':'P22894'} coexdata = urllib.urlencode(params3) coexrequest = urllib2.Request('http://www.uniprot.org/mapping/', coexdata) coexresponse = urllib2.urlopen(coexrequest, timeout=30) params4 = {'from':'ID', 'to':'P_ENTREZGENEID', 'format':'tab', 'query': 'P22894'} data6 = urllib.urlencode(params4) requestmmpn = urllib2.Request('http://www.uniprot.org/mapping/', data6) responsemmpn = urllib2.urlopen(requestmmpn, timeout=30) I have seen one http_error_302 611. 612. 613. 614. 615. 616. 617. 618. 619. 620. # Don't close the fp until we are sure that we won't use it # with HTTPError. fp.read() fp.close() return self.parent.open(new, timeout=req.timeout) http_error_301 = http_error_303 = http_error_307 = http_error_302 inf_msg = The HTTP server returned a redirect error that would \ any suggestion to solve this issue 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/groups/opt_out.
[web2py] Re: urllib2.URLError
here is my Traceback... Traceback (most recent call last): File /opt/web-apps/web2py/gluon/restricted.py, line 217, in restricted exec ccode in environment File /opt/web-apps/web2py/applications/CleavPredict/controllers/default.py, line 1541, in module File /opt/web-apps/web2py/gluon/globals.py, line 372, in lambda self._caller = lambda f: f() File /opt/web-apps/web2py/applications/CleavPredict/controllers/default.py, line 557, in result return uniprot_merops() File /opt/web-apps/web2py/applications/CleavPredict/controllers/default.py, line 315, in uniprot_merops responsemerops = opener.open('http://www.uniprot.org/mapping/', data, timeout=30) File /usr/lib64/python2.6/urllib2.py, line 397, in open response = meth(req, response) File /usr/lib64/python2.6/urllib2.py, line 510, in http_response 'http', request, response, code, msg, hdrs) File /usr/lib64/python2.6/urllib2.py, line 429, in error result = self._call_chain(*args) File /usr/lib64/python2.6/urllib2.py, line 369, in _call_chain result = func(*args) File /usr/lib64/python2.6/urllib2.py, line 616, in http_error_302 return self.parent.open(new, timeout=req.timeout) File /usr/lib64/python2.6/urllib2.py, line 391, in open response = self._open(req, data) File /usr/lib64/python2.6/urllib2.py, line 409, in _open '_open', req) File /usr/lib64/python2.6/urllib2.py, line 369, in _call_chain result = func(*args) File /usr/lib64/python2.6/urllib2.py, line 1190, in http_open return self.do_open(httplib.HTTPConnection, req) File /usr/lib64/python2.6/urllib2.py, line 1165, in do_open raise URLError(err) URLError: urlopen error timed out On Thursday, 5 December 2013 16:34:29 UTC-8, sonu kumar wrote: Hi All, In my application I am trying to call external weblink to map data but it always gives me class 'urllib2.URLError' urlopen error timed out error. I am using several times urllib for calling same weblinks for different mappingWill this cause problem??? params = {'from':'ID', 'to':'MEROPS_ID', 'format':'tab', 'query':'P22894'} data = urllib.urlencode(params) request1 = urllib2.Request('http://www.uniprot.org/mapping/', data) response = urllib2.urlopen(request1, timeout=30) params3 = {'from':'ID', 'to':'P_ENTREZGENEID', 'format':'tab', 'query':'P22894'} coexdata = urllib.urlencode(params3) coexrequest = urllib2.Request('http://www.uniprot.org/mapping/', coexdata) coexresponse = urllib2.urlopen(coexrequest, timeout=30) params4 = {'from':'ID', 'to':'P_ENTREZGENEID', 'format':'tab', 'query': 'P22894'} data6 = urllib.urlencode(params4) requestmmpn = urllib2.Request('http://www.uniprot.org/mapping/', data6) responsemmpn = urllib2.urlopen(requestmmpn, timeout=30) I have seen one http_error_302 611. 612. 613. 614. 615. 616. 617. 618. 619. 620. # Don't close the fp until we are sure that we won't use it # with HTTPError. fp.read() fp.close() return self.parent.open(new, timeout=req.timeout) http_error_301 = http_error_303 = http_error_307 = http_error_302 inf_msg = The HTTP server returned a redirect error that would \ any suggestion to solve this issue 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/groups/opt_out.
Re: [web2py] Re: urllib2.URLError
the error is URLError: urlopen error timed out increase the timeout here to 300: responsemerops = opener.open('http://www.uniprot.org/mapping/', data, timeout=30) and see what happens 2013/12/7 sonu kumar sonu.bioinformat...@gmail.com here is my Traceback... Traceback (most recent call last): File /opt/web-apps/web2py/gluon/restricted.py, line 217, in restricted exec ccode in environment File /opt/web-apps/web2py/applications/CleavPredict/controllers/default.py, line 1541, in module File /opt/web-apps/web2py/gluon/globals.py, line 372, in lambda self._caller = lambda f: f() File /opt/web-apps/web2py/applications/CleavPredict/controllers/default.py, line 557, in result return uniprot_merops() File /opt/web-apps/web2py/applications/CleavPredict/controllers/default.py, line 315, in uniprot_merops responsemerops = opener.open('http://www.uniprot.org/mapping/', data, timeout=30) File /usr/lib64/python2.6/urllib2.py, line 397, in open response = meth(req, response) File /usr/lib64/python2.6/urllib2.py, line 510, in http_response 'http', request, response, code, msg, hdrs) File /usr/lib64/python2.6/urllib2.py, line 429, in error result = self._call_chain(*args) File /usr/lib64/python2.6/urllib2.py, line 369, in _call_chain result = func(*args) File /usr/lib64/python2.6/urllib2.py, line 616, in http_error_302 return self.parent.open(new, timeout=req.timeout) File /usr/lib64/python2.6/urllib2.py, line 391, in open response = self._open(req, data) File /usr/lib64/python2.6/urllib2.py, line 409, in _open '_open', req) File /usr/lib64/python2.6/urllib2.py, line 369, in _call_chain result = func(*args) File /usr/lib64/python2.6/urllib2.py, line 1190, in http_open return self.do_open(httplib.HTTPConnection, req) File /usr/lib64/python2.6/urllib2.py, line 1165, in do_open raise URLError(err) URLError: urlopen error timed out On Thursday, 5 December 2013 16:34:29 UTC-8, sonu kumar wrote: Hi All, In my application I am trying to call external weblink to map data but it always gives me class 'urllib2.URLError' urlopen error timed out error. I am using several times urllib for calling same weblinks for different mappingWill this cause problem??? params = {'from':'ID', 'to':'MEROPS_ID', 'format':'tab', 'query':'P22894'} data = urllib.urlencode(params) request1 = urllib2.Request('http://www.uniprot.org/mapping/', data) response = urllib2.urlopen(request1, timeout=30) params3 = {'from':'ID', 'to':'P_ENTREZGENEID', 'format':'tab', 'query':'P22894'} coexdata = urllib.urlencode(params3) coexrequest = urllib2.Request('http://www.uniprot.org/mapping/', coexdata) coexresponse = urllib2.urlopen(coexrequest, timeout=30) params4 = {'from':'ID', 'to':'P_ENTREZGENEID', 'format':'tab', 'query': 'P22894'} data6 = urllib.urlencode(params4) requestmmpn = urllib2.Request('http://www.uniprot.org/mapping/', data6) responsemmpn = urllib2.urlopen(requestmmpn, timeout=30) I have seen one http_error_302 611. 612. 613. 614. 615. 616. 617. 618. 619. 620. # Don't close the fp until we are sure that we won't use it # with HTTPError. fp.read() fp.close() return self.parent.open(new, timeout=req.timeout) http_error_301 = http_error_303 = http_error_307 = http_error_302 inf_msg = The HTTP server returned a redirect error that would \ any suggestion to solve this issue 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/groups/opt_out. -- 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/groups/opt_out.
Re: [web2py] Re: urllib2.URLError
I tried but same error is coming in my traceback I have seen line 397, from here problem is showing... *File /usr/lib64/python2.6/urllib2.py in open at line 397* code arguments variables Function argument list (self=urllib2.OpenerDirector instance, fullurl='http://www.uniprot.org/mapping/', data='to=MEROPS_IDquery=P22894from=IDformat=tab', timeout=300) Code listing 392. 393. 394. 395. 396. 397. 398. 399. 400. 401. # post-process response meth_name = protocol+_response for processor in self.process_response.get(protocol, []): meth = getattr(processor, meth_name) response = meth(req, response) return response def _open(self, req, data=None): Variablesmethbound method HTTPErrorProcessor.http_response of urllib2.HTTPErrorProcessor instancerequrllib2.Request instanceresponseaddinfourl at 140652537300824 whose fp = None On Friday, 6 December 2013 16:40:13 UTC-8, Michele Comitini wrote: the error is URLError: urlopen error timed out increase the timeout here to 300: responsemerops = opener.open('http://www.uniprot.org/mapping/', data, timeout=30) and see what happens 2013/12/7 sonu kumar sonu.bioi...@gmail.com javascript: here is my Traceback... Traceback (most recent call last): File /opt/web-apps/web2py/gluon/restricted.py, line 217, in restricted exec ccode in environment File /opt/web-apps/web2py/applications/CleavPredict/controllers/default.py, line 1541, in module File /opt/web-apps/web2py/gluon/globals.py, line 372, in lambda self._caller = lambda f: f() File /opt/web-apps/web2py/applications/CleavPredict/controllers/default.py, line 557, in result return uniprot_merops() File /opt/web-apps/web2py/applications/CleavPredict/controllers/default.py, line 315, in uniprot_merops responsemerops = opener.open('http://www.uniprot.org/mapping/', data, timeout=30) File /usr/lib64/python2.6/urllib2.py, line 397, in open response = meth(req, response) File /usr/lib64/python2.6/urllib2.py, line 510, in http_response 'http', request, response, code, msg, hdrs) File /usr/lib64/python2.6/urllib2.py, line 429, in error result = self._call_chain(*args) File /usr/lib64/python2.6/urllib2.py, line 369, in _call_chain result = func(*args) File /usr/lib64/python2.6/urllib2.py, line 616, in http_error_302 return self.parent.open(new, timeout=req.timeout) File /usr/lib64/python2.6/urllib2.py, line 391, in open response = self._open(req, data) File /usr/lib64/python2.6/urllib2.py, line 409, in _open '_open', req) File /usr/lib64/python2.6/urllib2.py, line 369, in _call_chain result = func(*args) File /usr/lib64/python2.6/urllib2.py, line 1190, in http_open return self.do_open(httplib.HTTPConnection, req) File /usr/lib64/python2.6/urllib2.py, line 1165, in do_open raise URLError(err) URLError: urlopen error timed out On Thursday, 5 December 2013 16:34:29 UTC-8, sonu kumar wrote: Hi All, In my application I am trying to call external weblink to map data but it always gives me class 'urllib2.URLError' urlopen error timed out error. I am using several times urllib for calling same weblinks for different mappingWill this cause problem??? params = {'from':'ID', 'to':'MEROPS_ID', 'format':'tab', 'query':'P22894'} data = urllib.urlencode(params) request1 = urllib2.Request('http://www.uniprot.org/mapping/', data) response = urllib2.urlopen(request1, timeout=30) params3 = {'from':'ID', 'to':'P_ENTREZGENEID', 'format':'tab', 'query':'P22894'} coexdata = urllib.urlencode(params3) coexrequest = urllib2.Request('http://www.uniprot.org/mapping/', coexdata) coexresponse = urllib2.urlopen(coexrequest, timeout=30) params4 = {'from':'ID', 'to':'P_ENTREZGENEID', 'format':'tab', 'query': 'P22894'} data6 = urllib.urlencode(params4) requestmmpn = urllib2.Request('http://www.uniprot.org/mapping/', data6) responsemmpn = urllib2.urlopen(requestmmpn, timeout=30) I have seen one http_error_302 611. 612. 613. 614. 615. 616. 617. 618. 619. 620. # Don't close the fp until we are sure that we won't use it # with HTTPError. fp.read() fp.close() return self.parent.open(new, timeout=req.timeout) http_error_301 = http_error_303 = http_error_307 = http_error_302 inf_msg = The HTTP server returned a redirect error that would \ any suggestion to solve this issue 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
Re: [web2py] Re: urllib2.URLError
On Friday, December 6, 2013 4:46:26 PM UTC-8, sonu kumar wrote: I tried but same error is coming If you enter the URL directly in the address box of your browser, can you get to the expected page? I you try from a browser on the machine your web2py server is running on, can you get to the expected page? /dps in my traceback I have seen line 397, from here problem is showing... *File /usr/lib64/python2.6/urllib2.py in open at line 397* code arguments variables Function argument list (self=urllib2.OpenerDirector instance, fullurl='http://wwhttp://www.uniprot.org/mapping/ 'w.uniprot.org/mapping/ http://www.uniprot.org/mapping/, data='to=MEROPS_IDquery=P22894from=IDformat=tab', timeout=300) Code listing 392. 393. 394. 395. 396. 397. 398. 399. 400. 401. # post-process response meth_name = protocol+_response for processor in self.process_response.get(protocol, []): meth = getattr(processor, meth_name) response = meth(req, response) return response def _open(self, req, data=None): Variablesmethbound method HTTPErrorProcessor.http_response of urllib2.HTTPErrorProcessor instancerequrllib2.Request instance responseaddinfourl at 140652537300824 whose fp = None On Friday, 6 December 2013 16:40:13 UTC-8, Michele Comitini wrote: the error is URLError: urlopen error timed out increase the timeout here to 300: responsemerops = opener.open('http://www.uniprot.org/mapping/', data, timeout=30) and see what happens 2013/12/7 sonu kumar sonu.bioi...@gmail.com here is my Traceback... Traceback (most recent call last): File /opt/web-apps/web2py/gluon/restricted.py, line 217, in restricted exec ccode in environment File /opt/web-apps/web2py/applications/CleavPredict/controllers/default.py, line 1541, in module File /opt/web-apps/web2py/gluon/globals.py, line 372, in lambda self._caller = lambda f: f() File /opt/web-apps/web2py/applications/CleavPredict/controllers/default.py, line 557, in result return uniprot_merops() File /opt/web-apps/web2py/applications/CleavPredict/controllers/default.py, line 315, in uniprot_merops responsemerops = opener.open('http://www.uniprot.org/mapping/', data, timeout=30) File /usr/lib64/python2.6/urllib2.py, line 397, in open response = meth(req, response) File /usr/lib64/python2.6/urllib2.py, line 510, in http_response 'http', request, response, code, msg, hdrs) File /usr/lib64/python2.6/urllib2.py, line 429, in error result = self._call_chain(*args) File /usr/lib64/python2.6/urllib2.py, line 369, in _call_chain result = func(*args) File /usr/lib64/python2.6/urllib2.py, line 616, in http_error_302 return self.parent.open(new, timeout=req.timeout) File /usr/lib64/python2.6/urllib2.py, line 391, in open response = self._open(req, data) File /usr/lib64/python2.6/urllib2.py, line 409, in _open '_open', req) File /usr/lib64/python2.6/urllib2.py, line 369, in _call_chain result = func(*args) File /usr/lib64/python2.6/urllib2.py, line 1190, in http_open return self.do_open(httplib.HTTPConnection, req) File /usr/lib64/python2.6/urllib2.py, line 1165, in do_open raise URLError(err) URLError: urlopen error timed out On Thursday, 5 December 2013 16:34:29 UTC-8, sonu kumar wrote: Hi All, In my application I am trying to call external weblink to map data but it always gives me class 'urllib2.URLError' urlopen error timed out error. I am using several times urllib for calling same weblinks for different mappingWill this cause problem??? params = {'from':'ID', 'to':'MEROPS_ID', 'format':'tab', 'query':'P22894'} data = urllib.urlencode(params) request1 = urllib2.Request('http://www.uniprot.org/mapping/', data) response = urllib2.urlopen(request1, timeout=30) params3 = {'from':'ID', 'to':'P_ENTREZGENEID', 'format':'tab', 'query':'P22894'} coexdata = urllib.urlencode(params3) coexrequest = urllib2.Request('http://www.uniprot.org/mapping/', coexdata) coexresponse = urllib2.urlopen(coexrequest, timeout=30) params4 = {'from':'ID', 'to':'P_ENTREZGENEID', 'format':'tab', 'query': 'P22894'} data6 = urllib.urlencode(params4) requestmmpn = urllib2.Request('http://www.uniprot.org/mapping/', data6) responsemmpn = urllib2.urlopen(requestmmpn, timeout=30) I have seen one http_error_302 611. 612. 613. 614. 615. 616. 617. 618. 619. 620. # Don't close the fp until we are sure that we won't use it # with HTTPError. fp.read() fp.close() return self.parent.open(new, timeout=req.timeout) http_error_301 = http_error_303 = http_error_307 = http_error_302 inf_msg = The HTTP server returned a redirect error that would \ any suggestion to solve this issue Thanks --
[web2py] Re: app not working after install 2.8.2 is_mobile error
You missed a few threads discussing this. ;-) You need to clear/remove the sessions. The format of the session storage has changed. On Friday, 6 December 2013 17:55:52 UTC-6, Ivo wrote: I tried upgrading the web2py to 2.8.2 that was a bad idea... it totally killed the web2py app. I redownloaded a clean version and copied over my app now it throws the weirdest error: type 'exceptions.NameError''dict' object has no attribute 'is_mobile' it traces to user.html, but in reality it's caused by layout.htm the welcome app is working so I had a look inside the layout.html basicly the same except for a few mods I made that are unrelated. what am I missing? -- 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/groups/opt_out.
Re: [web2py] Re: grid with dictionary
Hi Massimo, I want to use the same graphics of a SQLform grid using my own dictionary. I don't want to create a html grid using tr and td. I am seeking for a solution to have a good graphical grid with search engine to show data that i will send to the view using a dictionary. Rgds, Diego -- 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/groups/opt_out.
[web2py] Scheduler in Windows
Hi, I'm fairly new to web2py but I've developed a couple of apps already under Linux and had no issues so far. I was delighted to see my apps work like a charm under a Windows 7 machine as well, until... I started using the scheduler. I went through the docs I found, and I read and reread the topics on this post. On my version of web2py (2.8.2) I simply don't manage to get any scheduler worker running: When I try manually to start a worker with the -K option, it gets totally ignored and I get the usual GUI popping up as if I didn't specify it at all. Note BTW that the GUI has a inspiring Scheduler option, but that doesn't seem to be implemented yet. I tried this both on the source version and on the compiled windows version. The fact that it gets ignored is inferred by the fact that in the console output I don't see any message to specify that a worker has been started, and the normal server seems instead to take over... Can somebody give me a hint? Many thanks, (another) Massimo -- 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/groups/opt_out.
[web2py] Re: Direct access to a SQLFORM.grid single record view
Thanks Ivo, but result is the same, the response_flash returns me not authorized. With this: {{=A('test link', _href=URL('products_listing/view/products/717'))}} Or this: {{=A('test link', _href=URL(r=request, c='products_listing/view', f='products', args=[717]))}} I think it's due to the fact that there's a security signature in the URL when you ask for a single record SQLFORM.grid view: /products_listing/view/products/717?_signature=c393b8bc857a5842f659156755d1ffcaf3e082a3 So certainly the solution is to pass some args to the controller that you have to manage inside the grid construction. Another way could be making a single record view without the grid. Bye. Il giorno venerdì 6 dicembre 2013 15:23:15 UTC+1, Ivo ha scritto: Why don't you pass the product id as an arg[product_id]? You can have a link like this _href=URL(r=request, c='products_listing/view', f='products', args=[product_id]) you know it's not really userfriendly to manipulate the grid view form. On Friday, December 6, 2013 2:59:46 PM UTC+1, Gael Princivalle wrote: Hello all. Is it possible to call a function/page with an SQLFORM.grid asking for the single view mode instead of the list mode ? Something like ... {{=A('test link', _href=URL('products_listing/view/products/717'))}} 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/groups/opt_out.