[web2py] SQLForm set default values from database

2013-12-06 Thread Yebach
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]

[web2py] Webfaction password problem with 2.8.2 installation

2013-12-06 Thread Gael Princivalle
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

Re: [web2py] session cookie for two subdomains

2013-12-06 Thread Marin Pranjić
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

[web2py] Re: After upgrade to 2.8.2: class 'sqlite3.IntegrityError' foreign key constraint failed

2013-12-06 Thread Loïc
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)

[web2py] analysis Keywords from web pages text[Urgent]

2013-12-06 Thread Ramkrishan Bhatt
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

Re: [web2py] Social Login

2013-12-06 Thread Cássio Botaro
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

Re: [web2py] New Free Appliance - Ticketing Project Management System BugBuster Online

2013-12-06 Thread Rahul
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

[web2py] How to send email of registration verification and reset password by my function not by auth

2013-12-06 Thread Relsi Maron
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

[web2py] Direct access to a SQLFORM.grid single record view

2013-12-06 Thread Gael Princivalle
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

Re: [web2py] Re: login crash under 2.8.2

2013-12-06 Thread lucas
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. --

[web2py] SQLFORM.grid edit form pre populate field

2013-12-06 Thread Ivo
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

Re: [web2py] Social Login

2013-12-06 Thread Michele Comitini
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

[web2py] Re: SQLFORM.grid edit form pre populate field

2013-12-06 Thread 黄祥
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

[web2py] Re: Direct access to a SQLFORM.grid single record view

2013-12-06 Thread Ivo
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

Re: [web2py] Re: update table from sqlform

2013-12-06 Thread Johann Spies
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) -

[web2py] Re: SQLForm set default values from database

2013-12-06 Thread Anthony
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

[web2py] Re: SQLFORM.grid edit form pre populate field

2013-12-06 Thread Ivo
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,

[web2py] Re: update table from sqlform

2013-12-06 Thread Anthony
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:

[web2py] Re: SQLFORM.grid edit form pre populate field

2013-12-06 Thread 黄祥
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 -

[web2py] Re: session cookie for two subdomains

2013-12-06 Thread Leonel Câmara
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

[web2py] Re: session cookie for two subdomains

2013-12-06 Thread Massimo Di Pierro
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?

[web2py] Re: How to send email of registration verification and reset password by my function not by auth

2013-12-06 Thread Massimo Di Pierro
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',

[web2py] Re: For web2py V2.8.2, how can I customize the default layout, changing colors and background images?

2013-12-06 Thread JoeCodeswell
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 {

[web2py] fetching db records with request.args(0)

2013-12-06 Thread raferbop
# 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 =

Re: [web2py] fetching db records with request.args(0)

2013-12-06 Thread Vinicius Assef
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

[web2py] Re: session cookie for two subdomains

2013-12-06 Thread Marin Pranjić
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

[web2py] Re: SQLFORM.grid edit form pre populate field

2013-12-06 Thread Ivo
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

Re: [web2py] fetching db records with request.args(0)

2013-12-06 Thread raferbop
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:

[web2py] Re: The odd behavior of cacheable selects. Bug?

2013-12-06 Thread Leonel Câmara
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',

[web2py] Reset Form with Errors

2013-12-06 Thread EW
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

Re: [web2py] Social Login

2013-12-06 Thread Cássio Botaro
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

[web2py] Re: session cookie for two subdomains

2013-12-06 Thread Massimo Di Pierro
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

[web2py] Re: For web2py V2.8.2, how can I customize the default layout, changing colors and background images?

2013-12-06 Thread JoeCodeswell
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

Re: [web2py] Social Login

2013-12-06 Thread Michele Comitini
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

[web2py] Re: For web2py V2.8.2, how can I customize the default layout, changing colors and background images?

2013-12-06 Thread Massimo Di Pierro
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

[web2py] Re: Online classes

2013-12-06 Thread Carlos Zenteno
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

Re: [web2py] Re: GAE - Not Working || Full Code Attached

2013-12-06 Thread PRACHI VAKHARIA
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

[web2py] Re: GAE - Not Working || Full Code Attached

2013-12-06 Thread PRACHI VAKHARIA
*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

[web2py] Re: Reset Form with Errors

2013-12-06 Thread Niphlod
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

[web2py] Re: urllib2.URLError

2013-12-06 Thread Niphlod
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

[web2py] Re: Prevent multiple submit buttons from showing Working... on submit

2013-12-06 Thread Niphlod
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

Re: [web2py] Re: session cookie for two subdomains

2013-12-06 Thread Marin Pranjić
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,

[web2py] multiple path_prefix in routes.py?

2013-12-06 Thread eyeteajay
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 = , ), )

[web2py] Re: urllib2.URLError

2013-12-06 Thread sonu kumar
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

[web2py] Re: How to send email of registration verification and reset password by my function not by auth

2013-12-06 Thread Relsi Maron
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]',

[web2py] How to measure conversion rate with google analytics?

2013-12-06 Thread Mika Sjöman
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

[web2py] Re: urllib2.URLError

2013-12-06 Thread sonu kumar
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,

[web2py] Re: Reset Form with Errors

2013-12-06 Thread EW
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

[web2py] Re: analysis Keywords from web pages text[Urgent]

2013-12-06 Thread Leonel Câmara
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) -

[web2py] Re: GAE - Not Working || Full Code Attached

2013-12-06 Thread Massimo Di Pierro
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

[web2py] Web2py, EMTE

2013-12-06 Thread John Griffith
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

Re: [web2py] most web2py appliances with appengine wont work out of the box.

2013-12-06 Thread ID
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

[web2py] EMTE product URL

2013-12-06 Thread John Griffith
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

[web2py] grid with dictionary

2013-12-06 Thread Diego Tostes
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)

[web2py] Re: grid with dictionary

2013-12-06 Thread Massimo Di Pierro
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

[web2py] app not working after install 2.8.2 is_mobile error

2013-12-06 Thread Ivo
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

[web2py] Re: urllib2.URLError

2013-12-06 Thread sonu kumar
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

[web2py] Re: urllib2.URLError

2013-12-06 Thread sonu kumar
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

Re: [web2py] Re: urllib2.URLError

2013-12-06 Thread Michele Comitini
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

Re: [web2py] Re: urllib2.URLError

2013-12-06 Thread sonu kumar
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,

Re: [web2py] Re: urllib2.URLError

2013-12-06 Thread Dave S
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

[web2py] Re: app not working after install 2.8.2 is_mobile error

2013-12-06 Thread Massimo Di Pierro
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

Re: [web2py] Re: grid with dictionary

2013-12-06 Thread Diego Tostes
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 --

[web2py] Scheduler in Windows

2013-12-06 Thread Massimo Mascaro
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

[web2py] Re: Direct access to a SQLFORM.grid single record view

2013-12-06 Thread Gael Princivalle
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