[web2py] how to get logout() to launch an ajax call

2012-03-27 Thread weheh
I want something like this to work, but it doesn't, obviously. def logout(): auth.logout() response.js = 'alert(goodbye world);' from gluon import HTTP HTTP(202) return dict() I've also tried auth.settings.logout_onlogout = [onlogoutfunction] but that's not working for me

[web2py] Re: web2py file location

2012-03-27 Thread Ron McOuat
Have you done a right click on web2py.app and then Show Contents from the pop up menu. You should see a Contents directory which you can now explore.

[web2py] Re: web2py 1.99.7 is OUT

2012-03-27 Thread IVINH
In my app, LOAD not work fine with 1.99.7, i'm try a test: 1. copy my view (contain js script), example: index.html to index.load 2. run : .../index.html and then .../index.load Both work well with the 1.99.4, but the second was not correct with 1.99.7 I think this is problem of extension

[web2py] Re: Problem with GAE and Cloud SQL

2012-03-27 Thread Matt
I've managed to figure out a solution. (Not sure if it's 100% correct though but it seems to work fine). The GoogleSqlAdapter needs the following change: class GoogleSQLAdapter(UseDatabaseStoredFile,MySQLAdapter): uploads_in_blob = True Hope this helps somebody else. Matt On Tuesday, 27

[web2py] Re: DAL Challenge

2012-03-27 Thread Wikus van de Merwe
When working with GAE datastore you want to execute minimum number of queries necessary to avoid delays and limit the use of DB API calls. Fetching comments one by one is not the best option then (even if done with ajax). Probably the most efficient way would be to store the list of comment ids

[web2py] Re: Bug? The DAL gives different SQL when query is provided as string.

2012-03-27 Thread Niphlod
you're right. the query actually is only the where part, and if you serialize that as a string it loses other attributes necessary to construct the other parts of the query. Now, I don't understand why this is a problem: you can: - cache the results without hitting the database twice using the

[web2py] Re: DAL Challenge

2012-03-27 Thread Niphlod
On the cache side. function test(x): if cache.ram('key_%s' % x, 5): return cache.ram('key_%s' % x, 5) else: . cache.ram('key_%s' % x, lambda: x , 5)

[web2py] Re: Using single instance of LibreOffice to convert documents - is this safe?

2012-03-27 Thread Wikus van de Merwe
If this processing is done after the form submission you can delegate that to a background task. Having a queue of tasks end executing them one by one should solve the concurrent access problem. Check out the book section on scheduler:

Re: [web2py] Re: DAL and schema

2012-03-27 Thread Johann Spies
On 26 March 2012 20:22, adesst adesantoas...@gmail.com wrote: @Johann, i don't know if you would copy paste the diff i've made into PgAdapter, and do some tests and post the results. Pg and Oracle schema works in the same way. I have downloaded and looked at MyDal and the README but I am

[web2py] Re: difference between script src= ... and response.files.append(...)

2012-03-27 Thread Wikus van de Merwe
You *have to* set the response.files first, then include web2py_ajax.html. Look how this is done in the example app: http://code.google.com/p/web2py/source/browse/applications/welcome/views/layout.html Also notice that web2py_ajax.html already includes jquery and web2py.js:

[web2py] Re: @auth.requires(lambda: auth.has_membership(VCARD))

2012-03-27 Thread Wikus van de Merwe
You need web2py = 1.99.3 for the lambda to work.

[web2py] Re: Web Development Introduction Based On Web2py

2012-03-27 Thread BlueShadow
Hey Marco, great tutorial but I got stuck at section 4.3 when we write the first test. when startng the funktional_tests.py! The Program writes ran 0 Tests! 0.0 seconds. Not even the firefox is opening. Anyone knows whats wrong. or what I could do? running Win7 python 2.7 selenium 2.20 thanks

[web2py] Re: Indentation Error in web2py web file editor

2012-03-27 Thread gubbanoa
Version 1.99.1 (2011-09-22 16:59:24) stable

[web2py] Check out my new site! (also trouble with routes.py)

2012-03-27 Thread vtgorilla
I just launched it this morning: http://RosterBrain.com I was having a lot of trouble getting routes.py to work with my form submits so I just stripped it for the time being. Is there anything wrong with the following syntax? routers = dict( BASE = dict( default_application =

[web2py] Re: Using single instance of LibreOffice to convert documents - is this safe?

2012-03-27 Thread Cliff
Thanks Wilkus. Further research this AM says Libre/Open Office does not multi-thread well. The scheduler is just what I need. On Mar 27, 6:33 am, Wikus van de Merwe dupakrop...@googlemail.com wrote: If this processing is done after the form submission you can delegate that to a background

[web2py] Re: web2py file location

2012-03-27 Thread lyn2py
Specifically, /Programming/Python/web2py/applications/sample/ On Tuesday, March 27, 2012 12:35:40 PM UTC+8, genesisk wrote: I would think so too but I don't see any! Is there any other possibilities? Is it hidden somewhere? Please help me out Thanks. On Tuesday, March 27, 2012 11:52:47

Re: [web2py] Check out my new site! (also trouble with routes.py)

2012-03-27 Thread Johann Spies
On 27 March 2012 13:46, vtgorilla bradley.allmendin...@gmail.com wrote: I just launched it this morning: http://RosterBrain.com it looks impressive but you have got no rugby, cricket and tennis there! :) Regards Johann -- Because experiencing your loyal love is better than life itself, my

[web2py] Re: Check out my new site! (also trouble with routes.py)

2012-03-27 Thread lyn2py
Very nice theme! Did you design it yourself? On Tuesday, March 27, 2012 7:46:02 PM UTC+8, vtgorilla wrote: I just launched it this morning: http://RosterBrain.com I was having a lot of trouble getting routes.py to work with my form submits so I just stripped it for the time being. Is

[web2py] executing javascript after accepting a form

2012-03-27 Thread José L .
Hi, I'm having problems trying to show a modal window after the user submits correctly a form. I've tried to do it with: def index(): if form.accepts(request.vars): response.js='$( #dialog-message ).dialog({ modal: true });' ... being #dialog-message a div in the same

[web2py] Re: Check out my new site! (also trouble with routes.py)

2012-03-27 Thread vtgorilla
Yes, but I borrowed inspiration heavily from another design. On Mar 27, 8:15 am, lyn2py lyn...@gmail.com wrote: Very nice theme! Did you design it yourself? On Tuesday, March 27, 2012 7:46:02 PM UTC+8, vtgorilla wrote: I just launched it this morning:http://RosterBrain.com I was

[web2py] Dotcloud now with support for websockets is += 1 service ?

2012-03-27 Thread smogzer
Hi folks, I recently read about websockets and saw a video by Bruno Rocha showing the use of comet and web2py and it seems like a technology with lots of potential. What i would like to know is that if it is possible to replace comet with some server side service provided by dotcloud, so that

[web2py] Re: web2py file location

2012-03-27 Thread genesisk
Great! Thank you Ron, and lyn2py for your help! On Tuesday, March 27, 2012 4:19:22 PM UTC+9, Ron McOuat wrote: Have you done a right click on web2py.app and then Show Contents from the pop up menu. You should see a Contents directory which you can now explore.

[web2py] How to allow Image Upload and Border Selection preview before saving to permanent table

2012-03-27 Thread mwk
Hi Massimo and All, I want a user to be able to upload an image and choose a border to surround it from a choice of images I have in the database. I want them to be able to play around and see what looks best to them before saving their final border choice and uploaded image to the database. I

Re: [web2py] How to allow Image Upload and Border Selection preview before saving to permanent table

2012-03-27 Thread Bruno Rocha
There are many ways of doing that, one option is to overlay the image with the border images using CSS background clipping, so you can save the file and the ID of the border, so when you show this in view you choose the border dynamically. If you want to save the image with border on disk then

[web2py] Re: Rocket errors on importing python library

2012-03-27 Thread Rohan
any updates? On Monday, 26 March 2012 20:03:07 UTC+5:30, Rohan wrote: Web2py Version 1.99.7 (2012-03-04 22:12:08) stable Python 2.7.2+ I am trying to load external library from python ( http://pypi.python.org/pypi/readability-lxml/0.2.3) import urllib2 import readability

[web2py] Re: How to allow Image Upload and Border Selection preview before saving to permanent table

2012-03-27 Thread mwk
Thanks Bruno, The css sounds like a good choice and I use that for final display, trick is I don't know how to get a preview/play around mode first. Do I need to have one db.tablename for the image preview upload and then another db.tablename for the final saved version? Currently I have one

[web2py] Re: How to Save Query in Session

2012-03-27 Thread Massimo Di Pierro
Sorry. Stupid me. I responded from my phone and I did not see your entire post. Ignore my post and thanks for the recipe. :-) Massimo On Monday, 26 March 2012 22:47:24 UTC-5, Limedrop wrote: Huh? I'm sorry but I don't understand. On Mar 27, 4:28 pm, Massimo Di Pierro

[web2py] Re: how to get logout() to launch an ajax call

2012-03-27 Thread Massimo Di Pierro
I do not understand what you try to accomplish. What is this line supposed to do? HTTP(202) On Tuesday, 27 March 2012 01:01:23 UTC-5, weheh wrote: I want something like this to work, but it doesn't, obviously. def logout(): auth.logout() response.js = 'alert(goodbye

[web2py] Re: changelog

2012-03-27 Thread Massimo Di Pierro
Where are you looking for the changelog? On Tuesday, 27 March 2012 02:09:45 UTC-5, RyanTheLeach wrote: Just a heads up, the current stable version according to the download site is 1.99.7 but the changelog only goes up to 1.99.5 :S

[web2py] Re: web2py 1.99.7 is OUT

2012-03-27 Thread Massimo Di Pierro
Please check trunk. I believe this was fixed. On Tuesday, 27 March 2012 03:56:35 UTC-5, IVINH wrote: In my app, LOAD not work fine with 1.99.7, i'm try a test: 1. copy my view (contain js script), example: index.html to index.load 2. run : .../index.html and then .../index.load Both work

[web2py] Re: web2py 1.99.7 is OUT

2012-03-27 Thread Massimo Di Pierro
Have you checked trunk or the nightly built. I believe this was fixed? On Tuesday, 27 March 2012 03:56:35 UTC-5, IVINH wrote: In my app, LOAD not work fine with 1.99.7, i'm try a test: 1. copy my view (contain js script), example: index.html to index.load 2. run : .../index.html and then

[web2py] Re: DAL Challenge

2012-03-27 Thread Massimo Di Pierro
I guess we could modify the cache object to to this automagically. Open a ticket about it. On Monday, 26 March 2012 17:57:15 UTC-5, Udi Milo wrote: Hi guys, I have an entity called article. I want to build the ability to comment on each article. comment at least need (created_on, user_id,

[web2py] Re: Indentation Error in web2py web file editor

2012-03-27 Thread Massimo Di Pierro
This should have been fixed with the new web editor. On Tuesday, 27 March 2012 06:00:08 UTC-5, gubbanoa wrote: Version 1.99.1 (2011-09-22 16:59:24) stable

[web2py] Re: Check out my new site! (also trouble with routes.py)

2012-03-27 Thread Massimo Di Pierro
:-) On Tuesday, 27 March 2012 06:46:02 UTC-5, vtgorilla wrote: I just launched it this morning: http://RosterBrain.com I was having a lot of trouble getting routes.py to work with my form submits so I just stripped it for the time being. Is there anything wrong with the following syntax?

[web2py] Re: DAL Challenge

2012-03-27 Thread Udi Milo
Thanks! I'm trying to follow the logic of your suggestion all the way to rendering it, tell me if you have a better idea: once I hold the list of articles I want to show, I run over the list and get all the comment ids, I issue a large query with the ids of all comments for all articles

[web2py] Re: Check out my new site! (also trouble with routes.py)

2012-03-27 Thread Anthony
Nice. Just added to http://web2py.com/poweredby. Routes looks OK -- is that the entire routes.py file? Any app-specific routes? Anthony On Tuesday, March 27, 2012 7:46:02 AM UTC-4, vtgorilla wrote: I just launched it this morning: http://RosterBrain.com I was having a lot of trouble

[web2py] Re: executing javascript after accepting a form

2012-03-27 Thread Sushant Taneja
Hi, If you are submitting your form via ajax then you can use eval to call a JS function. You can check out the syntax here : http://web2py.com/books/default/chapter/29/11#Eval-target create a JS function showDialog(){ // write code here } in the controller write the return statement as :

[web2py] Re: how to get logout() to launch an ajax call

2012-03-27 Thread Anthony
I want something like this to work, but it doesn't, obviously. def logout(): auth.logout() response.js = 'alert(goodbye world);' from gluon import HTTP HTTP(202) return dict() I've also tried auth.settings.logout_onlogout = [onlogoutfunction] but that's not

[web2py] Re: executing javascript after accepting a form

2012-03-27 Thread Anthony
Yes, response.js only works for requests for components (made via a client-side call to web2py_ajax_page(), which is called when you use the LOAD helper in the view). You might try something like this: def index(): ... if form.accepts(request.vars): js = SCRIPT('$(function()

[web2py] Date field mask or another value

2012-03-27 Thread Adriano Almeida
Hi, I want a field (may be string,date or number, no prob) to have a format of MM (valid year and month) or if it is left null, to be 99. How Could I accomplished that? I have tried : Field('A0514_DT_FIN','date',notnull=True, label= 'Dt Fim (MM)', default= '99') and then the

[web2py] Re: difference between script src= ... and response.files.append(...)

2012-03-27 Thread Anthony
On Tuesday, March 27, 2012 1:46:50 AM UTC-4, weheh wrote: Ouch, ouch, ouch ... that causes things to really disintegrate! I tend to agree with your assessment that there's an order dependence somewhere. But I don't see it, yet. I think your URL function is wrong -- URL('static', 'js',

[web2py] Re: Problem with GAE and Cloud SQL

2012-03-27 Thread Anthony
Can you submit an issue about this: http://code.google.com/p/web2py/issues/list Anthony On Tuesday, March 27, 2012 5:41:55 AM UTC-4, Matt wrote: I've managed to figure out a solution. (Not sure if it's 100% correct though but it seems to work fine). The GoogleSqlAdapter needs the

[web2py] Re: Check out my new site! (also trouble with routes.py)

2012-03-27 Thread vtgorilla
That was the entire file. I only have the one public facing app, so I didn't try to do anything fancy with it yet. I kept having trouble after I took the routes.py out, and I think my issue was that web2py wasn't always figuring out my redirect(URL('pagename'))'s correctly. I explicitly added in

[web2py] Re: Check out my new site! (also trouble with routes.py)

2012-03-27 Thread Anthony
I kept having trouble after I took the routes.py out, and I think my issue was that web2py wasn't always figuring out my redirect(URL('pagename'))'s correctly. I explicitly added in the app and controller names to all the redirects and it solved whatever was happening. When you do

[web2py] sqlite to postgres

2012-03-27 Thread Marco Tulio Cicero de M. Porto
Hi! I was using sqlite as my database for a few projects, but decided to go to postgres. While to web2py going from one to another is pretty much a connection string that you'll change, there's still one problem remaining. How do I get the data that was on my app (on the sqlite database). On a

[web2py] Customizing a widget

2012-03-27 Thread Larry Wapnitsky
Forgive my N00b-ness - not a web developer (but I've said that before) I have the following code in an app I'm writing: Field('b_or_w', 'string', length=1, widget=SQLFORM.widgets.radio.widget, requires=IS_IN_SET(['b','w']), default='b') How do I customize this so that, instead of *b* and *w*

Re: [web2py] Re: Check out my new site! (also trouble with routes.py)

2012-03-27 Thread Jonathan Lundell
On Mar 27, 2012, at 7:35 AM, Anthony wrote: Routes looks OK -- is that the entire routes.py file? Any app-specific routes? It does look OK, though keep in mind that setting the default a/c/f in a parametric router is subtly different from setting them outside the router. Do you get any more

Re: [web2py] Re: executing javascript after accepting a form

2012-03-27 Thread José Luis Redrejo Rodríguez
It works perfectly. Thanks very much Anthony. Sushant: I didn't want to change my code to an ajax form. I wanted to keep it the way it was. Thanks for your suggestion anyway. Regards. 2012/3/27 Anthony abasta...@gmail.com: Yes, response.js only works for requests for components (made via a

Re: [web2py] Customizing a widget

2012-03-27 Thread Bruno Rocha
Field('b_or_w', 'string', length=1, widget=SQLFORM.widgets.radio.widget, requires=IS_IN_SET(*[('b', 'black'),('w', 'white')]*), default='b') On Tue, Mar 27, 2012 at 12:56 PM, Larry Wapnitsky la...@kvetsch.com wrote: Field('b_or_w', 'string', length=1, widget=SQLFORM.widgets.radio.widget,

[web2py] Re: Customizing a widget

2012-03-27 Thread Anthony
You can use a dictionary, list of tuples, or a separate labels argument: IS_IN_SET({'b':'black', 'w':'white'}) IS_IN_SET([('b', 'black'), ('w', 'white')]) IS_IN_SET(['b', 'w'], labels=['black', 'white']) Anthony On Tuesday, March 27, 2012 11:56:48 AM UTC-4, Larry Wapnitsky wrote: Forgive my

[web2py] Re: sqlite to postgres

2012-03-27 Thread Anthony
http://web2py.com/books/default/chapter/29/6#CSV-(all-tables-at-once) On Tuesday, March 27, 2012 11:26:17 AM UTC-4, Marco Tulio wrote: Hi! I was using sqlite as my database for a few projects, but decided to go to postgres. While to web2py going from one to another is pretty much a

Re: [web2py] Re: Customizing a widget

2012-03-27 Thread Larry G. Wapnitsky
Thank you, Bruno and Anthony. Perfect. On 3/27/2012 12:06 PM, Anthony wrote: You can use a dictionary, list of tuples, or a separate labels argument: IS_IN_SET({'b':'black', 'w':'white'}) IS_IN_SET([('b', 'black'), ('w', 'white')]) IS_IN_SET(['b', 'w'], labels=['black', 'white']) Anthony

[web2py] problem with encoding in javascript from the server

2012-03-27 Thread Miguel Lopes
This is not strictly a web2py issue. Though it is a problem that apps dealing with some character sets must deal with. I confess that the source of my problem is that I have been delaying reading-up on encoding and decoding far too long. But I'm pressed for time and I'm sure that this is a simple

[web2py] Re: problem with encoding in javascript from the server

2012-03-27 Thread Miguel Lopes
No dia 27 de Mar de 2012 16:13, Miguel Lopes mig.e.lo...@gmail.com escreveu: BTW this is a prettyPhoto widget I developed for plugin_wiki, which is awesome :-) I mean plugin_wiki is awesome :-) lol

[web2py] Re: sqlite to postgres

2012-03-27 Thread nick name
On Tuesday, March 27, 2012 11:26:17 AM UTC-4, Marco Tulio wrote: How do I get the data that was on my app (on the sqlite database). Web2py comes with scripts/cpdb.py, which copies databases from one connection string to another with lots of other goodies. see

[web2py] Fake_migrate with auth

2012-03-27 Thread Bruce Wade
How do I do a fake_migrate with the auth table so I don't get the following error? I know the table exists already I just pushed some major changes to my server and now when I run the app I get the tables already exists error. I really don't want to have to delete that table again, consider I have

[web2py] Re: Fake_migrate with auth

2012-03-27 Thread Bruce Wade
Tried fake_migrate_all which allowed the page to loaded. However now when I try to login I get an error that auth_user.username doesn't exist. When I go to the database administration in admin, I get the following error when clicking on auth_user, class 'psycopg2.InternalError' current

[web2py] Re: problem with encoding in javascript from the server

2012-03-27 Thread Derek
What's the character set in your browser? On Tuesday, March 27, 2012 9:13:14 AM UTC-7, miguel wrote: This is not strictly a web2py issue. Though it is a problem that apps dealing with some character sets must deal with. I confess that the source of my problem is that I have been delaying

[web2py] Re: problem with encoding in javascript from the server

2012-03-27 Thread Derek
Check the meta tag - if it's UTF-8, that's most likely the issue. You can try ISO-8859-1 and see if that works for you. On Tuesday, March 27, 2012 10:41:53 AM UTC-7, Derek wrote: What's the character set in your browser? On Tuesday, March 27, 2012 9:13:14 AM UTC-7, miguel wrote: This is

[web2py] Re: problem with encoding in javascript from the server

2012-03-27 Thread Derek
Sorry, I am slow today. your meta charset tag in your layout - it's in the header. If it's UTF-8, it's wrong. On Tuesday, March 27, 2012 10:46:27 AM UTC-7, Derek wrote: Check the meta tag - if it's UTF-8, that's most likely the issue. You can try ISO-8859-1 and see if that works for you.

[web2py] Re: changelog

2012-03-27 Thread Derek
The link right on the download page. http://web2py.com/examples/default/download http://web2py.com/examples/default/changelog On Tuesday, March 27, 2012 7:10:34 AM UTC-7, Massimo Di Pierro wrote: Where are you looking for the changelog? On Tuesday, 27 March 2012 02:09:45 UTC-5,

Re: [web2py] Re: problem with encoding in javascript from the server

2012-03-27 Thread Miguel Lopes
No dia 27 de Mar de 2012 17:41, Derek sp1d...@gmail.com escreveu: What's the character set in your browser? I have safari set for default. But I don't think that's the problem, because if I hardcode the string there is no problem. I'm certainly missing something, but the culprit operation seems

Re: [web2py] Re: problem with encoding in javascript from the server

2012-03-27 Thread Miguel Lopes
No dia 27 de Mar de 2012 17:46, Derek sp1d...@gmail.com escreveu: Check the meta tag - if it's UTF-8, that's most likely the issue. You can try ISO-8859-1 and see if that works for you. Txs. Will also check that.

Re: [web2py] Re: Fake_migrate with auth

2012-03-27 Thread Richard Vézina
I think the best way to avoid this is to define custom auth tables and then set them to migrate=false. Richard On Tue, Mar 27, 2012 at 1:40 PM, Bruce Wade bruce.w...@gmail.com wrote: Tried fake_migrate_all which allowed the page to loaded. However now when I try to login I get an error that

[web2py] Re: Date field mask or another value

2012-03-27 Thread Massimo Di Pierro
Does it need to be a date field? It not have a day so it will create some problems. You can make it a string field Field('A0514_DT_FIN',requires=IS_EMPTY_OR(IS_MATCH('\d{6}'))) On Tuesday, 27 March 2012 10:05:11 UTC-5, Adriano Almeida wrote: Hi, I want a field (may be string,date or

[web2py] Re: changelog

2012-03-27 Thread Massimo Di Pierro
My bad. The header should have been 1.99.5-1.99.7. The change log is the same. .7 was released two days after .4 to fix some bugs but no new features. On Tuesday, 27 March 2012 12:59:21 UTC-5, Derek wrote: The link right on the download page. http://web2py.com/examples/default/download

Re: [web2py] Re: problem with encoding in javascript from the server

2012-03-27 Thread Derek
Right, I was asking what the page shows as the character set. I was not so good at asking for what I wanted. On Tuesday, March 27, 2012 11:28:37 AM UTC-7, miguel wrote: No dia 27 de Mar de 2012 17:41, Derek sp1d...@gmail.com escreveu: What's the character set in your browser? I have

Re: [web2py] Re: DAL or SQL?

2012-03-27 Thread Keith Edmunds
On Sun, 25 Mar 2012 16:41:09 -0700 (PDT), niph...@gmail.com said: Doh, you're right. All the datetime api on fields are extracting, not converting the actual value Yes, and I've also found that, with Sqlite at least, web2py doesn't carry out datetime arithmetic correctly within the DAL

Re: [web2py] Re: Fake_migrate with auth

2012-03-27 Thread Bruce Wade
Yes I think you are probably right. It is a shame that we can use auth for this kind of situation. On Tue, Mar 27, 2012 at 11:34 AM, Richard Vézina ml.richard.vez...@gmail.com wrote: I think the best way to avoid this is to define custom auth tables and then set them to migrate=false.

[web2py] unable to parse csv file 'NoneType' object is unsubscriptable with list:reference type field

2012-03-27 Thread Richard Vézina
Hello, Is it possible the table csv import method be broken? When I use list:reference type field I can't import back a exported CSV with the appadmin. I don't understand where the None value could come from... When I try to implement my own csv import function base on this thread :

Re: [web2py] unable to parse csv file 'NoneType' object is unsubscriptable with list:reference type field

2012-03-27 Thread Richard
Seems related : https://groups.google.com/forum/#!topic/web2py/nYKsFPumXk0 Le mardi 27 mars 2012 15:20:27 UTC-4, Richard a écrit : Hello, Is it possible the table csv import method be broken? When I use list:reference type field I can't import back a exported CSV with the appadmin. I

Re: [web2py] unable to parse csv file 'NoneType' object is unsubscriptable with list:reference type field

2012-03-27 Thread Richard
This one to : https://groups.google.com/forum/?fromgroups#!topic/web2py/H_QqV2g8IgQ I experimented the problem with 1.99.4 and 1.99.7 What I understand so far is that id_map get None by default, so when it get here : [id_map[ref_table][int(v)] \ for v in

[web2py] pop-up verification

2012-03-27 Thread Larry G. Wapnitsky
Last question of the day, I promise... So, I have data that exists in my database. If a user enters a value that already exists, I want to prompt them with an are you sure? type question before the function that adds/updates the data continues. How do I interrupt my current function to do

[web2py] Re: Issue Tracking System Survey

2012-03-27 Thread Bill Thayer
Where is the issue tracking system in case I need to log an issue? On Tuesday, October 4, 2011 1:29:52 PM UTC-5, petrasadi wrote: I am currently working on a project meant to improve the current Web2Py Issue Tracking System. Are there any features that could use touch-ups or new features

Re: [web2py] pop-up verification

2012-03-27 Thread Richard Vézina
I think you will have to write a ajax call back to the database that will look if the data already existing if so trigger your message if not let it go. There is the validators but they will not let pass the duplicated data if you have set your field to unique. Richard On Tue, Mar 27, 2012 at

[web2py] Re: Broken application after upgrade.

2012-03-27 Thread web-dev-m
No, After much trying to no avail these are the symptoms: All Controllers, Views, Tables show up in AppAdmin. No ability to administrate the DB from AppAdmin. No ability to connect to any application while the affected application is installed. I think somehow my database might have been

[web2py] Re: Issue Tracking System Survey

2012-03-27 Thread Anthony
On Tuesday, March 27, 2012 4:18:33 PM UTC-4, Bill Thayer wrote: Where is the issue tracking system in case I need to log an issue? http://code.google.com/p/web2py/issues/list

[web2py] New Google Groups functionality

2012-03-27 Thread Anthony
Google Groups has added some new functionality that enables us to distinguish between discussion, question, and announcement posts. If you use the (new) web interface to make a post (https://groups.google.com/forum/?fromgroups#!forum/web2py), it will now default to a question post. However,

[web2py] Re: New Google Groups functionality

2012-03-27 Thread Anthony
Also, in the web interface, you will notice an icon immediately to the left of the thread title indicating whether it is a discussion, question, or announcement. On Tuesday, March 27, 2012 4:50:49 PM UTC-4, Anthony wrote: Google Groups has added some new functionality that enables us to

[web2py] Re: Question about 0.py

2012-03-27 Thread Mike
I just started a brand-new app through the wizard and plugged in my mysql database settings during the setup process. I see that in 0.py I have the following : settings.database_uri = 'mysql://user:pass@server/database' (i censored the original) but in db.py it says: if not

Re: [web2py] unable to parse csv file 'NoneType' object is unsubscriptable with list:reference type field

2012-03-27 Thread Richard Vézina
Same thing with trunk... Richard On Tue, Mar 27, 2012 at 3:52 PM, Richard ml.richard.vez...@gmail.comwrote: This one to : https://groups.google.com/forum/?fromgroups#!topic/web2py/H_QqV2g8IgQ I experimented the problem with 1.99.4 and 1.99.7 What I understand so far is that id_map get

[web2py] LinkedIn Integration - Tutorial needed

2012-03-27 Thread Udi Milo
Hi, For a while now I've been trying to get the linkedIn module to work as described in the book and in different posts around the web, without success. Can someone who has done it please describe how this can be achieved? Thanks!

[web2py] skeleton.css pre resetting possible css mistake

2012-03-27 Thread jep
With web2py 1.99.7 i try to display preformatted code between pre /pre but the result does not look like preformatted text should look like. . In skeleton.css on line 28 i found that pre is being reset to default (inherit) font, I think this might be the cause. After I removed pre

[web2py] Form validation on passwords

2012-03-27 Thread cyan
Hi group, How do I enforce some simple validation for passwords matching on a form in a controller? All I want to do is to check the second password is the same as the first one, and here is some code I've come up so far: form = SQLFORM.factory( Field('email', requires=IS_NOT_EMPTY()),

[web2py] Re: New Google Groups functionality

2012-03-27 Thread Anthony
One more thing -- on the far right of the post editing menu is a { } icon that allows you to format text as code. For example: def index(): return dict(message='Hello World') Anthony On Tuesday, March 27, 2012 4:53:01 PM UTC-4, Anthony wrote: Also, in the web interface, you will notice

[web2py] Re: Form validation on passwords

2012-03-27 Thread Anthony
Here's how auth.register() does it (slightly edited): requires=IS_EXPR('value==%s' % repr(request.vars.get('password', None)), error_message=Password fields don't match) Anthony On Tuesday, March 27, 2012 5:40:29 PM UTC-4, cyan wrote: Hi group, How do I enforce some simple

[web2py] Re: Broken application after upgrade.

2012-03-27 Thread pbreit
It's weird that one app would affect other apps since usually they are pretty insulated from each other. Deleting .table files can be a problem. Was the app under development and you wouldn't care if you erased the DB? If so (and it's SQLite), you can delete all the files in the database

[web2py] Re: pop-up verification

2012-03-27 Thread pbreit
I have a Jquery dialog on one of my pages that I think does something similar. So when the user clicks list, the dialog pops up and then when they press Ok it sets the window.location to a new URL. But I'm guessin you probably need to do a POST which I'm not quite sure how that would work. a

Re: [web2py] Re: New Google Groups functionality

2012-03-27 Thread Bruno Rocha
is there some markup for doing that on emails? On Tue, Mar 27, 2012 at 6:42 PM, Anthony abasta...@gmail.com wrote: One more thing -- on the far right of the post editing menu is a { } icon that allows you to format text as code. For example: def index(): return dict(message='Hello

[web2py] Re: difference between script src= ... and response.files.append(...)

2012-03-27 Thread pbreit
I'm a little confused. Here's what the most recent code looks like: === web2py_ajax.html === script type=text/javascript!-- // These variables are used by the web2py_ajax_init function in web2py_ajax.js (which is loaded below). var w2p_ajax_confirm_message = {{=T('Are you sure you want

Re: [web2py] Re: New Google Groups functionality

2012-03-27 Thread Anthony
On Tuesday, March 27, 2012 6:06:17 PM UTC-4, rochacbruno wrote: is there some markup for doing that on emails? I don't know -- I just discovered this and enabled it in the web interface -- not sure what can be done via email. Anthony

[web2py] Re: difference between script src= ... and response.files.append(...)

2012-03-27 Thread Anthony
What is confusing? On Tuesday, March 27, 2012 6:09:48 PM UTC-4, pbreit wrote: I'm a little confused. Here's what the most recent code looks like: === web2py_ajax.html === script type=text/javascript!-- // These variables are used by the web2py_ajax_init function in web2py_ajax.js

Re: [web2py] Re: problem with encoding in javascript from the server

2012-03-27 Thread Miguel Lopes
Find it. titles = '+titles.replace('|', ',')+' with: SCRIPT( ... jQuery.prettyPhoto.open(**images=%(images)s,titles=[%(** titles)s]);}) % dict(images=images, titles=titles), _language='javascript') works! Tested on Firefox and Safari. Though I've failed to find any references on this (there

[web2py] Re: how to get logout() to launch an ajax call

2012-03-27 Thread weheh
I think I want a logout_bare() function so that I can logout via an ajax call without going through some contortions to avoid auth.logout()'s redirect. To be more specific, I want a link that says logout. When clicked, it logs me out and executes an ajax callback rather than a redirect.

[web2py] Re: Validating Registration fields

2012-03-27 Thread Peter G.
Thanks for the code snippets Anthony--but a minor caveat I didn't realize ahead of time is that the user is free to either upload an image or not. If the user does not upload an image, the IS_IMAGE() validators barks at the user. Is there a easy way of implementing such a logic: if a file is

[web2py] Re: web2py 1.99.7 is OUT

2012-03-27 Thread IVINH
This OK. Thanks. Vào 21:12:40 UTC+7 Thứ ba, ngày 27 tháng ba năm 2012, Massimo Di Pierro đã viết: Have you checked trunk or the nightly built. I believe this was fixed? On Tuesday, 27 March 2012 03:56:35 UTC-5, IVINH wrote: In my app, LOAD not work fine with 1.99.7, i'm try a test: 1.

[web2py] Re: difference between script src= ... and response.files.append(...)

2012-03-27 Thread weheh
Yay, Anthony! You 'da man. It works now. Phew. But truth be known, I don't exactly know what was going on here or what changes made the difference. I made the URL change you suggested -- it was some ancient code I had written years ago that I had developed a blindness towards 'cause it seemed

[web2py] Re: Validating Registration fields

2012-03-27 Thread Anthony
Try IS_EMPTY_OR(IS_IMAGE()) Anthony On Tuesday, March 27, 2012 7:12:45 PM UTC-4, Peter G. wrote: Thanks for the code snippets Anthony--but a minor caveat I didn't realize ahead of time is that the user is free to either upload an image or not. If the user does not upload an image, the

[web2py] Re: Fake_migrate with auth

2012-03-27 Thread Brian M
you can do auth.define_tables(fake_migrate = True) On Tuesday, March 27, 2012 12:27:21 PM UTC-5, Detectedstealth wrote: How do I do a fake_migrate with the auth table so I don't get the following error? I know the table exists already I just pushed some major changes to my server and now

[web2py] Re: how to get logout() to launch an ajax call

2012-03-27 Thread Anthony
On Tuesday, March 27, 2012 6:57:15 PM UTC-4, weheh wrote: I think I want a logout_bare() function so that I can logout via an ajax call without going through some contortions to avoid auth.logout()'s redirect. To be more specific, I want a link that says logout. When clicked, it logs me

  1   2   >