Hi everyone,
i'm very proud to announce "Airea.me" (in english it's something like
"aerate me").
This application was made into the challenge "abredatos". A
competition held in Spain, based on the creation of an application
within 48 hours using open data.
Our team, decided to use web2py, jQuery
Hi,
first question:
following what reported in the doc
http://www.web2py.com/book/default/chapter/09?search=export_to_csv
I have implemented my export view but I realized that apparently I have
no file name control and it depends on the browser I use even if I
called my view "export.csv". Wit
How do I do that using DAL?
Using db.executesql() does not update web2py//dabases/
Regards
Johann
--
May grace and peace be yours in abundance through the full knowledge of God
and of Jesus our Lord! His divine power has given us everything we need for
life and godliness through the full know
Should be fixed at default too
On Fri, May 27, 2011 at 2:57 AM, Bruno Rocha wrote:
> def user():
>
> *form = auth() form.element(_type='submit')['value'] = 'Login'*
> return dict(form=form)
>
>
> --
> Bruno Rocha
> [ About me: http://zerp.ly/rochacbruno ]
>
>
>
> On Thu, May 26, 2011 at 4:52
I know I can use this code:
users = db(db.auth_user.id==userId).select(db.auth_user.ALL)
if users:
return users[0]['registration_key'] not in ['disabled',
'blocked']
return False
to check if an account is disabled.
Is there a function/method I can call to check this instead? It fe
That is how I do it. As far as I know, setting registration_key to
'disabled' is the only way for web2py to deny a log in for someone using
Auth. When I need to set this or check it, I just wrap the code into a
generic is_disabled() method to do the checking in case a better way
presents it sel
:-)
On May 27, 3:11 am, demetrio wrote:
> Hi everyone,
>
> i'm very proud to announce "Airea.me" (in english it's something like
> "aerate me").
>
> This application was made into the challenge "abredatos". A
> competition held in Spain, based on the creation of an application
> within 48 hours u
response.headers['Content-Disposition'] =
'attachment;filename=thisfile.csv'
On May 27, 4:21 am, Manuele Pesenti wrote:
> Hi,
>
> first question:
>
> following what reported in the
> dochttp://www.web2py.com/book/default/chapter/09?search=export_to_csv
>
> I have implemented my export view but I
Are you doing this from a shell or script? You neeb db.commit()
On May 27, 5:47 am, Johann Spies wrote:
> How do I do that using DAL?
>
> Using db.executesql() does not update web2py//dabases/
>
> Regards
> Johann
>
> --
> May grace and peace be yours in abundance through the full knowledge of G
Thanks. And thanks for .first()
On 27 May 2011, at 13:14, Ross Peoples wrote:
> That is how I do it. As far as I know, setting registration_key to 'disabled'
> is the only way for web2py to deny a log in for someone using Auth. When I
> need to set this or check it, I just wrap the code into
if auth.messages.submit_button = 'Login'
On May 27, 6:26 am, Phyo Arkar wrote:
> Should be fixed at default too
>
>
>
>
>
>
>
> On Fri, May 27, 2011 at 2:57 AM, Bruno Rocha wrote:
> > def user():
>
> > *form = auth() form.element(_type='submit')['value'] = 'Login'*
> > return dict(form=form)
On 27 May 2011 14:25, Massimo Di Pierro wrote:
> Are you doing this from a shell or script? You neeb db.commit()
In the shell.
Yes I know that, but when I have dropped a table in this way still have to
delete the related file in /databases before web2py will create it
again.
Regards
Johann
On 27/05/2011 14:25, Massimo Di Pierro wrote:
response.headers['Content-Disposition'] =
'attachment;filename=thisfile.csv'
thankyou Massimo... I had just found the answer in the list archives.
Any suggestion about the second question?
Is it possible to store somewhere the query in order to p
great, nice application, hope you win the competition
\(^o^)/
I am running this:
python web2py.py -S welcome -M -N -R
applications/welcome/private/email_sender.py
I am trying to send email with this...
import time
while True:
print "Checking for new mails..."
rows = db(db.invitations.sent_email == False).select()
for invite in ro
Are you sure you have configured Mail properly? See
http://web2py.com/book/default/chapter/08#Auth-and-Mail. Are you able to
send an email from a controller?
On Friday, May 27, 2011 9:05:00 AM UTC-4, encompass wrote:
> I am running this:
>
> python web2py.py -S welcome -M -N -R
> applic
Very nice. Just added it to http://web2py.com/poweredby. :-)
Anthony
On Friday, May 27, 2011 4:11:09 AM UTC-4, demetrio wrote:
> Hi everyone,
>
> i'm very proud to announce "Airea.me" (in english it's something like
> "aerate me").
>
> This application was made into the challenge "abredatos"
On Friday, May 27, 2011 8:39:02 AM UTC-4, Manuele wrote:
>
> On 27/05/2011 14:25, Massimo Di Pierro wrote:
> > response.headers['Content-Disposition'] =
> > 'attachment;filename=thisfile.csv'
>
>
> thankyou Massimo... I had just found the answer in the list archives.
>
> Any suggestion about the
So I tried adding c='default' in the URL call or default_controller in
the BASE router, that does not work.
I also tried with host=True in the call, does not either.
Now I activated the server logging and I can see it looks for /
download/stock etc in another directory ... :s I really don't
un
Ok
I'm not alone on this server and someone had created an alias /
download in the conf.d apache directory...
Life's tough sometimes.. :)
On May 26, 3:31 pm, Anthony wrote:
> On Wednesday, May 25, 2011 5:24:49 AM UTC-4, Joseph.Piron wrote:
>
> > routers = dict(
> > BASE = dict(
> > domains =
Hi all,
a little annoying bug I encountered a minute ago:
I tried the commit in mercurial versioning for an application running
apache+wgsi_mod, and I got a ticket and this error embedded:
IOError: sys.stdout access restricted by mod_wsgi: sys.stdout access
restricted by mod_wsgi
A quick check
In wsgihandler if you add:
sys.stdout=sys.stderr
does it solve the problem? If so I will add this to trunk.
On May 27, 9:04 am, "Joseph.Piron" wrote:
> Hi all,
>
> a little annoying bug I encountered a minute ago:
>
> I tried the commit in mercurial versioning for an application running
> apac
Very cool
How did you manage to do the statistical graphics??
Regarding PyFPDF:
Headers should be rendered.
Tables need at least a first TH, prior any TD, who indicates column
width (and it is wise to use THEAD and TBODY when you have multiple
pages), see:
http://code.google.com/p/pyfpdf/wiki/WriteHTML
Header 1header
2
cell 1cell 2
cell 2cell 3
I'm p
With the Google APIs
In this case with these two:
http://code.google.com/apis/ajax/playground/?type=visualization#line_chart
http://code.google.com/apis/ajax/playground/?type=visualization#motion_chart
El vie, 27-05-2011 a las 09:06 -0700, JorgeRpo escribió:
> Very cool
>
> How did you manage t
I'm looking for some advice on keeping my development version and
production version in sync.
My development setup uses Mercurial for version control.
Whats a good way to push changes to the server when i'm ready to
deploy?
I am looking for the LOAD helper?
I checked gluon/http.py and all other files; but I cant seem to locate it.
I wanted to see how to modify the text that says "Loading..."
I wanted to include one of those mac like scrollers gifs.
Any ideas?
There are a couple approaches to consider. What I do is set up a central
repo on Bitbucket, "hg push" changes from my PC to Bitbucket and "hg pull"
changes from Bitbucket to my production server.
You can do the updates manually but I like using Fabric so you don't have to
SSH in to your server
It is in compileapp.py called LoadFactory.
Anyway, I just added to trunk
LOAD(...,content=IMG(_src='myanimated.gif'))
On May 27, 3:29 pm, "David J." wrote:
> I am looking for the LOAD helper?
> I checked gluon/http.py and all other files; but I cant seem to locate it.
>
> I wanted to see how to
At least requesting a new password works. I assume it uses those
settings as well.
BR,
Jason Brower
On 05/27/2011 04:30 PM, Anthony wrote:
Are you sure you have configured Mail properly? See
http://web2py.com/book/default/chapter/08#Auth-and-Mail. Are you able
to send an email from a controll
Class LoadFactory in compileapp.py
LOAD is just a name defined in the request environment that refers to a
LoadFactory object, which is defined in compileapp.py.
The LOAD name is assigned here:
http://code.google.com/p/web2py/source/browse/gluon/compileapp.py#240
And LoadFactory is defined here:
http://code.google.com/p/web2p
Great, that is what I will try. I just wasn't sure what the best way
to go about that was.
I saw your fabric script. Looked excellent, just a little complex for
my needs. I may use it in the future. Thanks!
On May 27, 3:30 pm, pbreit wrote:
> There are a couple approaches to consider. What I do
What about using something like Sendgrid (http://sendgrid.com)? Or
Postmark (http://postmarkapp.com/)?
Let somebody else worry about throttling and blacklists and all of the
headaches of smtp servers.
Matt
On May 26, 10:50 pm, Jason Brower wrote:
> Yes, I practically have that now. The issue i
+1
On May 27, 4:02 pm, mattgorecki wrote:
> What about using something like Sendgrid (http://sendgrid.com)?Or
> Postmark (http://postmarkapp.com/)?
>
> Let somebody else worry about throttling and blacklists and all of the
> headaches of smtp servers.
>
> Matt
>
> On May 26, 10:50 pm, Jason Browe
I like to try to get my crons and background processes working in a
controller first since it's easier to debug. Also, you might try writing the
response to mail.send to the DB to see if there are any errors.
I'm not sure that "== False" is the best way to query since False has
special properti
I'd also suggest SendGrid (200/day free, 10 cents for 1,000).
It looks like you are now trying it as a background process. I've had better
luck with cron. And since you only want to send every hour or so, you could
set the cron to run hourly.
For doing updates, this is all you need:
from fabric.api import *
def prod():
env.hosts = ['1.1.1.1']
env.user = 'user'
env.password = 'password'
def update():
run('cd /var/web2py/applications/init; hg pull')
run('cd /var/web2py/applications/init; hg update')
Then at the co
On 27/05/2011 15:53, Anthony wrote:
You could cache the query:
http://web2py.com/book/default/chapter/06#Caching-Selects
good to know :)
many thanks
Manuele
what's the way to store in db the user that perform the insert in db and
the actual time stamp? I thought to resolve with the subsequant solution
but with no success:
# db model
db.define_table('main_post',
Field('title', required=True, notnull=True, label=T('Title')),
Field('descriptio
Thanks.
I was searching for LOAD and I couldn't find it.
Thanks Massimo for the enhancement.
On May 27, 2011 4:49 PM, "Anthony" wrote:
> LOAD is just a name defined in the request environment that refers to a
> LoadFactory object, which is defined in compileapp.py.
>
> The LOAD name is assigned
I'm seeing these in my server logs. Are these hack attempts?
41.142.150.108 - - [27/May/2011:10:12:27 -0700] "GET /).hide().html(
HTTP/1.1" 303 132 "-" "Java/1.6.0_04"
41.142.150.108 - - [27/May/2011:10:12:21 -0700] "GET /\x22 +
((document.location.protocol==\x22https:\x22)?\x22https://snapabug.
Try taking them out of the table definition. When you are referencing fields
in the same table, they sometimes need to go outside the table definition.
db.main_post.owner.compute = lambda r: auth.user.id
db.main_post.owner.requires = IS_IN_DB(db, 'auth_user.id')
Or do this;
Field('created_by', d
You can just do:
db.define_table('main_post',
Field('title', required=True, notnull=True, label=T('Title')),
Field('description', 'text', label=T('description')),
auth.signature)
and you get
db.main_post.created_by
db.main_post.created_on
On May 27, 4:34 pm, Manuele Pesenti wrot
Awesome, that's exactly the kind of solution I was looking for. That
will work perfectly.
Thanks!
On May 27, 4:24 pm, pbreit wrote:
> For doing updates, this is all you need:
>
> from fabric.api import *
>
> def prod():
> env.hosts = ['1.1.1.1']
> env.user = 'user'
> env.password = '
This blog post,
http://rhettinger.wordpress.com/2011/01/28/open-your-source-more/, got me
thinking how nice it would be to link from the book to the source. I'm just
beginning with Python and it took me a while to find where Request, Session
and Response were defined.
Is this code in globals.py missing a parameter?
def stream(
self,
stream,
chunk_size = DEFAULT_CHUNK_SIZE,
request=None,
): missing a parameter after request=None, ? Also in def connect(
self, request, response, db=None, tablename='web2py_session',
mastera
Swet!
On May 26, 11:31 pm, Anthony wrote:
> On Thursday, May 26, 2011 11:24:35 PM UTC-4, Christopher Steel wrote:
>
> > 10. Not a problem really, it's merely a flesh wound...
>
> Nice Monty Python reference. Here's another
> one:http://www.google.com/codesearch/p?hl=en#uyCl3L51_dI/gluon/ro
Hello, i want to know i this behaviour is correct: Sometimes if I
define the .requires outside the table definition like:
db.define_table('mytable', ...)
db.mytable.myfield.requires = IS_IN_DB(..)
It just doesn't show the dropdown list in appadmin for reference
fields, but if I put the .requires
It's not uncommon to include a comma after the last item.
db.table.field.requires = IS_IN_DB(...) # should build the dropdown widget
in form
db.table.field.requires = [ IS_IN_DB(...) ] # should not build the dropdown
widget when requires inside a list.
--
Bruno Rocha
[ About me: http://zerp.ly/rochacbruno ]
On Fri, May 27, 2011 at 8:53 PM, Cesar Bus
Hi, I am building a test to create an ORM kind functionality using just
modules (to avoid models)
I am doing something like this: https://gist.github.com/996421 (that is
working well)
That uses 'validade_and_insert' which validate the FORM level validators and
return a Row object with r.id and r.
Thanks! Didn't know that, it was inside a list. Its working now :)
On 27 mayo, 19:03, Bruno Rocha wrote:
> db.table.field.requires = IS_IN_DB(...) # should build the dropdown widget
> in form
>
> db.table.field.requires = [ IS_IN_DB(...) ] # should not build the dropdown
> widget when requires in
I wrote this long ago but got lost in the list:
http://code.google.com/p/django-and-sqlalchemy-on-web2py/
Can someone assist me in deploying google app engine.. I am getting
this error:
File "/usr/lib/python2.6/urllib2.py", line 1169, in https_open
return self.do_open(httplib.HTTPSConnection, req)
File "/home/tara/Downloads/google_appengine/lib/fancy_urllib/
fancy_urllib/__init__.py", line 367,
>From your traceback:
File "/usr/lib/python2.6/urllib2.py"
GAE requires python 2.5.
On May 27, 11:22 pm, Resa wrote:
> Can someone assist me in deploying google app engine.. I am getting
> this error:
>
> File "/usr/lib/python2.6/urllib2.py", line 1169, in https_open
> return self.do_open
I have a string variable, message_body, which is multiline (has
newlines or \n characters).
How do I get it to display properly in an HTML view?
simply using {{=message_body}} displays the text all on the same
line, ignoring the carriage returns.
{{=TEXTAREA(message_body)}} displays properly
I think you have to search/replace:
{{=XML(str(message_body).replace('\n', ''), sanitize=True)}}
I'm not sure if str() is always necessary or if sanitize needs to be True.
Perfect!!! Thank you!!!
Luis.
On May 27, 10:28 pm, pbreit wrote:
> I think you have to search/replace:
>
> {{=XML(str(message_body).replace('\n', ''), sanitize=True)}}
>
> I'm not sure if str() is always necessary or if sanitize needs to be True.
59 matches
Mail list logo