[web2py] Re: log out user

2012-09-23 Thread Yebach
Where do I insert the code? In model? this is now my code in db.py if session['school_db'] != request.cookies['mycookie'].value: auth.logout() session['school_db'] = request.cookies['mycookie'].value But I get an error 'NoneType' object has no attribute 'insert' seems like smth

Re: [web2py] Invalid Syntax Error with HTML Helper attributes

2012-09-23 Thread mwolfe02
Right on both counts, Bruno. Thanks. I thought I was running the same Python version in both environments, but I was not. I am running Python 2.7.3 in my linux environment (which works without error) and Python 2.5.5 on Windows (where I was receiving the error). Your workaround was effective

[web2py] web2py 2.0 DAL no longer usable for mysql stored procedures

2012-09-23 Thread Yarin
After upgrading to web2py 2.0, we can no longer use the DAL or mysql adapters to make MySQL stored procedure calls. In web2py 1.x I had reportedhow mysql stored procedures weren't working for us in certain circumstances- however

[web2py] Windows Binaries for Python Extension Packages

2012-09-23 Thread IVINH
can be used: http://www.lfd.uci.edu/~gohlke/pythonlibs/ --

[web2py] Re: sending emails on gae doesnt work

2012-09-23 Thread Pystar
Still doesnt work for me, so I will stick to my hackish way for now till I can look into it in more detail. On Monday, September 24, 2012 2:58:17 AM UTC+1, howesc wrote: > > i remember this documented way to send HTML emails by sending a list of > messages, first item in the list is plaintext, s

[web2py] Re: Using the template system to generate messages

2012-09-23 Thread Pystar
Kindly note that GAE doesnt support sending of HTML mails, so my solution wont work on GAE, check my solution to something related https://groups.google.com/forum/?fromgroups=#!topic/web2py/sR38-f677io On Sunday, September 23, 2012 8:15:36 PM UTC+1, Pystar wrote: > > Ok, I solved it. The trick

[web2py] Re: sending emails on gae doesnt work

2012-09-23 Thread howesc
i remember this documented way to send HTML emails by sending a list of messages, first item in the list is plaintext, second item is HTML. http://web2py.com/books/default/chapter/29/08#Combining-text-and-HTML-emails actually, this is new to me, and apparently what you are using: http://web2py

[web2py] Re: hideerror=True is being ignored in 2.0.x

2012-09-23 Thread Matt
Raised as issue. http://code.google.com/p/web2py/issues/detail?id=1027 On Friday, September 21, 2012 12:35:56 AM UTC+12, Massimo Di Pierro wrote: > > Please open a ticket pointing to this thread. Thanks. > > On Thursday, 20 September 2012 00:11:49 UTC-5, Matt wrote: >> >> Hi there, >> >> I use cu

[web2py] Re: sending emails on gae doesnt work

2012-09-23 Thread Pystar
I havent tried your method, but I got it working in a rather hackish way using simple string interpolation.This is what I did message = "Dear %user, welcome to my site" % ("pystar") mail.send(to="blabla", subject="blabla", message=message) That way, I can send HTML messages with inserted variab

[web2py] Re: sending emails on gae doesnt work

2012-09-23 Thread howesc
here is what i do... def connect_mail(): """ init the mail module """ mail = Mail() # mailer mail.settings.server = 'gae' # your SMTP server mail.settings.sender='authorized sender ' # your email return mail te

Re: [web2py] Re: smartgrid: linked_tables=dict(parent=['child'], child=[''])

2012-09-23 Thread Adnan Smajlovic
Works perfect. Thank you Massimo. On Sun, Sep 23, 2012 at 8:16 PM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > Can you please try again? > > > On Sunday, 23 September 2012 18:03:48 UTC-5, Adi wrote: > >> Thanks Massimo! >> >> I'm trying to test it, but got this error bellow: >> >>

[web2py] Re: sending emails on gae doesnt work

2012-09-23 Thread Pystar
Is there a work around, I really need to send HTML emails or how can I include a clickable link inside a text email on GAE? On Monday, September 24, 2012 1:17:26 AM UTC+1, Massimo Di Pierro wrote: > > I am not sure GAE supports HTML messages. Does it? > > On Sunday, 23 September 2012 19:13:20 UTC

[web2py] Re: sending emails on gae doesnt work

2012-09-23 Thread Massimo Di Pierro
I am not sure GAE supports HTML messages. Does it? On Sunday, 23 September 2012 19:13:20 UTC-5, Pystar wrote: > > The thing is that I can send ordinary text messages, but sending html > messages fails. > > On Monday, September 24, 2012 12:52:42 AM UTC+1, howesc wrote: >> >> did you check the GAE

Re: [web2py] Re: smartgrid: linked_tables=dict(parent=['child'], child=[''])

2012-09-23 Thread Massimo Di Pierro
Can you please try again? On Sunday, 23 September 2012 18:03:48 UTC-5, Adi wrote: > > Thanks Massimo! > > I'm trying to test it, but got this error bellow: > > File "/Users/adnan/web2py-trunk/gluon/sqlhtml.py", line 2280, in smartgrid > > linked_tables = linked_tables.get(tablename,[]) > Unb

[web2py] Re: sending emails on gae doesnt work

2012-09-23 Thread Pystar
The thing is that I can send ordinary text messages, but sending html messages fails. On Monday, September 24, 2012 12:52:42 AM UTC+1, howesc wrote: > > did you check the GAE logs? remember that GAE won't send emails unless > the from address is at least a viewer of the GAE application. > > ple

[web2py] Re: sending emails on gae doesnt work

2012-09-23 Thread howesc
did you check the GAE logs? remember that GAE won't send emails unless the from address is at least a viewer of the GAE application. please double check the GAE logs for warning messagesi think that is how google logs them. cfh On Sunday, September 23, 2012 3:35:16 PM UTC-7, Pystar wrote:

[web2py] facebook comments

2012-09-23 Thread Jose
Hello I am developed a website and want to include the facebook comment box. I went to [1] and got the following code: {{url = "http://www.my_domain.com%s/%s"%(request.url,request.env.query_string)}} (function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0];

Re: [web2py] Re: smartgrid: linked_tables=dict(parent=['child'], child=[''])

2012-09-23 Thread Adnan Smajlovic
Thanks Massimo! I'm trying to test it, but got this error bellow: File "/Users/adnan/web2py-trunk/gluon/sqlhtml.py", line 2280, in smartgrid linked_tables = linked_tables.get(tablename,[]) UnboundLocalError: local variable 'tablename' referenced before assignment On Sun, Sep 23, 2012 at

[web2py] Re: sending emails on gae doesnt work

2012-09-23 Thread Pystar
These are the settings: auth.settings.register_onaccept = [messenger] mail=auth.settings.mailer mail.settings.server = 'gae' mail.settings.sender = 'usern...@gmail.com' mail.settings.login = 'username:password' def messenger(form): context = dict(uniqueid=form.vars.uniqueid, first_name=form.

[web2py] Re: sending emails on gae doesnt work

2012-09-23 Thread Massimo Di Pierro
Do you get an error? On Sunday, 23 September 2012 16:10:35 UTC-5, Pystar wrote: > > sending emails on gae doesnt work although it works perfectly on localhost. > I am using "gae" as settings > --

[web2py] Re: (2.0.9) compute fields don't work on db update

2012-09-23 Thread Massimo Di Pierro
What version are you using? This is what I get: >>> db=DAL() >>> product = db.define_table('product', Field('cost1'), Field('cost2'), Field('total', compute = lambda r: r['cost1'] + r['cost2'])) >>> product.insert(cost1=10, cost2=20) 1 >>> p = db.product(1) >>> p.update_record(cost1=5) , 'cost1

[web2py] Re: System cannot find path specified

2012-09-23 Thread Massimo Di Pierro
The problem is that c:/web2py should be the first item in PYTHONPATH. Do you insert stuff in sys.path in your code? On Sunday, 23 September 2012 13:32:40 UTC-5, Bill Thayer wrote: > > I am writing a parser to populate my database. when I used xmlprpxlib I > got a malformed xml error. In reading

[web2py] Re: how to make autocomplete widget show arbitrary values in the list

2012-09-23 Thread Massimo Di Pierro
The autocomplete cannot use format to represent a field but if you store the representation in an computed field, you can use that for autocomplete. On Saturday, 22 September 2012 22:23:51 UTC-5, alex wrote: > > Hi all, > > > > How to solve this: > > > > There are two tables, table "xref" ha

[web2py] Re: smartgrid: linked_tables=dict(parent=['child'], child=[''])

2012-09-23 Thread Massimo Di Pierro
I just added the syntax you requested: linked_tables=dict(parent=['child'], child=[]) Please help me test it. On Saturday, 22 September 2012 18:55:57 UTC-5, Adi wrote: > > If I may rephrase and clarify a question: > > Is it possible to add control, through dictionary in (smartgrid) > linked_t

[web2py] rocket.error

2012-09-23 Thread Martin Weissenboeck
I have got the following error message. This message appeard a short time after I had sent something using the "mail.send" function. ERROR:Rocket.Errors.Thread-10:Traceback (most recent call last): File "D:\dropbox\InfoSMS\web2py\gluon\rocket.py", line 1302, in run self.run_app(conn) Fil

[web2py] sending emails on gae doesnt work

2012-09-23 Thread Pystar
sending emails on gae doesnt work although it works perfectly on localhost. I am using "gae" as settings --

[web2py] Re: (2.0.9) compute fields don't work on db update

2012-09-23 Thread Niphlod
Sidenote: the current behaviour allows everyone to have e.g. a heavy lambda attached to a field and fire that one only when needed. If your lambda needs both values, you should update the record specifying both values everywhere. Disclaimer: I'm "a db man" hence not a big fan of computed fields

[web2py] Re: System cannot find path specified

2012-09-23 Thread Bill Thayer
Just noticed a typo (first jserver should be xserver) but it doesn't affect the outcome. On Sunday, September 23, 2012 1:32:40 PM UTC-5, Bill Thayer wrote: > > I am writing a parser to populate my database. when I used xmlprpxlib I > got a malformed xml error. In reading the book it looked like

[web2py] Re: Using the template system to generate messages

2012-09-23 Thread Pystar
Ok, I solved it. The trick is that message is first text, then html. So the signature should read like this: context = dict(x=y) message = response.render("message.html", context) ***Please note that the message.html file should be in the top level of your views folder or should be a absolute pa

Re: [web2py] Re: Using the template system to generate messages

2012-09-23 Thread Marin Pranjić
Your email should begin with tag and end with . If you have anything before/after, it will not render. Marin On Sun, Sep 23, 2012 at 9:05 PM, Pystar wrote: > Using this method, the mail is sent successfully,but shows raw html code > in the email client, i.e. its not rendering > > > On Friday,

Re: [web2py] Neither suggestion worked...

2012-09-23 Thread Bill Thayer
Hi Richard, Sorry for not getting back to this right away. Had so much to do on this project this problem was burning valuable time. My first early release is this Thursday. From before, I did post the code exactly. I'll probably try your shell commands after Friday. Then I'll keep you posted.

[web2py] Re: Using the template system to generate messages

2012-09-23 Thread Pystar
Using this method, the mail is sent successfully,but shows raw html code in the email client, i.e. its not rendering On Friday, September 7, 2012 4:19:45 PM UTC+1, Niphlod wrote: > > it's a path relative to the app's *views *folder. With this code your * > message.html* should be next to layout.

[web2py] Re: (2.0.9) compute fields don't work on db update

2012-09-23 Thread Alan Etkin
El sábado, 22 de septiembre de 2012 22:36:44 UTC-3, VP escribió: > > I figured out what I would call a bug. I'm not sure it's a bug. It would if, for example, the documentation said it's possible to do field calculations without passing all the involved parameters. I belive this is not the case

[web2py] System cannot find path specified

2012-09-23 Thread Bill Thayer
I am writing a parser to populate my database. when I used xmlprpxlib I got a malformed xml error. In reading the book it looked like simplejsonrpc was similar so figured I'd give it a shot and wrote a simple test script. # -*- coding: cp1252 -*- import os, sys print sys.path from xmlrpclib impo

Re: [web2py] Re: New Plugin to add client side validation to your SQLFORM

2012-09-23 Thread Richard Vézina
Thanks Franco for this seems really interresting... I was planning to look into client side validation, now I hope it could get include into web2py with clientvalidation=True :) Richard On Sun, Sep 23, 2012 at 11:41 AM, Franco Alarcon wrote: > If you need some help, i'm glad to help you. > > >

Re: [web2py] Re: New Plugin to add client side validation to your SQLFORM

2012-09-23 Thread Franco Alarcon
If you need some help, i'm glad to help you. 2012/9/22 Massimo Di Pierro > This is really a good idea. I will try it asap. Join us on > web2py-developers. > > > On Tuesday, 24 July 2012 09:38:51 UTC-5, Franco wrote: >> >> >>

Re: [web2py] Invalid Syntax Error with HTML Helper attributes

2012-09-23 Thread Jonathan Lundell
On 23 Sep 2012, at 7:45 AM, Michael Wolfe wrote: > I'm receiving an invalid syntax error when running from Windows. I do not > receive the error when running the same code from my Webfaction account on > CentOS. The error appears to be related to compiling of the code. I assume > the compil

Re: [web2py] DAL Keys

2012-09-23 Thread Carlos Correia
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, You should use db.tables instead: for table in db.tables: (...) Em 23-09-2012 12:56, Hassan Alnatour escreveu: > Dear ALL , > > i am getting this error > > > 'DAL' object has no attribute 'keys' > > > when using this code : >

Re: [web2py] Superfish in Web2py 2.0

2012-09-23 Thread Richard Vézina
I don't know, you can look at bootstrap css class name on bootstrap site, I presume that nav is a bootstrap classes name, so they use it if they want a bootstrap styling into web2py... Richard On Sat, Sep 22, 2012 at 10:39 AM, Patrick Ryan wrote: > Thanks Richard. That's very helpful. I'm looki

[web2py] DAL Keys

2012-09-23 Thread Hassan Alnatour
Dear ALL , i am getting this error 'DAL' object has no attribute 'keys' when using this code : for table in db.keys(): if not (table.startswith('_') or table in badmin_tables): if db[table] and not table in badmin_exclude_tables: if isinstance(db[table],db.Table): if tab