I thought of sharing this article:
http://blogs.forrester.com/appdev/2009/10/my-dream-stack-for-developing-web-applications.html
Joseph
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To post to
Hi Massimo,
I think the answers are (all) spot on. I will go for the "trick"
solution with the integer type instead of reference.
It is closest to what I had in mind. Not naturally a clean DB design,
but I can live with the missing "cascade on delete" in this
application scenario. So I am fione.
On Fri, Oct 9, 2009 at 2:32 AM, Markus Schmitz wrote:
>
> Hi Massimo,
>
> I think the answers are (all) spot on. I will go for the "trick"
> solution with the integer type instead of reference.
>
why??
If you use Massimo's 3 table layout, there is absolutely no need
>
> It is closest to wh
We could make the wiki even simpler...
1. Get rid of "comments" on each page. The wiki IS "comments" it doesn't
need additional comments!
2. Get rid of tags. Tags imply we know in advance what the structure of
the wiki is. We don't. Instead the structure should evolve dynamically
Do you mean that the ctrl+s is already implemented in current web2py
latest trunk?
But I tried in IE7, ctrl+s doesn't invoke any action. And I tried in
Chrome3, ctrl+s just invoke the browser's built-in "save current page
to local harddisk" feature.
Well, not a big deal. I am just curious to kno
exactly it suppose to use a relative path... from the library:
/*
* Thickbox 3.1 - One Box To Rule Them All.
* By Cody Lindley (http://www.codylindley.com)
* Copyright (c) 2007 cody lindley
* Licensed under the MIT License:
http://www.opensource.org/licenses/mit-license.php
*/
var tb_pat
+1
excellent suggestions Joe
you have obviously spent some time thinking about these things
On 9 oct, 03:22, Joe Barnhart wrote:
> We could make the wiki even simpler...
>
> 1. Get rid of "comments" on each page. The wiki IS "comments" it doesn't
> need additional comments!
>
> 2. Get
same problem for HTML file
Courses Aims
for those I can use URL or CSS files, but I am not so kind of modify 3th
party libraries ...
On Fri, Oct 9, 2009 at 10:03 AM, Sebastian E. Ovide <
sebastianov...@gmail.com> wrote:
> exactly it suppose to use a relative path... from
I have questions about SQLFORM onvalidate.
Before inserting a row I have to resize an image by PIL and push
b64encoded bytes on a blob field.
So I have defined onvalidate=DoSomething in SQLFORM.
DoSomething has form as input arg, resize image as thumbnails, encode
it and push in form.vars.myblob
(
Solved.
My error is a space between input and #mytable_myfield in css
definition.
The css approach is effective and elegant.
On 9 Ott, 08:50, Iceberg wrote:
> The "crazy" need not be that crazy. I normally do:
>
> db.Field('myfield','string',
> widget=lambda field,value,**kwargs:
> S
excuse me: onvalidation not onvalidate.
On 9 Ott, 14:20, leone wrote:
> I have questions about SQLFORM onvalidate.
> Before inserting a row I have to resize an image by PIL and push
> b64encoded bytes on a blob field.
> So I have defined onvalidate=DoSomething in SQLFORM.
> DoSomething has form
Something like this?
def page1():
form=SQLFORM.factory(Field('email',requires=IS_IN_DB
(db,'auth_user.email')))
if form.accepts(request.vars, session):
redirect(URL(r=request,f='page2',dict(em=form.vars.email))
return dict(form=form)
{{extend 'layout.html'}}{{=form}}
def p
I emailed him.
On Oct 9, 2:01 am, Joseph Jude wrote:
> I thought of sharing this
> article:http://blogs.forrester.com/appdev/2009/10/my-dream-stack-for-developi...
>
> Joseph
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Yes, that is less crazy but still requires removing a line from
web2py_ajax.html for me:
jQuery('input.string').attr('size',50);
I think Thadeus is correct and these should be set in base.css, not
through javascript.
On Oct 9, 1:50 am, Iceberg wrote:
> The "crazy" need not be that crazy. I n
I just wanted to throw out another update since I've received e-mails
from others who are/were interested in using web2py on Midphase. I
received an e-mail from one of the sales reps at Midphase asking what
they would need to change for Midphase to be considered a good option
for web2py hosting.
Solved:
if form.accepts(request.vars, session, keepvalues=True,
onvalidation=WriteThumb):
.
def WriteThumb(form):
i = cStringIO.StringIO()
o = cStringIO.StringIO()
i.write(form.vars.imgfile.value)
i.seek(0)
im = Image.open(i, 'r')
im.thumbnail((100,100),I
I forget:
from PIL import Image
On 9 Ott, 15:49, leone wrote:
> Solved:
>
> if form.accepts(request.vars, session, keepvalues=True,
> onvalidation=WriteThumb):
> .
>
> def WriteThumb(form):
> i = cStringIO.StringIO()
> o = cStringIO.StringIO()
> i.write(form.vars.im
On Oct 9, 9:27 am, Chris S wrote:
> I just wanted to throw out another update since I've received e-mails
> from others who are/were interested in using web2py on Midphase. I
> received an e-mail from one of the sales reps at Midphase asking what
> they would need to change for Midphase to be c
On Oct 9, 2009, at 1:22 AM, Joe Barnhart wrote:
> We could make the wiki even simpler...
>
> Get rid of "comments" on each page. The wiki IS "comments" it
> doesn't need additional comments!
>
> Get rid of tags. Tags imply we know in advance what the structure
> of the wiki is. We don't. I
Any reason not to place them under static?.
You don't seem to be using the template language.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To post to this group, send email to web2py@google
well... I'm still using URL probably in some future I could use
sessions...
just wondering how to save some seconds more... and make web2py even easier
adding more defaults...
On Fri, Oct 9, 2009 at 4:00 PM, DenesL wrote:
>
>
> Any reason not to place them under static?.
> You don't seem
When you apply @cache to an controller action, what is actually cached, is
it just the response from the function, or the generated html? or the
returned dict() ?
Is there a way to have web2py just cache the generated html and serve it
like it was a static html file, depending on the request.env.p
@cache.ram(...)
def index(): return dict(a=3)
caches the dict only
@cache.ram(...)
def index(): return response.render(a=3)
caches the html
On Oct 9, 11:00 am, Thadeus Burgess wrote:
> When you apply @cache to an controller action, what is actually cached, is
> it just the response from the
Hi,
When I execute the below code in GAE it throws an error: unsupported
operand type(s) for %: 'NoneType' and 'dict'. However this works ok in
a non-GAE environment. Any tips?
print db(db.paid_by.paid_by.lower()=='cash').select(db.paid_by.ALL)[0]
['id']
Basically what I have is the description
GAE does not support .lower()
sorry
On Oct 9, 12:31 pm, Joseph Jude wrote:
> Hi,
> When I execute the below code in GAE it throws an error: unsupported
> operand type(s) for %: 'NoneType' and 'dict'. However this works ok in
> a non-GAE environment. Any tips?
>
> print db(db.paid_by.paid_by.low
It also seems, when using cache on an action, that if I had set
response.title = "About" within the function, it no longer gets set in the
cached version of the page.
-Thadeus
On Fri, Oct 9, 2009 at 11:00 AM, Thadeus Burgess wrote:
> When you apply @cache to an controller action, what is actu
I know some people like to use web2py as they would use PHP which, I
would not recommend, but technically works.
On Oct 9, 10:40 am, "Sebastian E. Ovide"
wrote:
> well... I'm still using URL probably in some future I could use
> sessions...
>
> just wondering how to save some seconds more..
No until you cache the view as well.
Massimo
On Oct 9, 12:35 pm, Thadeus Burgess wrote:
> It also seems, when using cache on an action, that if I had set
> response.title = "About" within the function, it no longer gets set in the
> cached version of the page.
>
> -Thadeus
>
> On Fri, Oct 9, 20
CTRL-S is too old, and too widely used; it's "save" from probably every
browser in every environment in existence
In ASCII, it is "Device Control 3", and has been used for terminal control
since the beginnings of the use of terminals.
On Fri, Oct 9, 2009 at 3:52 AM, Iceberg wrote:
>
> Do
After fixing a problem with a couple bad memory cards the problem
seems to have gone away.
Currently Tim and I have two separate AS/400s running web2py in PASE
but we need to create a new driver to access DB2 directly.
On a related note, the AlterEgo/FAQ about DB2 support in web2py has
been upd
Hello!
A Question: Is it possible to run Web2py using python 2.4? I ask this
beacuse some web hosting servers only offers this version.
Thanks for the help.
Regards.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Use new web2py logo for the wiki instead of the balloon with the check mark.
Change "a collaboration tool for web2py community" to "a collaboration
tool for the web2py community" on the front.
-wes
--~--~-~--~~~---~--~~
You received this message because you are s
The controller below initially displays the flash 'some other error in
your form' right when the page loads.
If I leave the captcha field blank and hit submit, it flashes 'done!'
The same thing happens if I type something incorrect in the captcha
field and then hit submit.
What should I do diffe
Ok so using
@cache.ram(...)
def index(): return response.render(a=3)
caches the view and just serves it as html ? That is exactly what I want,
thanks!
-Thadeus
On Fri, Oct 9, 2009 at 1:42 PM, mdipierro wrote:
>
> No until you cache the view as well.
>
> Massimo
>
> On Oct 9, 12:35 pm, Thad
Joe -
Some of these suggestions I like...
On Fri, Oct 9, 2009 at 3:22 AM, Joe Barnhart wrote:
> We could make the wiki even simpler...
>
>
>1. Get rid of "comments" on each page. The wiki IS "comments" it
>doesn't need additional comments!
>
>
Hmmm yes, but with a caveat: if page-
Once we get the new wiki situated, we can start going through the google
groups history and looking for questions that have been asked, and adding
them to the wiki :)
Little things such as
http://www.mail-archive.com/web2py@googlegroups.com/msg16724.html
would be awesome for learning the framewor
On Fri, Oct 9, 2009 at 2:59 PM, Yarko Tymciurak wrote:
> Joe -
>
> Some of these suggestions I like...
>
> On Fri, Oct 9, 2009 at 3:22 AM, Joe Barnhart wrote:
>
>> We could make the wiki even simpler...
>>
>>
>>1. Get rid of "comments" on each page. The wiki IS "comments" it
>>doesn't ne
The example was incorrect because uses an old file with bugs. You
should use the Recaptcha helper built in web2py. I fixed the example
http://www.web2py.com/AlterEgo/default/show/99
On Oct 9, 2:26 pm, devnull wrote:
> The controller below initially displays the flash 'some other error in
> your
It works with 2.4 is hashlib is present (you may need to install it
separately)
On Oct 9, 2:20 pm, pepe_eloy wrote:
> Hello!
>
> A Question: Is it possible to run Web2py using python 2.4? I ask this
> beacuse some web hosting servers only offers this version.
>
> Thanks for the help.
>
> Regards
Does anyone know how to unit test the auth functions in web2py?
If so, could you please send examples?
So far, using the example unit test provided here:
http://www.web2py.com/AlterEgo/default/show/213 as the basis, I've
attempted to call http://site/default/user/register.
Here's an example:
c
I changed the db source in db.py from sqlite to postgres and I get:
NameError: global name 'psycopg2' is not defined
If I run python I can import psycopg2.
I notice that when I run w2p from the cli it says it sees sqlite, but
it does not say that it sees postgres.
??
thx,
-wes
--~--~---
Awesome -- thanks! (By the way, the page says [captcha and recaptha]
and should say [captcha and recaptcha])
On Oct 9, 5:24 pm, mdipierro wrote:
> The example was incorrect because uses an old file with bugs. You
> should use the Recaptcha helper built in web2py. I fixed the example
>
> http://w
oops. fixed thanks. Please let us know if this works for you.
On Oct 9, 4:57 pm, devnull wrote:
> Awesome -- thanks! (By the way, the page says [captcha and recaptha]
> and should say [captcha and recaptcha])
>
> On Oct 9, 5:24 pm, mdipierro wrote:
>
> > The example was incorrect because uses a
Are you using source or binary? the binary version does not see your
modules. You should use source.
On Oct 9, 4:52 pm, Wes James wrote:
> I changed the db source in db.py from sqlite to postgres and I get:
>
> NameError: global name 'psycopg2' is not defined
>
> If I run python I can import psy
source
On Fri, Oct 9, 2009 at 4:17 PM, mdipierro wrote:
>
> Are you using source or binary? the binary version does not see your
> modules. You should use source.
>
> On Oct 9, 4:52 pm, Wes James wrote:
>> I changed the db source in db.py from sqlite to postgres and I get:
>>
>> NameError: glob
I just started up an app I had with web2py 1.54:
Version 1.54 (2008-12-31 17:10:24)
Database drivers available: SQLite3, Postgre
This is what I get with current trunk:
Database drivers available: SQLite3, PostgreSQL
Hmmm, maybe there is something with wsgihandler.py. It worked with sqlite.
uploaded to GAE here: http://web2py-wiki.appspot.com/wiki
The first page I accessed threw an error but worked on a refresh.
How do I create a developer user, apart from using appadmin?
On Oct 9, 9:36 am, Richard wrote:
> > I really don't know much about GAE.
> > Can you help in this issue?
>
Hi,
I have a custom form and I need show the table.id in this format:
0 in the page. How to do this ?
Ex:
{{=form.custom.label.id}}
{{=form.custom.widget.id}}
This show me: 1
But I need that show me in this way: 1
Any idea ?
--~--~-~--~~~---
I assume this is an update form (else the id is not defined). you can
do
{{="%.5i" % form.record.id}}
On Oct 9, 7:01 pm, Leandro - ProfessionalIT
wrote:
> Hi,
>
> I have a custom form and I need show the table.id in this format:
> 0 in the page. How to do this ?
>
> Ex:
> {{=form.cust
Hi Joe,
On Fri, Oct 9, 2009 at 05:22, Joe Barnhart wrote:
> We could make the wiki even simpler...
>
> Get rid of "comments" on each page. The wiki IS "comments" it doesn't need
> additional comments!
I agree.
> Get rid of tags. Tags imply we know in advance what the structure of the
> wiki
On Fri, Oct 9, 2009 at 16:20, Wes James wrote:
> Use new web2py logo for the wiki instead of the balloon with the check mark.
>
> Change "a collaboration tool for web2py community" to "a collaboration
> tool for the web2py community" on the front.
Thanks.
--
Álvaro Justen
Peta5 - Telecomunic
You are right, Yarko. And perhaps that is exactly why we can not
expect much from those editors-inside-a-browser-window. Let it be. :-)
On Oct10, 2:55am, Yarko Tymciurak wrote:
> CTRL-S is too old, and too widely used; it's "save" from probably every
> browser in every environment in existence
Or in other word, @cache.ram(...) ALWAYS caches what the OUTPUT of a
controller action.
HOWEVER, if the output is a dict, then the web2py core will further
render them by the DEFAULT view. If the output is a string, then the
web2py core will serve it as-is. This is a rendering feature of web2py
c
it does. I did the below & it worked in gae
def index():
sm="HELO"
print sm.lower()
return
It should be something else. Also is there any other way achieve this:
having a description (the user can input in upper or lower) finding
out the id?
Thx,
Joseph
On Oct 9, 10:33 pm, mdipierro wro
Is there a way to cache two different versions of a function?
Say you have a contact page, that when users are logged in, includes a
comments and suggestions form, however when your not logged in, does not
display this form.
Is there a way to cache one version for logged in users, and the other
v
It is not the same. GAE is pure python and the lower() operator of a
string is implemented.
In the following case
db(db.table.field.lower()==value).select( ... )
.lower is not the string operator but it is a web2py method of the
field object that is mapped into SQL
SELECT ... WHERE LOWER(t
On Fri, Oct 9, 2009 at 9:01 PM, Iceberg wrote:
>
> You are right, Yarko. And perhaps that is exactly why we can not
> expect much from those editors-inside-a-browser-window. Let it be. :-)
>
hehehe yes, and I have some ancient, reptilian memory of CTRL-S
being used to "stop" output at t
Hm. The page loads with the error response flash. Other than that it
works.
def cap():
from gluon.tools import Recaptcha
form=FORM(
Recaptcha(request,public_key,private_key),
INPUT(_type='submit'))
if form.accepts(request.vars,session):
response.flash='
Hi Massimo,
Your suggestion is very neat and beyond my limited web2py knowledge:
Mind that you do not need anything like this if your purpose is login.
In that case web2py already provides method for login and the use
Think! (ask these questions in your view, and think of how to handle it;
then think if there is any better place to handle it; then decide --- T H I
N K!!! ;-)
On Fri, Oct 9, 2009 at 9:40 PM, ed wrote:
>
> Hi Massimo,
> Your suggestion is very neat and beyond my limited web2py knowledge:
>
>
On Fri, Oct 9, 2009 at 9:46 PM, Yarko Tymciurak wrote:
> Think! (ask these questions in your view, and think of how to handle it;
> then think if there is any better place to handle it; then decide --- T H I
> N K!!! ;-)
>
>
>
Oh, heck - you're a newbie, and hopefully you did some more thinking
On Oct10, 10:28am, Thadeus Burgess wrote:
> Is there a way to cache two different versions of a function?
>
> Say you have a contact page, that when users are logged in, includes a
> comments and suggestions form, however when your not logged in, does not
> display this form.
>
> Is there a way t
Hi Yarko,
Of course i did some thinking, %$# ;-) This is a redirect not a
a return dict() issue wherein variables are not passed as per Massimo
and what i also observed. No, your solution did not help! So, review
your solution and T H I N K ;-)
On Oct 10, 11:07 am, Yarko Tymciurak wro
I have an ajax call that updates the contents of a div. The code that
generates the div contents also embeds some javascripts into the div.
For example, one of the javascripts is the ubiquitous "share this"
button. A simple test case, therefore, is a div that just inserts the
sharethis button and
ahh yes, it just appears on the page with no message on submit, so caching a
page with a form that submits to itself does not work (perhaps if the form
was changed to submit elsewhere.
What about only caching if auth.is_logged_in() == False?
-Thadeus
On Fri, Oct 9, 2009 at 10:37 PM, Iceberg
In your callback, instead of replacing the HTML, eval the response
success="function (msg){ eval(msg); };"
So you would return javascript to accomplish what you want
from your view
return """
jQuery('#mydiv').html('%s');
jQuery('#otherdiv').css({"color": "red"});
""" % (DIV("Hi"))
-Thadeus
You don't have to be old like Yarko and me to remember ^S ^Q. Just
open a DOS window and do a dir /s from the c: drive. Then trip down
memory lane as you exercise your left hand's 3rd, 4th and 5th fingers.
On Oct 9, 10:33 pm, Yarko Tymciurak wrote:
> On Fri, Oct 9, 2009 at 9:01 PM, Iceberg wrot
OK, that explains the doc a little better. The doc gives an example of
eval in the callback but I couldn't get it to work earlier. Now that I
really need it, I'm going to have to bang my head on it a bit to get
it working. The doc was a little thin about exactly why it was needed.
Now I understand
Massimo,
I'll look at my server monday. I just brought the w2p app to a
macbook pro, installed postgres 8.4.1, installed mod_wsgi and got
psycopg2 2.0.13 and it worked without an error.
Sorry for the hassle.
-wes
On Fri, Oct 9, 2009 at 4:17 PM, mdipierro wrote:
>
> Are you using source or bi
69 matches
Mail list logo