[web2py]

2012-07-05 Thread Jedrzej Nowak

Re: [web2py] Selecting one Option of presorted database entries

2012-07-05 Thread Johann Spies
On 2 July 2012 16:21, BlueShadow kevin.bet...@gmail.com wrote: Hi I got a table called Articles which contain the nuber of views and the date when they where written. I Sorted them in the default.py by the views and by the date. I Show them Sorted by Date on my index page. Now I like to add a

Re: [web2py] Re: Memory problems on Webfaction

2012-07-05 Thread Johann Spies
On 3 July 2012 18:01, Alec Taylor alec.tayl...@gmail.com wrote: Any ideas on how I should proceed? (Nothing is running on that port number) Thanks for all suggestions, If I remember correctly the support people from Webfaction helped me to identify the correct port number after my first

[web2py] auth exception with Version 2.0.0 (2012-07-04 23:30:47) dev

2012-07-05 Thread szimszon
Hi! I'm using ldap auth and after the web2py update I get: Traceback (most recent call last): File /home/PRIMERATE.LAN/gyszabolcs/fejlesztes/web2py/gluon/restricted.py, line 205, in restricted exec ccode in environment File

Re: [web2py] sqlform.grid properties

2012-07-05 Thread Johann Spies
On 4 July 2012 16:22, Ovidio Marinho ovidio...@gmail.com wrote: I'm need Translate Bottom submit in SQLFORM.grid, Nao estou achando esta propriedade. Somebody else on this list helped me and I used this code to change the text in that submit button: form.element('.web2py_table

[web2py] Re: Invalid circual reference

2012-07-05 Thread François Delpierre
I'll have a look to build the steps to reproduce the problem, however I wonder if the problem could not occur when I change the name (and type) of the first field of a table, that is 'name' by default.

[web2py] Re: {{=LOAD()}} and JavaScript function

2012-07-05 Thread Annet
Hi Anthony, Thanks for providing me with this solution. I used it in the timetable function as follows: In the function: tab='tab-' + str(weekday) In the view: div class=tab-content {{for i in xrange(1,8):}} {{this_tab = 'tab-%s' % i}} div class=tab-pane id={{=this_tab}} {{if

[web2py] html5 background video script

2012-07-05 Thread lucas
hello one and all, i am good with server-side processing. very new to client-side java script stuff. i think this idea requires that; please give me your best advice. client loads a page that contains html5 video. user hits play on one of the videos on the page and is watching it. what is

[web2py] When does translation take place.

2012-07-05 Thread Annet
Some of my menus are generated using tables containing fields being True of False. The problem is that the table fields are in English and the menu items should be translated. I wonder whether translation happens before any comparisons being made in a view or after. So, if I have T('Timetable)

[web2py] Re: Homemade Task Queues

2012-07-05 Thread mehta
Hi, Here when i run the above command , it says 'application could not be found'. But, i double checked , that folder is there and also it appears when I run the admin interface. Are there any naming conventions that for which I have to take care about? Thanks, Harsh Mehta On Saturday, 30

Re: [web2py] When does translation take place.

2012-07-05 Thread Jason Brower
Don't know all the details. But it's best to leave logical things outside of the translations. Otherwise you end up destroying your app when someone does the translation change. The translations can happen anywhere. They are executed as soon as you run them. So T('test') = test it is a

Re: [web2py] html5 background video script

2012-07-05 Thread Jason Brower
There are usually javascript plugins that you can have handle any function you like when the video ends... Never used this but a quick google lead me to here... http://jplayer.org/latest/developer-guide/#jPlayer-events Notice it has event handling for when the video has ended. BR, Jason On

[web2py] language selector in layout.html

2012-07-05 Thread Fernando J
How is set a language selector in layout.html in order to any user may select any language during his session? Thanks in advance Fernando J.

[web2py] Re: language selector in layout.html

2012-07-05 Thread Anthony
You could add a dropdown for language selection and when the user makes a selection, store the value in the session. Then use T.force('[language code]') in a model file to force translations to the particular language. If you want the selection to be remembered across sessions, you could set a

[web2py] Dict object has no attribute 'rstrip'

2012-07-05 Thread adohertyd
Me again! I don't know why I am getting this error. The process() function takes in a value session.term, processes it, and returns it as a dict type so that it can be mapped to URL's in the next function. The results() function sends the variable 'term' to 3 different API URL's which all

Re: [web2py] Dict object has no attribute 'rstrip'

2012-07-05 Thread Jonathan Lundell
On 5 Jul 2012, at 6:55 AM, adohertyd wrote: Me again! I don't know why I am getting this error. The process() function takes in a value session.term, processes it, and returns it as a dict type so that it can be mapped to URL's in the next function. The results() function sends the variable

[web2py] Re: When does translation take place.

2012-07-05 Thread Anthony
So, if I have T('Timetable) which I translate to Lesrooster, will I be able to compare it to a field called 'Timetable' in a view or has Timetable been translated to Lesrooster before. By default, T('Timetable') is a lazyT object, so isn't translated until necessary. It will be

Re: [web2py] Dict object has no attribute 'rstrip'

2012-07-05 Thread adohertyd
That's the thing, I don't know where it is being called or why! I haven't specified it, so I'm assuming it's coming from this block of code: import requests bing = https://api.datamarket.azure.com/Data.ashx/Bing/SearchWeb/Web?Query=%(term)s$top=50$format=json API_KEY= 'mykey'

Re: [web2py] Dict object has no attribute 'rstrip'

2012-07-05 Thread Jonathan Lundell
On 5 Jul 2012, at 7:19 AM, adohertyd wrote: That's the thing, I don't know where it is being called or why! I haven't specified it, so I'm assuming it's coming from this block of code: import requests bing =

[web2py] Alternative to Janrain: in pure Python

2012-07-05 Thread Alec Taylor
A rather good 64-line OAuth 2 client implementation for Python has been open-sourced. Source-code https://github.com/demianbrecht/sanction (announcementhttps://groups.google.com/forum/#%21topic/comp.lang.python/1axveCwPK4M ) This has been tested—and includes example code—with: - Facebook

[web2py] Re: Dict object has no attribute 'rstrip'

2012-07-05 Thread adohertyd
No that's not it either Jonathan. The problem I think is with the {'term' : urllib.quote(term)}. I think that because 'term' is a dict type, the urllib.quote is having issues with it. On Thursday, 5 July 2012 14:55:06 UTC+1, adohertyd wrote: Me again! I don't know why I am getting this error.

Re: [web2py] Re: Dict object has no attribute 'rstrip'

2012-07-05 Thread Jonathan Lundell
On 5 Jul 2012, at 7:47 AM, adohertyd wrote: No that's not it either Jonathan. The problem I think is with the {'term' : urllib.quote(term)}. I think that because 'term' is a dict type, the urllib.quote is having issues with it. That's what I mean. In the case of blekko and entireweb, you're

Re: [web2py] Re: Minimum memory requirements?

2012-07-05 Thread Alec Taylor
On Wed, Jul 4, 2012 at 2:27 AM, Vasile Ermicioi elff...@gmail.com wrote: 1) go to https://my.webfaction.com/applications and create an application, uwsgi for e.g. App category: custom App type: custom app (listening on a port) and once done you will see the port near app name (it is a

[web2py] Online debugger broken?

2012-07-05 Thread MJo
Using latest version https://github.com/web2py/web2py/commit/074b3de687ee65c2fc5bf87816d72cfd9fd96a10and while accessing http://127.0.0.1:8000/admin/debug/interact it gives invalid view (debug/interact.html). Is it me or just bug? (Never used this online debugger) BR, -- MJo

[web2py] Re: Web Development Introduction Based On Web2py

2012-07-05 Thread dave
the site is down Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, [no address given] and inform them of the time the error occurred, and anything you might have done that may

[web2py] MySQL migration fails adding unique

2012-07-05 Thread MichaelF
I have a working app using web2py `(1, 99, 7, datetime.datetime(2012, 3, 4, 22, 12, 8), 'stable'); Python 2.5.4: C:\Program Files (x86)\web2py\web2py_no_console.exe`) and MySQL 5.5. If I change one field to add `unique=True` the web2py migration fails with this error: `type

[web2py] MySQL migration fails adding unique=

2012-07-05 Thread MichaelF
I have a working app using web2py `(1, 99, 7, datetime.datetime(2012, 3, 4, 22, 12, 8), 'stable'); Python 2.5.4: C:\Program Files (x86)\web2py\web2py_no_console.exe`) and MySQL 5.5. If I change one field to add `unique=True` the web2py migration fails with this error: `type

Re: [web2py] Alternative to Janrain: in pure Python

2012-07-05 Thread Bruno Rocha
Thanks! I need to try it today! On Thu, Jul 5, 2012 at 11:42 AM, Alec Taylor alec.tayl...@gmail.com wrote: A rather good 64-line OAuth 2 client implementation for Python has been open-sourced. Source-code https://github.com/demianbrecht/sanction

Re: [web2py] Re: Dict object has no attribute 'rstrip'

2012-07-05 Thread adohertyd
Oh I see now. Ok tried to implement that still no joy. I'm trying a number of different things still no luck. It's just a matter of perseverance I think! On Thursday, 5 July 2012 15:49:50 UTC+1, Jonathan Lundell wrote: On 5 Jul 2012, at 7:47 AM, adohertyd wrote: No that's not it either

Re: [web2py] Re: Dict object has no attribute 'rstrip'

2012-07-05 Thread Jonathan Lundell
On 5 Jul 2012, at 8:04 AM, adohertyd wrote: Oh I see now. Ok tried to implement that still no joy. I'm trying a number of different things still no luck. It's just a matter of perseverance I think! Show your current code, please. On Thursday, 5 July 2012 15:49:50 UTC+1, Jonathan Lundell

[web2py] Re: {{=LOAD()}} and JavaScript function

2012-07-05 Thread Anthony
... because the tab variable provides me with the tab that should be loaded the first time the page displays. However, in the case your trying to help me solve, I don't know which one is the tab that should be loaded the first time the page displays, all I know is that it's the first tab.

Re: [web2py] Re: Working with custom form

2012-07-05 Thread Kenny Chung
When I used customform for login, it won't give me any errors to be shown whenever the password was invalid or email is not existing. I put it on jquery mobile website. Any idea? On Jul 4, 2012 4:25 PM, Anthony abasta...@gmail.com wrote: If you refuse to use web2py's css and js files, remember

Re: [web2py] Re: Minimum memory requirements?

2012-07-05 Thread Alec Taylor
Alright, fixed that last error, now it's just web2py (not uWSGI) giving me trouble: *** Operational MODE: async *** added /home/myusername/web2py/ to pythonpath. Traceback (most recent call last): File /home/myusername/web2py/wsgihandler.py, line 33, in module import gluon.main File

Re: [web2py] Re: Dict object has no attribute 'rstrip'

2012-07-05 Thread adohertyd
Ok, I've gotten around that little problem by doing the following: r = requests.get( https://api.datamarket.azure.com/Data.ashx/Bing/SearchWeb/Web?Query=%(term)s$top=50$format=json % __process(), auth=('', API_KEY)) It works for some reason! The problem now is outputting the json data but

Re: [web2py] Re: Working with custom form

2012-07-05 Thread Anthony
When I used customform for login, it won't give me any errors to be shown whenever the password was invalid or email is not existing. I put it on jquery mobile website. Any idea? Just to clarify, if you let web2py serialize the form widgets (i.e., using {{=form}} or

[web2py] Re: Saving an image from another database into your database

2012-07-05 Thread Massimo Di Pierro
I would do: def getImage(url,db): user_agent = 'Mozilla/4.0 (compatible; MSIE 5.5; Windows NT)' headers = {'User-Agent': user_agent} req = urllib2.Request(url,,headers) try: response = urllib2.urlopen(req) except urllib2.URLError, e: if hasattr(e,

[web2py] Re: MySQL migration fails adding unique

2012-07-05 Thread Massimo Di Pierro
web2py does not know how to migrate when you add a unique=True because existing data may break the contraint. You have some option: 1) if there is no data in db, comment the line in model (it will be dropped), then add it again with the unique constraint 2) if you have data, add the unique

Re: [web2py] Re: Thinking of building a bug tracker...

2012-07-05 Thread Richard Vézina
Hello, Here a patch for web2py_issuetracker... I didn't read the whole app, so I hope it still works as intended. # HG changeset patch # User Richard Vézina ml.richard.vez...@gmail.com # Date 1341502246 14400 # Node ID d4a6372008825fa571f3f7b021b3e79fab7e7df4 # Parent

Re: [web2py] Re: How to install web2py on webfaction

2012-07-05 Thread Prakhar Srivastava
thanks bro, with the help of this mail i install the web2py application but still not able to login ,i open one ticket for that issue so they reply me not open Parameters_80.py get the pwd but i'm able open this file and even i don't know where it is? please help bro On 5 July 2012 10:24, khuc

Re: [web2py] Re: Thinking of building a bug tracker...

2012-07-05 Thread Richard Vézina
Issue 3 http://code.google.com/p/web2py-issuetracker/issues/detail?id=3:App is broken Richard On Thu, Jul 5, 2012 at 11:38 AM, Richard Vézina ml.richard.vez...@gmail.com wrote: Hello, Here a patch for web2py_issuetracker... I didn't read the whole app, so I hope it still works as

Re: [web2py] Re: How to install web2py on webfaction

2012-07-05 Thread khuc viet Cuong
hi for webfaction, your web2py app is an application with a name,you can find out what name when check it in application menu, and the file Parameters_80.py (or *parameters_xyz.py* not sure what you got) is in web2py application folder, look like this: home/yourusername/webapps/web2py ---this

Re: [web2py] Re: How to install web2py on webfaction

2012-07-05 Thread Prakhar Srivastava
thanks bro for nice and quick reply i got that file but whatever pwd is written over there it also not working. On 5 July 2012 22:09, khuc viet Cuong hoatre2...@gmail.com wrote: On Fri, Jul 6, 2012 at 1:19 AM, khuc viet Cuong hoatre2...@gmail.comwrote: hi for webfaction, your web2py app is

[web2py] Re: Rocket server truncating long responses

2012-07-05 Thread nick name
On Tuesday, June 26, 2012 3:43:16 PM UTC-4, Massimo Di Pierro wrote: If you can reproduce. Chould you try wireshark to do a packet capture? I would like to see what is going on. Tim is a new dad and has not been responsive. I will try an attempt to fix this myself (although I cannot

Re: [web2py] Re: Web Development Introduction Based On Web2py

2012-07-05 Thread Richard Vézina
Still down! Richard On Thu, Jul 5, 2012 at 2:27 AM, dave arifu...@gmail.com wrote: the site is down Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, [no address given] and

Re: [web2py] DAL performance vs executesql

2012-07-05 Thread nick name
On Friday, June 22, 2012 11:37:10 AM UTC-4, Anthony wrote: Maybe it would be possible to convert the results of executesql() to a pseudo-Rows object (without all the processing of each individual field value) so it could be used with the grid, etc. The original ticket that prompted adding

[web2py] Re: Standalone DAL leaves mysql connections opened

2012-07-05 Thread nick name
On Thursday, June 28, 2012 10:47:15 AM UTC-4, Massimo Di Pierro wrote: why not simply? db.commit() db.close() if db in an on object attribute like self.db you can do if self.db: self.db.commit() self.db.close() self.db = 0 you can also do:

[web2py] Re: Audit for all tables, independent of CRUD; and transaction rollback.

2012-07-05 Thread nick name
On Wednesday, July 4, 2012 2:23:16 PM UTC-4, Massimo Di Pierro wrote: web2py has change since one year ago. Now you simply do: db.define_table('mytable',fields...,auth.signature) ... define more table ... auth.enable_record_versioning(db) and mytable will have a

[web2py] Re: MySQL migration fails adding unique=

2012-07-05 Thread Jim S
I believe that field level migrations do not work with MySQL. I get around this by removing the column, saving, run the app to force migration, and then add the field back the way I want it. I know this causes you to lose the data in that column, but I only do this in my test environment and

[web2py] Re: Saving an image from another database into your database

2012-07-05 Thread RCTYCO
Thank you for the quick response. I added the lines above : ( id = db.image.insert(url=url,image=db.image.image_upload.store(response,filename=url)) db.commit() ) It uploaded the information (url and renamed the file) but I don't believe it upload the image to the database. This is what

[web2py] Redirect not working can't find issue

2012-07-05 Thread adohertyd
I am trying to get a json response from 2 URL's and showing in on a results page. I'm getting an error saying that the page I'm redirecting to in order to show the json data is not defined but this only happens with one of the url's being contacted. I'm probably not being very clear with this

Re: [web2py] Redirect not working can't find issue

2012-07-05 Thread Richard Vézina
Maybe you should encode your bing url. Richard On Thu, Jul 5, 2012 at 4:05 PM, adohertyd adoher...@hotmail.com wrote: I am trying to get a json response from 2 URL's and showing in on a results page. I'm getting an error saying that the page I'm redirecting to in order to show the json data

Re: [web2py] Redirect not working can't find issue

2012-07-05 Thread adohertyd
No tried that and got 'unsupported format character 'A' at index 7' On Thursday, 5 July 2012 21:08:20 UTC+1, Richard wrote: Maybe you should encode your bing url. Richard On Thu, Jul 5, 2012 at 4:05 PM, adohertyd wrote: I am trying to get a json response from 2 URL's and showing in on a

Re: [web2py] Redirect not working can't find issue

2012-07-05 Thread Bruce Wade
I am assuming by your error inside results.html you have a variable defined as results however you are passing a tuple blekkoresults, bingresults we would need to see results.html On Thu, Jul 5, 2012 at 1:16 PM, adohertyd adoher...@hotmail.com wrote: No tried that and got 'unsupported format

Re: [web2py] Redirect not working can't find issue

2012-07-05 Thread adohertyd
This is my results.html, all of it :) {{extend 'layout.html'}} {{=results}} On Thursday, 5 July 2012 21:20:59 UTC+1, Bruce Wade wrote: I am assuming by your error inside results.html you have a variable defined as results however you are passing a tuple blekkoresults,bingresults we would

Re: [web2py] Redirect not working can't find issue

2012-07-05 Thread Bruce Wade
Ok exactly it is complaining that {{=results}} does not exist. Reneed to return dict(results=something) from your results action in your controller On Thu, Jul 5, 2012 at 1:23 PM, adohertyd adoher...@hotmail.com wrote: This is my results.html, all of it :) {{extend 'layout.html'}}

Re: [web2py] Redirect not working can't find issue

2012-07-05 Thread adohertyd
Thanks Bruce will try that. Why does 'return blekkoresults' work though? On Thursday, 5 July 2012 21:24:53 UTC+1, Bruce Wade wrote: Ok exactly it is complaining that {{=results}} does not exist. Reneed to return dict(results=something) from your results action in your controller On Thu,

Re: [web2py] Redirect not working can't find issue

2012-07-05 Thread Bruce Wade
It shouldn't look at your javascript console, if you are using ajax to call this. On Thu, Jul 5, 2012 at 1:30 PM, adohertyd adoher...@hotmail.com wrote: Thanks Bruce will try that. Why does 'return blekkoresults' work though? On Thursday, 5 July 2012 21:24:53 UTC+1, Bruce Wade wrote: Ok

Re: [web2py] Redirect not working can't find issue

2012-07-05 Thread adohertyd
Yeah it works now. Thanks very much Bruce much appreciated. Still have quite a bit to learn about all of this stuff. On Thursday, 5 July 2012 21:32:10 UTC+1, Bruce Wade wrote: It shouldn't look at your javascript console, if you are using ajax to call this. On Thu, Jul 5, 2012 at 1:30 PM,

Re: [web2py] Redirect not working can't find issue

2012-07-05 Thread Bruce Wade
No problem, I have ran into that problem when I was first learning :D On Thu, Jul 5, 2012 at 1:34 PM, adohertyd adoher...@hotmail.com wrote: Yeah it works now. Thanks very much Bruce much appreciated. Still have quite a bit to learn about all of this stuff. On Thursday, 5 July 2012 21:32:10

Re: [web2py] Redirect not working can't find issue

2012-07-05 Thread adohertyd
Bruce, One more thing, if I want to output the 2 sets of json data, how do I do it? return dict(results=bingresult...) I want to link the 3 results now On Thursday, 5 July 2012 21:35:44 UTC+1, Bruce Wade wrote: No problem, I have ran into that problem when I was first learning :D On Thu,

Re: [web2py] Redirect not working can't find issue

2012-07-05 Thread Bruce Wade
return dict(results_1=first_results, results_2=second_results, results_n=n_results) # You can have as many return values in the dictionary that you want. (Maybe there is a limit but I have no idea what it is) The dictionary names/keys can be whatever you want to call them. Then in your

[web2py] Best deployment scenario under Windows

2012-07-05 Thread Jim S
Hi I'm deploying my app in a Windows environment. To answer the first obvious questions, it's because I have to connect to an IBM AS/400 database and ODBC connection is really tough for me on Linux. So the question could be - How do I connect to DB2/400 from ubuntu, but I digress... I'd

Re: [web2py] Redirect not working can't find issue

2012-07-05 Thread adohertyd
Brilliant that has made life so much easier. Thanks again Bruce On Thursday, 5 July 2012 21:46:48 UTC+1, Bruce Wade wrote: return dict(results_1=first_results, results_2=second_results, results_n=n_results) # You can have as many return values in the dictionary that you want. (Maybe there

Re: [web2py] Best deployment scenario under Windows

2012-07-05 Thread Richard Vézina
I would not use Rocket for sure for kind of production app... Apache works fine to me until now, but I plan to migrate to nginx soon when I will find a good tutorial and when I get time :) Richard On Thu, Jul 5, 2012 at 4:48 PM, Jim S j...@qlf.com wrote: Hi I'm deploying my app in a Windows

[web2py] [Version 1.96.4] DAL timing issue.

2012-07-05 Thread Santiago
Hello, Do you know why the same query, takes more than 40 minutes to get resolved using DAL and less than a second using raw SQL ? This is the code using DAL db(db.voting_center).select() This is the code using raw SQL db.executesql('SELECT voting_center.id, voting_center.election,

Re: [web2py] [Version 1.96.4] DAL timing issue.

2012-07-05 Thread Richard Vézina
This is a old version, I would suggest to try you app under at least to 1.99.4 and see if it improves. Richard On Thu, Jul 5, 2012 at 5:08 PM, Santiago santiagogilab...@gmail.com wrote: Hello, Do you know why the same query, takes more than 40 minutes to get resolved using DAL and less than

Re: [web2py] [Version 1.96.4] DAL timing issue.

2012-07-05 Thread Richard Vézina
Also, your request should not be : db().select(db.voting_center) instead of db(db.voting_center).select() Richard On Thu, Jul 5, 2012 at 5:12 PM, Richard Vézina ml.richard.vez...@gmail.comwrote: This is a old version, I would suggest to try you app under at least to 1.99.4 and see if it

Re: [web2py] [Version 1.96.4] DAL timing issue.

2012-07-05 Thread Richard Vézina
Also, also, pbreit had recently put into light that selecting only the columns you need help to improve speed... db().select(db.table.field1, db.table.field2) # better than db().select(db.table.ALL) Richard On Thu, Jul 5, 2012 at 5:14 PM, Richard Vézina ml.richard.vez...@gmail.comwrote: Also,

[web2py] Re: [Version 1.96.4] DAL timing issue.

2012-07-05 Thread Anthony
After executing the query, the DAL processes the returned results in order to create a Rows object. That process takes longer the more fields and the more rows there are, but 40 minutes still sounds excessive for 66K rows. How long does it take if you do

Re: [web2py] Re: [Version 1.96.4] DAL timing issue.

2012-07-05 Thread Santiago Gilabert
db.executesql(db(db.voting_center)._select()) takes only a few seconds It has one virtual field, but it is lazy. I think it is not necessary, but I'm pasting the code below, is case you want to take a look. class VotingCenterVirtualField(object): def delete_results(self): def

[web2py] Updated deplopyment docs?

2012-07-05 Thread RKS
Are there any updated deployment docs available? At work we run web2py no problems but we have our own servers. At home, for all my testing sites, I use shared hosting. Below is some correspondence I've had today with my shared host: [After emailing them the link to the deployment recipes in

[web2py] Re: MySQL migration fails adding unique=

2012-07-05 Thread MichaelF
Thanks for that. I didn't realize field-level migrations don't work with MySQL. I'm no expert on web2py migrations (or even web2py!); is it just with MySQL that it has these problems? I suppose I could do this as an alternative to what you suggested: In web2py add a new field with unique, then

Re: [web2py] [Version 1.96.4] DAL timing issue.

2012-07-05 Thread Anthony
Also, your request should not be : db().select(db.voting_center) instead of db(db.voting_center).select() If he wants to select all records and all fields, then db(db.voting_center).select() is the correct query. Anthony

[web2py] Re: Best practice using scheduler as a task queue?

2012-07-05 Thread nick name
This might have been solved in this week, but in case it wasn't: You're tackling a general database problem, not a specific task queue or web2py problem. So you need to solve it with the database: set up another table to refer to you the task table, such as:

Re: [web2py] Re: Thinking of building a bug tracker...

2012-07-05 Thread Derek
It's got a lot more issues than that. It's pretty unusable at the moment. After you get it working, then you have to assign projects to people via ID number, and vice versa. You have to edit the database to get all new people loaded into the system (ie - there is no custom admin module to

[web2py] Re: Updated deplopyment docs?

2012-07-05 Thread pbreit
Deploying any Python on shared hosting is difficult because Python is generally poorly supported in shared hosting environments. Does your host provide any information about deploying Python apps?

Re: [web2py] Re: Updated deplopyment docs?

2012-07-05 Thread Bruce Wade
You can install your own version of python in your home directory on most shared host environments then at that point it doesn't matter which python version they use. On Thu, Jul 5, 2012 at 4:00 PM, pbreit pbreitenb...@gmail.com wrote: Deploying any Python on shared hosting is difficult because

[web2py] Customizing Auth to work with legacy db app

2012-07-05 Thread Jerry
Hello, We have a legacy Cold Fusion app running off a MS SQL db server and plan to gradually move functionality from CF to web2py. Both systems will run concurrently, accessing the same db. Thanks to the web2py (awesome piece of software! thank you Massimo and the other contributors!) DAL, we

Re: [web2py] Customizing Auth to work with legacy db app

2012-07-05 Thread vinicius...@gmail.com
Hi Jerry. You can define a db object to connect just to your auth table on MS SQL. This way, you can customize Auth to your needs. Remember web2py, by default, store passwords crypted (see CRYPT validator). If it's not your scenario, you'll need to override this implementation. A few months

[web2py] Re: Rocket server truncating long responses

2012-07-05 Thread Massimo Di Pierro
I never actually saw that issue. I thought the official rocket repo was on launchpad. I was not aware it moved to github. Anyway, I have implemented your suggested correction (increased timeout and caching exception) Massimo On Thursday, 5 July 2012 12:49:48 UTC-5, nick name wrote: On

[web2py] Re: Standalone DAL leaves mysql connections opened

2012-07-05 Thread Massimo Di Pierro
Looks like I prematurely close the issue. There is now a db.close() in trunk. Please check it out. massimo On Thursday, 5 July 2012 13:05:47 UTC-5, nick name wrote: On Thursday, June 28, 2012 10:47:15 AM UTC-4, Massimo Di Pierro wrote: why not simply? db.commit() db.close() if db in an

[web2py] Re: Saving an image from another database into your database

2012-07-05 Thread Massimo Di Pierro
I did not know you were storing it in a blob. Try: def getImage(url,db): user_agent = 'Mozilla/4.0 (compatible; MSIE 5.5; Windows NT)' headers = {'User-Agent': user_agent} req = urllib2.Request(url,,headers) try: response = urllib2.urlopen(req) except

[web2py] Re: MySQL migration fails adding unique=

2012-07-05 Thread Massimo Di Pierro
It is not like that field level migrations do not work. They work if, for example you change a field type. They do not work it you change an attribute (unique, notnull). On Thursday, 5 July 2012 16:40:42 UTC-5, MichaelF wrote: Thanks for that. I didn't realize field-level migrations don't

[web2py] please help us test web2py

2012-07-05 Thread Massimo Di Pierro
There are many changes in DAL. If you use MySQL or MSSQL or PostgreSQL please help us check the new trunk did not break anything. We have salted password auth = Auth(...,salt=True). Check it out. We also have ability to deploy to openstack from admin. Thanks to all those who have and still

[web2py] Re: When does translation take place.

2012-07-05 Thread Annet
Thanks for your replies. ... and it will also be translated when you apply any operators, such as testing for equality, concatenation, length, etc. So, T('Timetable') == 'Timetable' will be False unless the translation language is English. I'll leave the fields and menu item names as they

Re: [web2py] Re: RFC: web2py-based workflow engine

2012-07-05 Thread Andrew
Hi Ross, How's the workflow engine going ? Regards Andrew W

[web2py] Re: Saving an image from another database into your database

2012-07-05 Thread RCTYCO
Thanks. I need to solve the problem of the file not been uploaded to the blob field. I believe i am doing it correctly. I defined the model db.define_table('image', Field('url','string'), Field('image_file','blob'),

[web2py] Re: Saving an image from another database into your database

2012-07-05 Thread RCTYCO
Do I have to do something like db.define_table('image', Field('url','string'), Field('image_file','blob'), Field('image_upload','upload',uploadfield= Field('image_file','blob')) Where i provided a filed in the uploadfield On Thursday, July 5,

[web2py] Re: {{=LOAD()}} and JavaScript function

2012-07-05 Thread Annet
Hi Anthony, I believe that's what my code does. This line: {{show_tab = this_tab if not show_tab else show_tab}} sets the value of show_tab to the first tab (if any) that gets written to the view. Is that not what you want? Yes, that's what I want, however, I also want the content of the