[web2py] about editing database

2012-10-21 Thread alazar baharu
On Friday, October 19, 2012 11:50:20 PM UTC-7, alazar baharu wrote: hello every on e am developing a simple office space management information system using web 2py and i get in trouble doing some tasks. i have a table called office where office information will be saved there including

[web2py] Re: Pre-Selected field in form brings the wrong format after pressing submit

2012-10-21 Thread jw
Ok... I found the mistake: db.answers.card_id.requires=IS_IN_DB(db(db.card.subject_id == subject_id),* 'card.id',*'card.question') On Monday, October 15, 2012 6:44:23 PM UTC+2, jw wrote: Some time ago, I had this problem:

[web2py] Twitter Boostrap Modal form containing SQLForm

2012-10-21 Thread c0nstin3
Hi, I'm trying to show show a modal window containing a SQLFORM. I'm using the standard twitter bootstap. If the SQLFORM passes the validation that everything is fine (form closes, processed OK, db updated etc). However, if validation fails then the modal window still closes. I have to re-open

[web2py] any web2py book?

2012-10-21 Thread Jscriptor09
Is there a good web2py book outhere (paer or electronics). I got the online manual but looking for something I can have a a ref with several good examples of building website from scratch. The online doc is a good starter, which I am using now to get up to speed thanks --

Re: [web2py] how to loop through tables with 1M records?

2012-10-21 Thread Niphlod
a subtle bug appearead on the last patch, please re-download scheduler.py, should all be ok right now (as of revision 1cc2decfddb4ec2b9a2cd8e098754504856f1990) On Sunday, October 21, 2012 4:10:07 AM UTC+2, Adi wrote: hmm... seems like we still have the same problem, unless i was supposed to

[web2py] Re: any web2py book?

2012-10-21 Thread John-Kim Murphy
You can try the web2py Application Development Cookbook: http://www.amazon.com/web2py-Application-Development-Cookbook-Martin/dp/1849515468 On Sunday, October 21, 2012 10:31:23 PM UTC+9, Jscriptor09 wrote: Is there a good web2py book outhere (paer or electronics). I got the online manual

[web2py] Re: any web2py book?

2012-10-21 Thread Massimo Di Pierro
You can also find sove videos on vimeo, for example: http://vimeo.com/7552289 http://vimeo.com/21364178 and some apps here: http://web2py.com/appliances On Sunday, 21 October 2012 10:00:27 UTC-5, John-Kim Murphy wrote: You can try the web2py Application Development Cookbook:

[web2py] outdated web2py plugin for jquery mobile

2012-10-21 Thread kirilisa
Hi, I'm new to web2py (and to python in fact) and was very excited about the ease of use that seemed evident in web2py for building my HTML5 app. As I had previously determined to use jQuery Mobile, I was even more excited to see that there was a plugin for that. However, downloading the

[web2py] Re: outdated web2py plugin for jquery mobile

2012-10-21 Thread Massimo Di Pierro
Will do asap. The one that ships with admin is updated, the one on web2py.com/plugins is not. On Sunday, 21 October 2012 09:35:44 UTC-5, kirilisa wrote: Hi, I'm new to web2py (and to python in fact) and was very excited about the ease of use that seemed evident in web2py for building my

[web2py] web2py 2.2.1 is OUT

2012-10-21 Thread Massimo Di Pierro
- session.connect(cookie_key='secret', compression_level=9) stores sessions in cookies - T.is_writable = False prevents T from dynamically updating langauge files - all code is more PEP8 compliant - better custom_importer behaviour (now works per app, is smalled and

[web2py] Re: is it possible to run web2py parallel to php on apache port 80?

2012-10-21 Thread Don_X
Hello Simon, where does your localhost point to ?? ... does it point to the web2py directory ?? .. how did you configure your wsgi ? .. If you used the script that configures the www-data user group script under the home folder than you will be able to do the following to have php running in

[web2py] Re: web2py 2.2.1 is OUT

2012-10-21 Thread Massimo Di Pierro
P.S. Of course sessions in cookie are encrypted with AES and digitally signed with HMAC and optionally zipped with ZLIB. On Sunday, 21 October 2012 11:03:35 UTC-5, Massimo Di Pierro wrote: - session.connect(cookie_key='secret', compression_level=9) stores sessions in cookies -

Re: [web2py] Re: web2py 2.2.1 is OUT

2012-10-21 Thread Vasile Ermicioi
the problem with routes_apps_raw and unicode url not fixed :( --

[web2py] What's the default orderby, can I change it ?

2012-10-21 Thread apinho
Hi, I'm using this query : rows = db().select( mytable.ALL, orderby=mytablename+'.'+myfield+' '+myorder, limitby=(page*ITEMSPERPAGE-ITEMSPERPAGE,page*ITEMSPERPAGE) ) 'myorder' is either 'asc' or 'desc. 'mytable', 'myorderby' and 'myorder' ar all

[web2py] auth.wiki suggestion: Don't automatically display article title

2012-10-21 Thread HittingSmoke
Markmin includes the markup to display the title where you want it. I believe the title being automatically displayed should be removed so we can choose whether to include it using *#Markmin* or add a way to disable it, such as MediaWiki's __NOTITLE__ flag. --

[web2py] Re: What's the default orderby, can I change it ?

2012-10-21 Thread apinho
Ok, found the answer. By adding 'id' as an orderby field, the order of the rows if never changed, even if the original orderby field is not unique : rows = db().select( mytable.ALL, orderby=mytablename+'.'+myfield+' '+myorder+','+mytablename+ '.id',

Re: [web2py] how to loop through tables with 1M records?

2012-10-21 Thread Adnan Smajlovic
will do it right now :) On Sun, Oct 21, 2012 at 10:30 AM, Niphlod niph...@gmail.com wrote: a subtle bug appearead on the last patch, please re-download scheduler.py, should all be ok right now (as of revision 1cc2decfddb4ec2b9a2cd8e098754504856f1990) On Sunday, October 21, 2012 4:10:07 AM

Re: [web2py] Re: web2py 2.2.1 is OUT

2012-10-21 Thread Massimo Di Pierro
True. We are discussing on web2py_developers how that should work. On Sunday, 21 October 2012 11:50:19 UTC-5, Vasile Ermicioi wrote: the problem with routes_apps_raw and unicode url not fixed :( --

[web2py] Re: auth.wiki suggestion: Don't automatically display article title

2012-10-21 Thread Massimo Di Pierro
Please open a ticket with a request for enhancement. We can do this. On Sunday, 21 October 2012 12:44:48 UTC-5, HittingSmoke wrote: Markmin includes the markup to display the title where you want it. I believe the title being automatically displayed should be removed so we can choose

[web2py] Re: What's the default orderby, can I change it ?

2012-10-21 Thread Massimo Di Pierro
You should not do this: orderby=mytablename+'.'+myfield+' '+myorder+','+mytablename+'.id' You should instead use one of the following orderby=db.mytablename.myfield|db.mytablename.id orderby=~db.mytablename.myfield|db.mytablename.id orderby=db[mytablename][myfield]|db[mytablename].id

Re: [web2py] how to loop through tables with 1M records?

2012-10-21 Thread Adnan Smajlovic
Confirming that it works PERFECT :) handling all three queues (groups) concurrently as it should. now loading first 600k tasks to see if it will degrade performance, and if ok, then couple more around 2-3M each... Niphlod and Massimo, thank you! When did you plan to include new scheduler into

Re: [web2py] how to loop through tables with 1M records?

2012-10-21 Thread Massimo Di Pierro
It is already in web2py 2.2.1 ;-) On Sunday, 21 October 2012 14:06:53 UTC-5, Adi wrote: Confirming that it works PERFECT :) handling all three queues (groups) concurrently as it should. now loading first 600k tasks to see if it will degrade performance, and if ok, then couple more

[web2py] Re: What's the default orderby, can I change it ?

2012-10-21 Thread apinho
That code doesn't work for me, I get :type 'exceptions.KeyError' 'mytablename' 'mytablename', 'myfield' are string vars. I don't really have a table called 'mytablename'. On Sunday, October 21, 2012 7:39:50 PM UTC+1, Massimo Di Pierro wrote: You should not do this:

[web2py] Use a view function, inside another function...

2012-10-21 Thread apinho
Hi, I try to use functions inside my views. Helps keeping things more concise. I found that functions inside function doesn'twork. Something like : {{def icon(icon):}} {{=IMG(_src=ICONSPATH+icon,_alt=icon)}} {{return}} {{def icon_link(icon,url):}} {{=A(icon(icon),_href=url))}}

[web2py] scheduler and datetime

2012-10-21 Thread Martin Weissenboeck
I get this error message: Traceback (most recent call last): File /users/www-data/web2py/gluon/scheduler.py, line 232, in executor result = dumps(_function(*args, **vars)) File applications/secure/models/schedule.py, line 742, in redirect_email

[web2py] Re: Where does auth.wiki save pages to?

2012-10-21 Thread Bill Thayer
When you say listing pages created by auth.wiki I take that to mean a listing to display within the web browser. On mine I do have my index() controller return auth.wiki and as long as I am logged into my application I see an option under the [wiki] menu that says manage pages. On Friday,

[web2py] Re: scheduler and datetime

2012-10-21 Thread Niphlod
Without code to reproduce it's hard to give you any clue on how to fix thisWhat is the web2py version? Can we see the function ? Seems that the result of the function is calling scheduler code againcan you tell us more about what are you trying to do ? are you doing in some places in

Re: [web2py] Use a view function, inside another function...

2012-10-21 Thread Niphlod
moreover, if you use that functions all over your views, better define them in models or in modules. On Sunday, October 21, 2012 11:27:03 PM UTC+2, rochacbruno wrote: Not in that way, but you can try {{ def icon(icon): return IMG(_src=ICONSPATH+icon,_alt=icon) pass }} {{def

[web2py] Re: Where does auth.wiki save pages to?

2012-10-21 Thread HittingSmoke
No no. I mean listing wiki articles for users to browse, like a CMS front page. For example, I might want my front page to list articles with previews for certain tags. For that I need to know what db table the wiki info is saved to. It's not displayed by default in the appadmin database

[web2py] Re: auth.wiki search is case sensitive, only works with all lower-case?

2012-10-21 Thread villas
How about retain everything lowercase in the DB but simply display with .title()? I guess that would fix most situations apart from acronyms e.g. DBMS Dbms, or other mixed-case. But at least it would look much better and be very easy to implement. I was wondering about styling the tags DIV.

[web2py] Multiprocessing in a controller ?

2012-10-21 Thread Tim Richardson
Imagine I have a controller that uses multiprocessing to run something in a different process, and then I want an ajax function that updates the form communicating with the background job with a multiprocessing.Manager() . I need to keep track of my manager per session. This is not going to work

[web2py] Re: What's the default orderby, can I change it ?

2012-10-21 Thread villas
Then use your string vars like this: db[mytablename][myfield] On Sunday, October 21, 2012 10:01:10 PM UTC+1, apinho wrote: That code doesn't work for me, I get :type 'exceptions.KeyError' 'mytablename' 'mytablename', 'myfield' are string vars. I don't really have a table called

Re: [web2py] Re: web2py 2.2.1 is OUT

2012-10-21 Thread Vasile Ermicioi
and when it will be fixed? 2.2.1 is not backward compatible, what works with 1.99.4 doesn't work with 2.2.1 On Sun, Oct 21, 2012 at 9:36 PM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: True. We are discussing on web2py_developers how that should work. On Sunday, 21 October 2012

Re: [web2py] Re: web2py 2.2.1 is OUT

2012-10-21 Thread Vasile Ermicioi
PS: I need backward compatibility for old projects, and I proposed to enable unicode urls by default for new projects --

Re: [web2py] Use a view function, inside another function...

2012-10-21 Thread apinho
Valeu Bruno ! Thank you On Sunday, October 21, 2012 10:27:03 PM UTC+1, rochacbruno wrote: Not in that way, but you can try {{ def icon(icon): return IMG(_src=ICONSPATH+icon,_alt=icon) pass }} {{def icon_link(icon,url):}} {{=A(icon(icon),_href=url))}} {{return}}

[web2py] Re: about constraints on fields of table

2012-10-21 Thread villas
Agree with what you say, but just an extra comment about this... and must be parsed externally to return a timedelta yes, this is why time on its own is useless because you always have to combine it back with a date to do anything with calculations. On Saturday, October 20, 2012 10:09:36

[web2py] Re: Where does auth.wiki save pages to?

2012-10-21 Thread Bill Thayer
Ok, Actually i am just getting there myself on my application. There is a cloud() function and a search() function inside gluon.tools so chances are writing a pre-defined search might get you 3/4 the way there. Wish I had a better strategy to give to you. Regards, Bill On Sunday, October 21,

[web2py] Re: Twitter Boostrap Modal form containing SQLForm

2012-10-21 Thread villas
I think this is such common requirement, but took me a long time to get working because the libraries were not always correct/compatible which was very confusing for me. I originally found some code which I adapted and added a simple spam test, but I wouldn't really use that technique on a

[web2py] Re: Where does auth.wiki save pages to?

2012-10-21 Thread HittingSmoke
I was thinking more like a db call that would display previews of the ten most recently submitted articles. Sorted by db.wiki_page.created_on On Sunday, October 21, 2012 4:06:26 PM UTC-7, Bill Thayer wrote: Ok, Actually i am just getting there myself on my application. There is a cloud()

[web2py] nginx+uwsgi and ubuntu 12.10

2012-10-21 Thread Marco Túlio Cícero de M . Porto
Was there any changes on newest release of Ubuntu that would explain uwsgi stop working ? (using latest web2py and nginx+uwsgi script - 2.2.1 Stable) Just wondering... -- []'s Marco Tulio --

[web2py] apache2 vs nginx

2012-10-21 Thread Marco Túlio Cícero de M . Porto
Once again, the question: wich one should give better results (performance wise)... Also, taking into consideration, Apache2+mod_pagespeed vs Nginx ... Hoping to hear your insights about this issue. Cheers! -- []'s Marco Tulio --

Re: [web2py] nginx+uwsgi and ubuntu 12.10

2012-10-21 Thread Bruno Rocha
I installed today a new webserver on Linode using Ubuntu 12.04. I used the scripts/setup-ubuntu-nginx and it works very well, I included some changes on wsgi config file as you can see here: https://github.com/web2py/web2py/pull/35 But, if this stopped working for you, you can try to remove

Re: [web2py] nginx+uwsgi and ubuntu 12.10

2012-10-21 Thread Marco Túlio Cícero de M . Porto
it worked well on 12.04. Stopped working on 12.10. Still trying to figure it out... 2012/10/21 Bruno Rocha rochacbr...@gmail.com I installed today a new webserver on Linode using Ubuntu 12.04. I used the scripts/setup-ubuntu-nginx and it works very well, I included some changes on wsgi

[web2py] web2py 2.1.1 web2py-component-flash breaks backward compatibility

2012-10-21 Thread weheh
There appears to be some new code in gluon/main.py to handle component flash. # @line 564 in gluon/main.py if response.flash: http_response.headers['web2py-component-flash'] = urllib2.quote( xmlescape(response.flash).replace('\n','')) Problem with this is that urllib2.quote() is putting

[web2py] Rendering to SVG...

2012-10-21 Thread Jason Brower
Had a fun idea. I would create pdf templates in svg format using inkscape and it's magic. Then when the template is rendered using the render() method, I would using inscape from command line to convert the page to PDF. Fun right? Any problems you see in this? BR, Jason Brower --