[web2py] job

2010-09-16 Thread mdipierro
http://www.elance.com/jobs/small_datadriven_website_in_web2py_python/python_jquery/21238402

[web2py] Re: Recent changes to rewrite.py break threaded environments

2010-09-16 Thread mdipierro
Jonathan, I misunderstood your problem. You should not spawn threads from a web2py app. This is not just because the current routing mechanism does not support it. This is a very general with all web applications because threads are managed by the web server which starts/stops and kills them. If y

[web2py] Redirect after login

2010-09-16 Thread b vivek
Hi! This might seem silly, but here it goes.I was making a sort of blogging app. where ass of now after login/logout a person is redirected to the home page, using this:- auth.settings.login_next=URL('homepage') auth.settings.logout_next=URL('homepage') Instead of this, I want him to be redirected

[web2py] Re: newbie, import csv table file

2010-09-16 Thread Markandeya
Many thanks. Such a quick a helpful response and much needed. I can't get it to work yet, keep getting an error, but am trying to debug it. (no group for a nontype). Thanks again. Markandeya

Re: [web2py] Re: links to plugins ,slices etc

2010-09-16 Thread b vivek
Oh thanks Massimo! On Fri, Sep 17, 2010 at 8:58 AM, mdipierro wrote: > there is link from the book page. Many of the plugins are obsolete > since they are incorporated in plugin_wiki (chapter 13 of the book) > > On Sep 16, 9:32 pm, b vivek wrote: > > Hii! I just came across this and found some

[web2py] Re: links to plugins ,slices etc

2010-09-16 Thread mdipierro
there is link from the book page. Many of the plugins are obsolete since they are incorporated in plugin_wiki (chapter 13 of the book) On Sep 16, 9:32 pm, b vivek wrote: > Hii! I just came across this and found some wonderful plugins > herehttp://web2py.com/plugins/default/comments like the com

[web2py] Re: addClass to an item with ajax

2010-09-16 Thread mdipierro
the callback function can do response.js="alert('hello');" On Sep 16, 4:33 pm, Manu wrote: > Hi, >   Instead of changing the value of a field i would like to dynamically > add a class to an item from an ajax request if the request succeeded. > Is it possible to that with the ajax function provid

[web2py] links to plugins ,slices etc

2010-09-16 Thread b vivek
Hii! I just came across this and found some wonderful plugins here http://web2py.com/plugins/default/comments like the comments plugin.. I wonder why is there no link from the main site http://web2py.com to these pages. It would be really helpful if these links were there on ha main page too, part

Re: [web2py] Why the pattern return dict(form=form)?

2010-09-16 Thread Jonathan Lundell
On Sep 16, 2010, at 6:41 PM, Bruno Rocha wrote: > In Python the constructor dict() creates a dictionary, so doing > dict(name='Tom') will create a dictionary and > is the same as doing > {'name':'Tom'} > The key here, Tom, is that dict() is a function call, and in dict(name="tom"), we're looki

Re: [web2py] Why the pattern return dict(form=form)?

2010-09-16 Thread b vivek
Thanks for that explanation Bruno! On Fri, Sep 17, 2010 at 7:11 AM, Bruno Rocha wrote: > Hi Tom > > The views in web2py should receive an serializable object to render it > properly and "transform" in to html or something else (it is a very > simplified explanation) > > You could return any seri

Re: [web2py] Why the pattern return dict(form=form)?

2010-09-16 Thread Bruno Rocha
Hi Tom The views in web2py should receive an serializable object to render it properly and "transform" in to html or something else (it is a very simplified explanation) You could return any serializable form the controller to the view: return 'Hello World' return ['1','2','3','four'] return {'f

[web2py] Why the pattern return dict(form=form)?

2010-09-16 Thread Tom Campbell
New to Python & web2py. Searched for but could not find an explanation of why so much code looks like: return(form=form) What makes the assignment necessary?

[web2py] Interesting Python(ish) to Javascript

2010-09-16 Thread mikech
http://jashkenas.github.com/coffee-script/#top

[web2py] Re: Routes.py on GAE

2010-09-16 Thread howesc
i have no idea myself, and got it working and so that's what i use. if i ever try and run multiple web2py apps on the same app engine application i'll want to figure it out so that i can have different favicons for each. cfh On Sep 15, 4:57 pm, Michael Ellis wrote: > I'm guessing that GAE decide

[web2py] addClass to an item with ajax

2010-09-16 Thread Manu
Hi, Instead of changing the value of a field i would like to dynamically add a class to an item from an ajax request if the request succeeded. Is it possible to that with the ajax function provided by the web2py framework. It seems that we can only specify a target and not a function to call ? Ho

[web2py] Re: Simple search form

2010-09-16 Thread elfuego1
OK. Both parts are there in the view. The input fields are not evaluated against Database though. Even if I enter numbers that are there in DB, form responses with: "There are no matching records in Database." If the numbers are matching they should be displayed in the result part of the search pa

[web2py] Re: Simple search form

2010-09-16 Thread elfuego1
OK. Both parts are there in the view as you described. The input fields are not evaluated against Database though. Even if I enter numbers that are there in DB, form responses with: "There are no matching records in Database." plus: "nothing to see here" below the search form. If the numbers are

[web2py] Re: Simple search form

2010-09-16 Thread mdipierro
somewhere you still have in it {{=SQLTABLE(items,headers="fieldname:capitalize")}} which as we said only works {{if items:}} Please remove everything from the view. You should just have {{extend 'layout.html'}} {{=form}} {{=SQLTABLE(items,headers="fieldname:capitalize") if items else "nothing t

[web2py] Re: Simple search form

2010-09-16 Thread elfuego1
OK. Both parts are there in the view. Now, when I go from index.html to search.html I get an error: Traceback (most recent call last): File "gluon/restricted.py", line 188, in restricted File "F:\Programy\web2py\applications\myapp/views\default/ search.html", line 88, in File "gluon/sqlhtm

[web2py] Re: Simple search form

2010-09-16 Thread elfuego1
OK. Both parts are there. The input fields are not evaluated against Database. Even if I enter numbers that are there in DB form responses with: "There are no matching records in Database." If the numbers are matching they should be displayed in the result part of the search page. I tried somethi

Re: [web2py] Re: Recent changes to rewrite.py break threaded environments

2010-09-16 Thread Jonathan Lundell
On Sep 16, 2010, at 1:04 PM, mdipierro wrote: > > I believe this was fixed. try 1.85.2 posted yesterday Perhaps, but it might be a case we haven't considered. Jonathan, if 1.85.2 does not fix the problem, I can suggest two alternatives. If you are *not* using application-specific routing, call

[web2py] Re: Recent changes to rewrite.py break threaded environments

2010-09-16 Thread mdipierro
I believe this was fixed. try 1.85.2 posted yesterday On Sep 16, 2:26 pm, "Jonathan Z." wrote: > I'm kicking off a threaded process.  As part of the "run" method, I'm > calling: env("application", import_models=True) in order to work with > the web2py environment inside the context of my thread.

[web2py] Recent changes to rewrite.py break threaded environments

2010-09-16 Thread Jonathan Z.
I'm kicking off a threaded process. As part of the "run" method, I'm calling: env("application", import_models=True) in order to work with the web2py environment inside the context of my thread. As a result, models are parsed and the following exception is raised: Traceback (most recent call las

[web2py] Re: Simple search form

2010-09-16 Thread mdipierro
You have a form: def search(): form=SQLFORM.factory(INPUT('no_1','integer'), <= line 57 INPUT('no_2','integer'), INPUT('no_3','integer'), INPUT('no_4','integer')) if form.accepts(request.vars,keepvalues=True): items=db(db.numbers.no_1.contains(form.vars.no_1)|\

[web2py] Re: Simple search form

2010-09-16 Thread elfuego1
I did as you told me. Now I don't have search form on my search page. What do you mean by saying: >>it is only producing "nothing to see here" because there is no data.<< There is data in DB waiting to be searched, but how am I supposed to do that now when there is no input fields on search page?!

Re: [web2py] Re: accepts [was: misunderstandings]

2010-09-16 Thread Jonathan Lundell
On Sep 16, 2010, at 10:51 AM, Michael Ellis wrote: > Thanks Massimo (and Jonathan), > > I think the complexity is not so much of a problem. As you noted, it works > very well. It's just that it does so much that a bit more explanation is > needed so new users can understand how it works. > >

Re: [web2py] Re: accepts [was: misunderstandings]

2010-09-16 Thread Michael Ellis
Thanks Massimo (and Jonathan), I think the complexity is not so much of a problem. As you noted, it works very well. It's just that it does so much that a bit more explanation is needed so new users can understand how it works. I'd be in favor of putting your detailed description (plus a bit o

Re: [web2py] accepts [was: misunderstandings]

2010-09-16 Thread Jonathan Lundell
On Sep 16, 2010, at 10:08 AM, Michael Ellis wrote: > Thanks, Jonathan. That's approximately what I had reasoned it must be doing, > but couldn't state as clearly as you have. > > So, if I'm now understanding it correctly, form.accepts() is roughly > equivalent to the following conditions: > >

[web2py] Re: accepts [was: misunderstandings]

2010-09-16 Thread mdipierro
assuming form=SQLFORM(db.table,record_id) form.accepts(request.vars,session,formname='xxx',hideerror=False,dbio=True) does the following 1) if not request.vars._formname=='xxx' then form is not being self submitted, generate a CSRF-prevention security key and store it in session, return False 2

Re: [web2py] Re: IS_NULL_OR(IS_IN_DB...

2010-09-16 Thread Richard Vézina
Hello Annet, Does zero=None works also for ".represent"?? Regards Richard On Wed, Sep 8, 2010 at 1:36 AM, annet wrote: > Are you sure this is syntactically correct. > > > db.table1.registry_id.requires = > > > IS_NULL_OR(IS_IN_DB(db,'ref_registry.registry_id',db.ref_registry._format)) > > In

Re: [web2py] accepts [was: misunderstandings]

2010-09-16 Thread Michael Ellis
Thanks, Jonathan. That's approximately what I had reasoned it must be doing, but couldn't state as clearly as you have. So, if I'm now understanding it correctly, form.accepts() is roughly equivalent to the following conditions: (request contains submitted form elements) and (form key matches) a

[web2py] Re: HTML5 Boilerplate

2010-09-16 Thread mdipierro
I think yes. On Sep 16, 11:54 am, Albert Abril wrote: > Just a question, the html code generated by (*)helpers.. is html5 > compatible? > Thanks in advance. > > (*)http://www.web2py.com/book/default/chapter/05#HTML-Helpers > > On Wed, Sep 15, 2010 at 9:42 PM, mdipierro wrote: > > Eventually we s

[web2py] Re: response.render

2010-09-16 Thread mdipierro
from gluon.template import render def index(): return render() look at the source code of that function it has lots of options. On Sep 16, 11:47 am, JC11 wrote: > Is it possible to call response.render(view, vars) in a controller, > but have the view not a file, but as a string ? > > Th

[web2py] Re: Can web2py connect to a FileMaker db

2010-09-16 Thread mdipierro
You can use but it is not a SQL database therefore it would work with DAL On Sep 16, 11:31 am, Andrew Evans wrote: > is it possible to have web2py use a FileMaker database? Can I use the > PyFilemaker module if no, I don't see why not but any suggestions before > hand would be great > > ty :-) >

Re: [web2py] Re: HTML5 Boilerplate

2010-09-16 Thread Albert Abril
Just a question, the html code generated by (*)helpers.. is html5 compatible? Thanks in advance. (*)http://www.web2py.com/book/default/chapter/05#HTML-Helpers On Wed, Sep 15, 2010 at 9:42 PM, mdipierro wrote: > Eventually we should consider moving welcome to html5 > > On Sep 15, 2:28 pm, Albert

[web2py] response.render

2010-09-16 Thread JC11
Is it possible to call response.render(view, vars) in a controller, but have the view not a file, but as a string ? The reason I want to do this is that I am getting the view from a database table and replacing bits of it with python code snippets {{some code}} which response.render will evaluate.

[web2py] Can web2py connect to a FileMaker db

2010-09-16 Thread Andrew Evans
is it possible to have web2py use a FileMaker database? Can I use the PyFilemaker module if no, I don't see why not but any suggestions before hand would be great ty :-) *cheers

[web2py] Re: Getting Data of uploaded File from DB & downloading text as file?

2010-09-16 Thread mdipierro
filename,stream=db.dogs.image.retrieve(doggies[0].image) data=stream.read() On Sep 16, 10:11 am, till wrote: > hi all, > > wondering how I can get the raw data of files uploaded into a db field > to work with it. > such as: > doggies = db().select(db.dogs.ALL) > doggies[0].image <- how can I acce

[web2py] Re: StackExchange for web2py community

2010-09-16 Thread mdipierro
I do not have a strong opinion but if people like it I do not oppose. I just hope that we do not scatter info over many pages. google groups has served us well but the search capability is not good. On Sep 16, 6:31 am, Narendran wrote: > Hello all, > I personally like stackoverflow's UI, as it al

[web2py] Getting Data of uploaded File from DB & downloading text as file?

2010-09-16 Thread till
hi all, wondering how I can get the raw data of files uploaded into a db field to work with it. such as: doggies = db().select(db.dogs.ALL) doggies[0].image <- how can I access the raw data of the img? also, if I have a text in the db, how can I allow the user to download a file with just the con

Re: [web2py] Re: adding a js file to an inherited template file

2010-09-16 Thread Manu
many thanks On Thu, Sep 16, 2010 at 1:50 PM, mdipierro wrote: > before {{extends...}} > > {{response.files.append(URL())}} > > On Sep 16, 4:31 am, Manu wrote: >> Hi , >>   I have a file body.html that extend layout.html , is it possible to >> add a new javascript reference inside the body.

[web2py] accepts [was: misunderstandings]

2010-09-16 Thread Jonathan Lundell
On Sep 16, 2010, at 7:26 AM, Michael Ellis wrote: > > I was never much bothered by either of those issues, but there is one > bit of 'magic' that did (and to some extent still does) confuse me. > I'm wondering if it might be worthwhile to give an detailed > explanation what goes on in form.accepts

[web2py] Re: StackExchange for web2py community

2010-09-16 Thread cjrh
On Sep 16, 1:31 pm, Narendran wrote: > What does the community > think of having a stackexchange page for web2py? Good idea. The StackOverflow model is the future of technical Q&A forums. I joined and added some good and bad questions.We need 59 more users to join in support.

[web2py] Re: misunderstandings

2010-09-16 Thread Michael Ellis
Thanks Massimo, the AlterEgo posting makes the case for exec and the capitalized helper class names clearly and persuasively! I agree with Anthony that it belongs in the book. I was never much bothered by either of those issues, but there is one bit of 'magic' that did (and to some extent still d

[web2py] Experimenting ListWidget

2010-09-16 Thread yamandu
I´ve just installed 1.85.2 and tried ListWidget, and verified that: -when I send the form if it backs to form again all fields in the list show the array from the entire field -if is there another listfield in the same form, only the first shows up correctly, the others seem to split the first elem

Re: [web2py] Re: misunderstandings

2010-09-16 Thread Michele Comitini
:-) those kind of optimizations like the exec one could eventually make sense on embedded. eventually one day when web2py will have to run on embedded we will take care of that :-) 2010/9/16 mdipierro : > I should also stress another major upside of exec. All the other > frameworks, Flask an

Re: [web2py] Re: How do I optimize cache expiration on GAE?

2010-09-16 Thread Michael Ellis
Hmmm, now I'm really confused. When I look at the response headers for the files I don't see any expiration dates, e.g. *static/base.css* has only the following Date: Thu, 16 Sep 2010 13:06:46 GMT ETag: "Eme4QA" Server: Google Frontend Whereas *jquery.min.js*, which is served from the Google CDN

Re: [web2py] Re: Deployment problem (apache2 mod_wsgi)

2010-09-16 Thread Johann Spies
On 14 September 2010 23:40, Graham Dumpleton wrote: > So long as Apache configured right, there are no problems hosting two > web applications like that under different sub URLs of the same site. > >> The reason is that the part after http:// (hostname) decides where to >> go. If you have exampl

[web2py] Re: plugin_rating problem

2010-09-16 Thread ceriox
i check the plugin table and i can see: plugin_rating_master.id plugin_rating_master.tablename plugin_rating_master.record_id plugin_rating_master.rating plugin_rating_master.counter 4 NoneNone4.0 1 for plugin_rating_master.tablename and plugin_rating_master.record_id the plugin

[web2py] Re: misunderstandings

2010-09-16 Thread mdipierro
I should also stress another major upside of exec. All the other frameworks, Flask and Django for example, do not do exec but reload modules when the file change. This allows to see changes in the code reflected immediately in the app and mimics the exec. First of all this works only when they run

[web2py] Re: misunderstandings

2010-09-16 Thread mdipierro
One downside of using exec is, theoretically, performance penalty since code has to be interpreted at every request. In practice we have not seen a measurable performance penalty because the time to interpret the code is less than the time to execute it. On Sep 16, 1:36 am, Anthony wrote: > Nice.

[web2py] Re: adding a js file to an inherited template file

2010-09-16 Thread mdipierro
before {{extends...}} {{response.files.append(URL())}} On Sep 16, 4:31 am, Manu wrote: > Hi , >   I have a file body.html that extend layout.html , is it possible to > add a new javascript reference inside the body.html ? > > Thx

[web2py] plugin_rating problem

2010-09-16 Thread ceriox
hi all i follow the example but i can't make it work ... i use: {{=crud.read(db.Libro,4)}} {{=plugin_rating('Libro',4)}} like example, the read show me my record details but plugin don't save the rating... i miss somethink?

[web2py] Re: working rating plugin example

2010-09-16 Thread ceriox
the first link work but he don't have "star" graphic the second link (i follow the guide and i make a new app for try it) don't work (i have the combo box but not the "star" icon) On 16 Set, 05:31, weheh wrote: > Check out these 2 links: > > http://www.web2py.com/book/default/chapter/10?search=v

[web2py] StackExchange for web2py community

2010-09-16 Thread Narendran
Hello all, I personally like stackoverflow's UI, as it almost always helps me find the answers for my doubts/questions with the least effort (with answer ranking, question suggestions, etc.). What does the community think of having a stackexchange page for web2py? I have created a proposal here. I

Re: [web2py] Re: plugin legacy mysql: generates web2py code to access your mysql legacy db

2010-09-16 Thread Johann Spies
How do I use this script? I gave a fairly complex and relatively large database (few hunderd thousand records) to try and use with web2py. When I run this script (the version that came with 1.85.2) I get: $ python extract_mysql_models.py user:pas...@kbase Traceback (most recent call last): Fi

[web2py] great tool wdt for linux users

2010-09-16 Thread Martin.Mulone
WDT - Web Developer Tools http://gnome-look.org/content/show.php/WDT+-+Web+Developer+Tools?content=129726

[web2py] Re: web2py 1.85.1 is OUT

2010-09-16 Thread Martin.Mulone
thanks mariano. On 16 sep, 01:16, Mariano Reingart wrote: > Bruno, I'm glad you liked PyFPDF, and thanks Massimo for this great > framework and his openess to accept contributions :-) > > In short, you can convert HTML to PDF (ie. reports and listing using > tables, images, lists), and you can us

[web2py] adding a js file to an inherited template file

2010-09-16 Thread Manu
Hi , I have a file body.html that extend layout.html , is it possible to add a new javascript reference inside the body.html ? Thx

[web2py] Re: working rating plugin example

2010-09-16 Thread ceriox
thanks for help :) now i need to make the avarage value for the vote i have a table id_user (who make the vote) id_book (the book) vote(from 1 to 5) i need the avarage vote of every book ... On 16 Set, 05:31, weheh wrote: > Check out these 2 links: > > http://www.web2py.com/book/default/c

[web2py] Re: misunderstandings

2010-09-16 Thread cjrh
On Sep 16, 7:11 am, mdipierro wrote: > http://web2py.com/AlterEgo/default/show/271 In general, the arguments put forward by critics of web2py are almost entirely vacuous. The most that can be said of them, I think, is that as criticism towards web2py increases, that can be taken as an indicatio