Hi Massimo,
Okay, redirect returns page but without any variable. Any hint how to
render a page name loggedin that says; Hi Ed, welcome! after a
succesful login using the code i created?. Sorry, i'm a newbie with
very limited web2py knowledge and stucked on this. Thank you in
advance Massimo.
does't work the #mytable_myfield solution, and I can't understand why!
(no web2py_ajax.html in code)
On 9 Ott, 07:15, mr.freeze nat...@freezable.com wrote:
Try using the class:
input.string {
width: 450px;
}
or if you don't want to affect all input.string:
#mytable_myfield{
The crazy need not be that crazy. I normally do:
db.Field('myfield','string',
widget=lambda field,value,**kwargs:
StringWidget.widget(field,value,_size=40,**kwargs)
so that the output field has a size=40 setting.
css should also work. Just make sure your definition appear in right
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 mschm...@soft-impact.comwrote:
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
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 know
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
same problem for HTML file
div class=index_small_pics style=background:
url(images/pic_goals.jpg) no-repeat;
Courses Aims
/div
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
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 iceb...@21cn.com wrote:
The crazy need not be that crazy. I normally do:
db.Field('myfield','string',
widget=lambda
excuse me: onvalidation not onvalidate.
On 9 Ott, 14:20, leone handja...@gmail.com 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.
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
I emailed him.
On Oct 9, 2:01 am, Joseph Jude ceph...@gmail.com 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
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 iceb...@21cn.com wrote:
The crazy need not be
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')
I forget:
from PIL import Image
On 9 Ott, 15:49, leone handja...@gmail.com wrote:
Solved:
if form.accepts(request.vars, session, keepvalues=True,
onvalidation=WriteThumb):
.
def WriteThumb(form):
i = cStringIO.StringIO()
o = cStringIO.StringIO()
On Oct 9, 9:27 am, Chris S sanders.ch...@gmail.com 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
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. Instead the
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
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 denes1...@yahoo.ca wrote:
Any reason not to place them under static?.
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
@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 thade...@thadeusb.com wrote:
When you apply @cache to an controller action, what is actually cached, is
it just
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 ceph...@gmail.com 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
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 thade...@thadeusb.comwrote:
When you apply @cache to an controller
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 sebastianov...@gmail.com
wrote:
well... I'm still using URL probably in some future I could use
sessions...
just wondering how to save
No until you cache the view as well.
Massimo
On Oct 9, 12:35 pm, Thadeus Burgess thade...@thadeusb.com 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
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 iceb...@21cn.com
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
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
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
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
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 mdipie...@cs.depaul.edu wrote:
No until you cache the view as well.
Massimo
On Oct
Joe -
Some of these suggestions I like...
On Fri, Oct 9, 2009 at 3:22 AM, Joe Barnhart joe.barnh...@gmail.com 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
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
On Fri, Oct 9, 2009 at 2:59 PM, Yarko Tymciurak yark...@gmail.com wrote:
Joe -
Some of these suggestions I like...
On Fri, Oct 9, 2009 at 3:22 AM, Joe Barnhart joe.barnh...@gmail.comwrote:
We could make the wiki even simpler...
1. Get rid of comments on each page. The wiki IS
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 ache...@gmail.com wrote:
The controller below initially displays the flash 'some
It works with 2.4 is hashlib is present (you may need to install it
separately)
On Oct 9, 2:20 pm, pepe_eloy pepe.e...@gmail.com 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
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:
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 mdipie...@cs.depaul.edu wrote:
The example was incorrect because uses an old file with bugs. You
should use the Recaptcha helper built in web2py. I fixed
oops. fixed thanks. Please let us know if this works for you.
On Oct 9, 4:57 pm, devnull ache...@gmail.com 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 mdipie...@cs.depaul.edu wrote:
The
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 compte...@gmail.com 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
source
On Fri, Oct 9, 2009 at 4:17 PM, mdipierro mdipie...@cs.depaul.edu 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 compte...@gmail.com wrote:
I changed the db source in db.py from sqlite to
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 richar...@gmail.com wrote:
I really don't know much about GAE.
Can you help
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:
labelspan{{=form.custom.label.id}}/span
{{=form.custom.widget.id}}/label
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 lsever...@gmail.com
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:
Hi Joe,
On Fri, Oct 9, 2009 at 05:22, Joe Barnhart joe.barnh...@gmail.com 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
On Fri, Oct 9, 2009 at 16:20, Wes James compte...@gmail.com 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 -
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 yark...@gmail.com wrote:
CTRL-S is too old, and too widely used; it's save from probably every
browser in every
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
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
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
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
On Fri, Oct 9, 2009 at 9:01 PM, Iceberg iceb...@21cn.com 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
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):
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
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 edbi...@rocketmail.com wrote:
Hi Massimo,
Your suggestion is very neat and beyond my limited
On Fri, Oct 9, 2009 at 9:46 PM, Yarko Tymciurak yark...@gmail.com 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
On Oct10, 10:28am, Thadeus Burgess thade...@thadeusb.com 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.
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
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
On Fri,
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 yark...@gmail.com wrote:
On Fri, Oct 9, 2009 at 9:01
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
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 mdipie...@cs.depaul.edu wrote:
Are
70 matches
Mail list logo