[web2py] Invalid Query when trying to export a CVS file

2012-07-01 Thread Yannick
Hello mate,

I'm trying to export a CVS file and I have an error message in the screen 
saying:

invalid query : current transaction is aborted, commands ignored until end 
of transaction block

Any idea why ?

Thanks


[web2py] Connection with DB not Working... Help!

2012-07-01 Thread Yannick
Hello Mate,

I can't seems to connect to my DB postgres from my application in  a linux 
box... Here is the error message I have:

File "/home/www-data/web2py/gluon/dal.py", line 3665, in __init__
raise RuntimeError, "Failure to connect, tried 5 times:\n%s" % error
RuntimeError: Failure to connect, tried 5 times:
could not connect to server: Connection refused
Is the server running on host "localhost" and accepting
TCP/IP connections on port 5432?


Please let me know if you have any idea why... 

Thanks




[web2py] Re: Image Optimization

2012-06-28 Thread Yannick
Used the PIL API to do this

On Tuesday, June 26, 2012 6:49:43 AM UTC-4, Sanjeet Roy wrote:
>
> Can anyone tell me how can i optimize the image when the user will be 
> uploaded ? Acually i want to create a web application where the user can 
> upload and see the image on the categorization of album.i want optimize 
> image should be appeared in the thumbnail 
>


[web2py] Re: login form errors

2011-11-08 Thread Yannick
Not sure if I understand your issue. Have you set up the session.flash
in your controller and the value of it is not showing off ?  Are you
doing a redirect when the login failed ?

Maybe if you show us a sample of your code we may have a better
understanding of your issue.

Cheers,

On Nov 8, 11:14 am, Matt  wrote:
> Greetings,
> We are currently experiencing an issue with invalid logins not showing
> errors. For auth we are using a combination of basic auth and PAM, and
> the actual controller/view combo for the login form is basically the
> same as the generated scaffolding. When an invalid username/password
> is entered the page simply reloads without any indication of what the
> error was. I tried to display the flash (we are not currently using
> the session flash, so this had to be added to this page) and that has
> no info in it, I have also tried to display auth.login_form()'s
> errors, which do not exist either. Is there some way to get this
> information?
>
> Thank you,
> Matt


[web2py] Re: help with complex model creation

2011-11-08 Thread Yannick
Hello,
Im not sure if I fully understand your example but I believe that the
relation:
"Contruction and Company" is a many to many relationship so you just
need to have a third table in the middle

Construction <---> Reference <> Company
and Reference is a third table that keep track of the company ID and
Contruction ID

I hope it helps.

Cheers,

On Nov 8, 1:18 pm, demetrio  wrote:
> Hi everyone,
>
> i'm starting a new project with web2py, and now i'm defining the model
> of the app and i have some questions.
>
> the "classical" and simplified model (there are lots of tables but the
> questions are about those)  is something like:
>
> Table 'companies'
>   - id_company
>   - name
>   - 
>
> Table 'guild'
>   - id_guild
>   - name
>   - 
>
> Table 'construction' (i don't really know if "construction" is the
> correct english word for this example, or maybe "building_lot")
>   - id_construction
>   - name
>   - 
>
> And now I have to make the relations. In this case one companies can
> have many guilds (i.e: the company 'company1' owns to the 'painters'
> guild and the 'doors' guild). This relation would be easy in web2py
> with a list:reference.
>
> But the case is that in a building lot, can have one company working
> with an specific guild, and in other building lot, the same company
> working with another guild.
>
> For example:
>    In the construction "A" of 5 apartments, the company "company1"
> only works installing windows.
>    In the construction "B" of 20 apartments, the company "company1"
> only works painting the walls.
>
> In a classic table_has_table model, I could have this:
>
> Table "company_has_guild":
>   - id_company_has_guild
>   - id_company
>   - id_guild
>
> And:
>
> Table "construction_has_company_has_guild" (and at this moment don't
> know if this is the best way to make this relation...)
>   - id_construction
>   - id_company_has_guild
>
> As I have mentioned before, the first relation (company_has_guilds)
> with web2py would be easy:
>
> db.define_table("guilds",
>    Field("name", "string")
>    )
>
> db.define_table("company",
>    Field("name", "string"),
>    Field("guilds", "list:reference guilds")
>    )
>
> Any suggestions about the creation of the second relation
> (construction_has_company_has_guild)? Or I have to create the
> "classic" table_has_table model? In this case, there is some efficient
> way to make it in web2py?
>
> Thanks in advance!
> Daniel


[web2py] Re: Re-Launch a Better version www.beunick.com

2011-09-09 Thread Yannick
Thanks.
What do you mean by UI tool ? like the software dev tool or
programming tool ?
Well the front-end logic is developed using jquery 99% Hehe...
I hope I answer your question.

Cheers,
Yannick P.

On Sep 9, 1:26 pm, mikech  wrote:
> Looks good, also interesting idea.  Could I ask what UI tool you used?


[web2py] Re: Re-Launch a Better version www.beunick.com

2011-09-09 Thread Yannick
Thanks for the note.

Well you read it this way (Be-Unique).
The initial name was bUnik but the domain was already taken.

Thats why we took BeUnick (Be Unique)... ;)

Yannick P.

On Sep 9, 12:15 pm, VP  wrote:
> On Sep 8, 5:10 pm, pbreit  wrote:
>
> > Looks nice. "beunick" is a bit of a strange name. The first thing I think of
> > is "eunuch" which is not the most pleasant thought.
>
> Seriously, this is a huge problem.  The owner(s) should change that
> name.


[web2py] Re-Launch a Better version www.beunick.com

2011-09-08 Thread Yannick
Beunick App sitting on top of Web2py has a new version.

Thanks to Massimo for this great Web2py Tool.

Check it out on:   http://www.beunick.com

Drop us some feedback if you can.

Cheers,
Yannick P.


[web2py] Re: web2py received 2011 BOSSIE Award by InfoWorld.com

2011-09-08 Thread Yannick
I'm Happy Congrat!

On Sep 7, 10:59 pm, wwwgong  wrote:
> Congratulations!
>
> more details from 
> here:http://www.infoworld.com/d/open-source-software/bossie-awards-2011-th...


[web2py] Re: Where to put the .htaccess file

2011-08-11 Thread Yannick
I found the solution:

I put the ".htaccess" file in the "/home/www-data" directory and then
I remove the "/$1" in the URL link inside the command... here is the
command inside the ".htaccess" file.

RewriteEngine on
RewriteCond %{HTTP_HOST} !^www.mywebsite.com
RewriteRule (.*) http://www.mywebsite.com [R=301,L]

Cheers,
Yannick P.

On Aug 11, 12:08 pm, Yannick  wrote:
> hi mate,
> I put the .htaccess file in "/home/www-data/" directory in the same
> directory as web2py dir. Now it seems to work. When i type the URL the
> WWW is added in front of it like i wanted BUT the new issue is the
> following:
>
> when i type mywebsite.com it gets redirect 
> towww.mywebsite.com/web2py/wsgihandler.py/
>
> I wonder and don't understand why it goes to "/web2py/
> wsgihandler.py/" ??
>
> Please help it you know
> Yannick P.


[web2py] Re: Where to put the .htaccess file

2011-08-11 Thread Yannick
hi mate,
I put the .htaccess file in "/home/www-data/" directory in the same
directory as web2py dir. Now it seems to work. When i type the URL the
WWW is added in front of it like i wanted BUT the new issue is the
following:

when i type mywebsite.com it gets redirect to 
www.mywebsite.com/web2py/wsgihandler.py/

I wonder and don't understand why it goes to "/web2py/
wsgihandler.py/" ??

Please help it you know
Yannick P.


[web2py] Re: Where to put the .htaccess file

2011-08-07 Thread yannick Tchatchoua
Actually I don't want Web2py to handle .htaccess file permission. What I
want is to force the url to use "www" and I modify .htaccess file, my
problem is I don't know where to put the file ? Can you point me out where I
can put that file.
If no can you tell me how I can resolve that issue ?

Thanks.
Cheers,
Yannick P.

On Sun, Aug 7, 2011 at 6:28 PM, Massimo Di Pierro
wrote:

> Why? Do you want the web2py app to handle htaccess permissions?
> Before you do that try look into this instead
>  scripts/access.wsgi
>
> Massimo
>
> On Aug 7, 2011, at 1:18 PM, Yannick wrote:
>
> > Hello mate,
> > I want to force "www" in front of the url and i modify the .htaccess
> > file to do so and now I wonder where to put that file. I tried to put
> > it in the "web2py/apps" directory, in the "web2py/apps/views"
> > directory, in the "web2py/" directory but none of them works.
> > I'm using apache as webserver.
> >
> > Please let me know if you have any idea.
> >
> > Thanks
>
>


[web2py] Re: Where to put the .htaccess file

2011-08-07 Thread Yannick
Thanks for the reply.
Here is the code I use to force "www" in the .htaccess file:

RewriteEngine on
RewriteCond %{HTTP_HOST} !^www.mywebsite.com
RewriteRule (.*) http://www.mywebsite.com/$1 [R=301,L]

Well I tried to put the same code in httpd.conf file but it doesn't
work, I have a "Syntax Error" when restarting apache because the
command "RewriteEngine " is not recognized.

Don't know how to force the "www" with web2py.


On Aug 7, 2:24 pm, Kenneth Lundström 
wrote:
>  > I want to force "www" in front of the url and i modify the .htaccess
> file to do so and now I wonder where to put that file. I tried to put it
> in the "web2py/apps" directory, in the "web2py/apps/views" directory, in
> the "web2py/" directory but none of them works. I'm using apache as
> webserver. Please let me know if you have any idea. Thanks
>
> I think you have to put everything in either httpd.conf or then in the
> virtual conf file you maybe have for every domain name. As wsgi is
> proably used .htaccess is not read.
>
> This is how I have understood it, maybe I m totally wrong.
>
> Kenneth


[web2py] Where to put the .htaccess file

2011-08-07 Thread Yannick
Hello mate,
 I want to force "www" in front of the url and i modify the .htaccess
file to do so and now I wonder where to put that file. I tried to put
it in the "web2py/apps" directory, in the "web2py/apps/views"
directory, in the "web2py/" directory but none of them works.
I'm using apache as webserver.

Please let me know if you have any idea.

Thanks


[web2py] Where to put the .htaccess file

2011-08-07 Thread Yannick
Hello mate,
 I want to force "www" in front of the url and i modify the .htaccess
file to do so and now I wonder where to put that file. I tried to put
it in the "web2py/apps" directory, in the "web2py/apps/views"
directory, in the "web2py/" directory but none of them works.
I'm using apache as webserver.

Please let me know if you have any idea.

Thanks


[web2py] No CallBack (Onaccept) When using facebook or Twitter Connect for loging.

2011-07-20 Thread Yannick
Hello Mate,

When using Facebook Connect for login purpose there is no
Callback(onaccept) method that Web2py can call and execute right after
the user login to the application. The Callback is only available for
Web2Py Auth.

I was wondering why that Web2py limitation ?

>From the application level I can find a work around this by updating a
table in the DB but I was wondering if you have another work around at
the Framework (Web2py) level without changing the tools.py code.

Cheers,
Yannick P.


[web2py] My First Application on Web2py is Now Live.... www.beunick.com

2011-04-07 Thread Yannick
It All start with WEB2PY... (Big thanks to Massimo)

I just launch my first beta release of my application.

Check it out at http://www.beunick.com

Please request an invite key if you want to give it a try.

Cheers and thanks in advance for your feedback


Yannick P.


[web2py] Very Bad Error Experience...

2011-03-28 Thread Yannick
Hello Mate,

On my LIVE production server (Hosting Server), from the admin console
I tried to upgrade the web2py server by clicking on the button
"Upgrade Now" and I got the confirmation interface and clicked "YES"
and then I got this error page.
"  Internal error
Ticket issued: admin/THE_IP_ADRESS.2011-03-29.04-46-55.a53e34e7-
eb45-43ec-b7fe-d8404c10ce11"

When I clicked on the link I have another ticket error and so on... I
can't see the error from the browser... I don't have access to the
admin page anymore because of that error.

So I FTP to the directory .../applicaitons/admin/errors/  and manually
open the error file and here it is what it shown...

<<
.. line 188, in restricted\n exec ccode in environment\n
   File "/home/www-data/web2py/applications/admin/controllers/
default.py",
line 4, in \n from gluon.fileutils import abspath\nImportError:
cannot import name abspath\n' p571 s.

>>

I have no idea how to solve this problem without damaging my
application... I don't have access to the admin console...

Please any help is needed...
Yannick P.


[web2py] Re: IS_NOT_IN_DB () Bypass the capital letters during validation

2011-03-08 Thread Yannick
Oh cool thanks... Haven't think about that. Thanks

On Mar 7, 5:40 am, Bernd Rothert  wrote:
> Hi Yannick,
>
> On 6 Mrz., 20:07, Yannick  wrote:
>
> > Hello mate,
>
> > A value is saved in the DB as lower case and we put this validation
> > "IS_NOT_IN_DB()". If for that field the user enter a Capital letter of
> > the same value saved the application will validate the entry.
>
> > This is not really good. Is there a way to avoid this in Web2py
> > without a need to build a customize validation method ?
>
> not exactly - but you can chain validators and use something as simple
> as:
>
> db.person.name.requires= [
>     lambda s: (s and s.lower(), None),
>     IS_NOT_IN_DB(db, db.person.name),
>     ]
>
> > Please let me know if you have an idea.
>
> > Cheers,
>
> Cheers
> Bernd


[web2py] IS_NOT_IN_DB () Bypass the capital letters during validation

2011-03-06 Thread Yannick
Hello mate,

A value is saved in the DB as lower case and we put this validation
"IS_NOT_IN_DB()". If for that field the user enter a Capital letter of
the same value saved the application will validate the entry.

This is not really good. Is there a way to avoid this in Web2py
without a need to build a customize validation method ?

Please let me know if you have an idea.

Cheers,


[web2py] IS_NOT_IN_DB () Mypass the capital letter

2011-03-06 Thread Yannick
Hello mate,

A value is saved in the DB as lower case and we put this validation
"IS_NOT_IN_DB()". If for that field the user enter a Capital letter of
the same value saved the application will validate the entry.

This is not really good. Is there a way to avoid this in Web2py
without a need to build a customize validation method ?

Please let me know if you have an idea.

Cheers,


[web2py] Re: Is it a good idea to keep auth_user minimal?

2011-02-15 Thread Yannick
Right you can used writable/readable = false so that you can only
display fields you want user to update and from your server side you
can update the other field as you want... If you want to show the
other field later in other pages for example "Setting Pages" you can
do so...

I did add more field on the table "auth_user" but remember it is good
design to keep data consistent.

On Feb 14, 10:16 pm, Panupat  wrote:
> Thanks howsec.
>
> So if I want only a certain field to show up during registration, I
> mark the ones I want to hide with writable/readable = False right?
> Will doing so also prevent those field from editing later on?
>
> On Feb 15, 8:10 am, howesc  wrote:
>
>
>
>
>
>
>
> > i think someone asked a similar question on this group recently, and there
> > were some good opinions in that response thread if you can find it.
>
> > short answer (in my opinion): it depends on the database and your style.  on
> > GAE since you can't do joins i put all the info on the auth_user table.  on
> > mysql or postgres i tend to have a mixture that somewhat depends on the
> > quantity of information.  i also have grown to have no fear of adding
> > columns to auth_user.
>
> > cfh


[web2py] Little Error in the Online book - Chapter 11 - http://web2py.com/book/default/chapter/11

2010-10-21 Thread Yannick
In the Memcached section of chapter 11 it said.

1. from gluon.contrib.memcache import MemcacheClient
2. memcache_servers = ['127.0.0.1:11211']
3. cache.memcache = MemcacheClient(request, memcache_servers)
4. cache.ram = cache.disk = cache.memcache
...
...
The third line redefines cache.ram and cache.disk in terms of
memcache. (Which is not the case)

Thats the fourth line which redefines cache.ram and cache.disk not the
third. the Third defines the cache.memcache...

Thanks,
Yannick P.



[web2py] Re: Retrieve Password Issue ????

2010-09-30 Thread Yannick
Yes with the same setting in  model.
But I just tried something I create a brand new function in the
controller like:

def TestSendPassword():
auth.messages.retrieve_password = 'Allo Issue with ur pwd.'
return dict(forgotPwdForm =
auth.retrieve_password(next="testlogin"))

SO I did not create any view name "TestSendPassword.html". I Access it
using the default web2py view which is generated when pointing to
http://IPAddress/App/COntroller/TestSendPassword

And it works No issue the email is sent. I guess now the problem for
some reason is coming from my view. don't know why but I'll
investigate.

Thanks for your help.
Yannick P.


On Sep 30, 10:04 pm, mdipierro  wrote:
> and you do have the same settings in model?
>
> On Sep 30, 8:17 pm, Yannick  wrote:
>
>
>
> > Thanks for the note. I can send email from my application. Welcome
> > registration email and other email without any problem.
>
> > I did try what you just asked and I got an error : NameError: name
> > 'mail' is not defined
>
> > So here is what i did from command line:
> > python web2py.py -S yourapp -M
>
> > >>> mail=Mail()
> > >>> mail.settings.server = 'smtp.gmail.com:587'
> > >>> mail.settings.sender = 'nore...@blalal.com'
> > >>> mail.settings.login =  '.@gmail.com:password'
> > >>> print mail.send(to=...@address.com', message='Hi there')
>
> > the output is : True
>
> > And yes i received an email. I don't have any issue receiving email
> > but for some reason my application can't retrieve password and send
> > it...
>
> > Very weird I don't know what else to try.
>
> > Please let me know if you have something crossing your mind.
>
> > Thanks
>
> > On Sep 30, 12:16 am, mdipierro  wrote:
>
> > > try this...
>
> > > python web2py.py -S yourapp -M
>
> > > >>> print mail.send(to='@youraddress.com',message='Hi there')
>
> > > do you get the email?
> > > what does it print True or False?
>
> > > I think mail is not setup properly.
>
> > > Massimo
>
> > > On Sep 29, 11:13 pm, Yannick  wrote:
>
> > > > Yes I also tried quickly and I just retry again
> > > > request_reset_password. No success, No error message generated.
>
> > > > What do you mean my getting email on registration ? Are you talking
> > > > about getting email confirmation when user register ?
> > > > If that's what you meant the answer is NO.
>
> > > > So basically the request_reset_password and retrieve_password doesn't
> > > > work.
>
> > > > Please let me know if you have any other idea.
>
> > > > Thanks,
>
> > > > On Sep 29, 11:43 pm, mdipierro  wrote:
>
> > > > > Do you have an error or traceback?
>
> > > > > Anyway, for security reasons you should call
>
> > > > > request_reset_password
>
> > > > > instead of
>
> > > > > retrieve_password which is deprecated because of security issues.
>
> > > > > Anyway, do you get email on registration?
>
> > > > > On Sep 29, 10:30 pm, Yannick  wrote:
>
> > > > > > Thanks for the note. I added 'registration_id' and [CRYPT()] but No
> > > > > > luck still failing to send the password.
> > > > > > The form validation fails in the method reset_password_deprecated()
> > > > > > inside Tools.py
>
> > > > > > This is weird...
>
> > > > > > On Sep 29, 9:28 am, mdipierro  wrote:
>
> > > > > > > The only issues I see are [CRYPT()] instead of crypt and
> > > > > > > 'registration_id' field is missing (but it should be optional).
> > > > > > > Anyway, try this
> > > > > > > db.define_table(
> > > > > > >               auth.settings.table_user_name,
> > > > > > >               Field('fullname', length=250, default=''),
> > > > > > >               Field('email', length=128,default=''),
> > > > > > > db.Field('creationTime',type='datetime',default=now,writable=False),
> > > > > > >               Field('password', 'password',
> > > > > > > readable=False,label='Password', requires=[CRYPT()]),
> >

[web2py] Re: Retrieve Password Issue ????

2010-09-30 Thread Yannick
Thanks for the note. I can send email from my application. Welcome
registration email and other email without any problem.

I did try what you just asked and I got an error : NameError: name
'mail' is not defined

So here is what i did from command line:
python web2py.py -S yourapp -M
>>> mail=Mail()
>>> mail.settings.server = 'smtp.gmail.com:587'
>>> mail.settings.sender = 'nore...@blalal.com'
>>> mail.settings.login =  '.@gmail.com:password'
>>> print mail.send(to='m...@address.com', message='Hi there')

the output is : True

And yes i received an email. I don't have any issue receiving email
but for some reason my application can't retrieve password and send
it...

Very weird I don't know what else to try.

Please let me know if you have something crossing your mind.

Thanks




On Sep 30, 12:16 am, mdipierro  wrote:
> try this...
>
> python web2py.py -S yourapp -M
>
> >>> print mail.send(to='@youraddress.com',message='Hi there')
>
> do you get the email?
> what does it print True or False?
>
> I think mail is not setup properly.
>
> Massimo
>
> On Sep 29, 11:13 pm, Yannick  wrote:
>
>
>
> > Yes I also tried quickly and I just retry again
> > request_reset_password. No success, No error message generated.
>
> > What do you mean my getting email on registration ? Are you talking
> > about getting email confirmation when user register ?
> > If that's what you meant the answer is NO.
>
> > So basically the request_reset_password and retrieve_password doesn't
> > work.
>
> > Please let me know if you have any other idea.
>
> > Thanks,
>
> > On Sep 29, 11:43 pm, mdipierro  wrote:
>
> > > Do you have an error or traceback?
>
> > > Anyway, for security reasons you should call
>
> > > request_reset_password
>
> > > instead of
>
> > > retrieve_password which is deprecated because of security issues.
>
> > > Anyway, do you get email on registration?
>
> > > On Sep 29, 10:30 pm, Yannick  wrote:
>
> > > > Thanks for the note. I added 'registration_id' and [CRYPT()] but No
> > > > luck still failing to send the password.
> > > > The form validation fails in the method reset_password_deprecated()
> > > > inside Tools.py
>
> > > > This is weird...
>
> > > > On Sep 29, 9:28 am, mdipierro  wrote:
>
> > > > > The only issues I see are [CRYPT()] instead of crypt and
> > > > > 'registration_id' field is missing (but it should be optional).
> > > > > Anyway, try this
> > > > > db.define_table(
> > > > >               auth.settings.table_user_name,
> > > > >               Field('fullname', length=250, default=''),
> > > > >               Field('email', length=128,default=''),
> > > > > db.Field('creationTime',type='datetime',default=now,writable=False),
> > > > >               Field('password', 'password',
> > > > > readable=False,label='Password', requires=[CRYPT()]),
> > > > >               Field('registration_key', length=128,
> > > > > writable=False,
> > > > > readable=False,default=''),
> > > > >               Field('registration_id', length=128,
> > > > > writable=False,
> > > > > readable=False,default=''),
> > > > >               Field('reset_password_key', length=128, default=
> > > > > '',writable=False, readable=False),
> > > > >               migrate=True)
>
> > > > > Any change? I do not think anything has changed in web2py that should
> > > > > affect behavior here.
>
> > > > > On Sep 28, 11:53 pm, Yannick  wrote:
>
> > > > > > Hello mate,
> > > > > > I wonder if any one has the same issue with the retrieve_password()
> > > > > > in
> > > > > > tools.
>
> > > > > > #Here is the controllers:
> > > > > > def forgotPassword():
> > > > > >     return dict(forgotPwdForm = auth.retrieve_password())
>
> > > > > > # Here is the view "forgotPassword.html"
> > > > > > Forgot Your Password ? Please enter your email
> > > > > >   {{=forgotPwdForm}}
>
> > > > &

[web2py] Re: Retrieve Password Issue ????

2010-09-29 Thread Yannick

Yes I also tried quickly and I just retry again
request_reset_password. No success, No error message generated.

What do you mean my getting email on registration ? Are you talking
about getting email confirmation when user register ?
If that's what you meant the answer is NO.

So basically the request_reset_password and retrieve_password doesn't
work.

Please let me know if you have any other idea.

Thanks,

On Sep 29, 11:43 pm, mdipierro  wrote:
> Do you have an error or traceback?
>
> Anyway, for security reasons you should call
>
> request_reset_password
>
> instead of
>
> retrieve_password which is deprecated because of security issues.
>
> Anyway, do you get email on registration?
>
> On Sep 29, 10:30 pm, Yannick  wrote:
>
>
>
> > Thanks for the note. I added 'registration_id' and [CRYPT()] but No
> > luck still failing to send the password.
> > The form validation fails in the method reset_password_deprecated()
> > inside Tools.py
>
> > This is weird...
>
> > On Sep 29, 9:28 am, mdipierro  wrote:
>
> > > The only issues I see are [CRYPT()] instead of crypt and
> > > 'registration_id' field is missing (but it should be optional).
> > > Anyway, try this
> > > db.define_table(
> > >               auth.settings.table_user_name,
> > >               Field('fullname', length=250, default=''),
> > >               Field('email', length=128,default=''),
> > > db.Field('creationTime',type='datetime',default=now,writable=False),
> > >               Field('password', 'password',
> > > readable=False,label='Password', requires=[CRYPT()]),
> > >               Field('registration_key', length=128,
> > > writable=False,
> > > readable=False,default=''),
> > >               Field('registration_id', length=128,
> > > writable=False,
> > > readable=False,default=''),
> > >               Field('reset_password_key', length=128, default=
> > > '',writable=False, readable=False),
> > >               migrate=True)
>
> > > Any change? I do not think anything has changed in web2py that should
> > > affect behavior here.
>
> > > On Sep 28, 11:53 pm, Yannick  wrote:
>
> > > > Hello mate,
> > > > I wonder if any one has the same issue with the retrieve_password()
> > > > in
> > > > tools.
>
> > > > #Here is the controllers:
> > > > def forgotPassword():
> > > >     return dict(forgotPwdForm = auth.retrieve_password())
>
> > > > # Here is the view "forgotPassword.html"
> > > > Forgot Your Password ? Please enter your email
> > > >   {{=forgotPwdForm}}
>
> > > > # Here is the model
> > > > ...
> > > > auth.settings.mailer=mail
> > > > ...
> > > > auth.settings.table_user = db.define_table(
> > > >               auth.settings.table_user_name,
> > > >               db.Field('fullname', length=250, default=''),
> > > >               db.Field('email', length=128,default=''),
> > > > db.Field('creationTime',type='datetime',default=now,writable=False),
> > > >               db.Field('password', 'password',
> > > > readable=False,label='Password', requires=CRYPT()),
> > > >               db.Field('registration_key', length=128,
> > > > writable=False,
> > > > readable=False,default=''),
> > > >               db.Field('reset_password_key', length=128, default=
> > > > '',writable=False, readable=False),
> > > >               migrate=True)
>
> > > > From the view when the user enter the email, nothing really happen,
> > > > no
> > > > error message. The email is not sent... The Form validation in the
> > > > Tools.py fails.
>
> > > > I'm using Web2py Version 1.83.2
> > > > Please let me know if you have any idea... This code used to work
> > > > with
> > > > previous version of Web2py...Thanks,
> > > > Thanks


[web2py] Re: Retrieve Password Issue ????

2010-09-29 Thread Yannick
Thanks for the note. I added 'registration_id' and [CRYPT()] but No
luck still failing to send the password.
The form validation fails in the method reset_password_deprecated()
inside Tools.py

This is weird...


On Sep 29, 9:28 am, mdipierro  wrote:
> The only issues I see are [CRYPT()] instead of crypt and
> 'registration_id' field is missing (but it should be optional).
> Anyway, try this
> db.define_table(
>               auth.settings.table_user_name,
>               Field('fullname', length=250, default=''),
>               Field('email', length=128,default=''),
> db.Field('creationTime',type='datetime',default=now,writable=False),
>               Field('password', 'password',
> readable=False,label='Password', requires=[CRYPT()]),
>               Field('registration_key', length=128,
> writable=False,
> readable=False,default=''),
>               Field('registration_id', length=128,
> writable=False,
> readable=False,default=''),
>               Field('reset_password_key', length=128, default=
> '',writable=False, readable=False),
>               migrate=True)
>
> Any change? I do not think anything has changed in web2py that should
> affect behavior here.
>
> On Sep 28, 11:53 pm, Yannick  wrote:
>
>
>
> > Hello mate,
> > I wonder if any one has the same issue with the retrieve_password()
> > in
> > tools.
>
> > #Here is the controllers:
> > def forgotPassword():
> >     return dict(forgotPwdForm = auth.retrieve_password())
>
> > # Here is the view "forgotPassword.html"
> > Forgot Your Password ? Please enter your email
> >   {{=forgotPwdForm}}
>
> > # Here is the model
> > ...
> > auth.settings.mailer=mail
> > ...
> > auth.settings.table_user = db.define_table(
> >               auth.settings.table_user_name,
> >               db.Field('fullname', length=250, default=''),
> >               db.Field('email', length=128,default=''),
> > db.Field('creationTime',type='datetime',default=now,writable=False),
> >               db.Field('password', 'password',
> > readable=False,label='Password', requires=CRYPT()),
> >               db.Field('registration_key', length=128,
> > writable=False,
> > readable=False,default=''),
> >               db.Field('reset_password_key', length=128, default=
> > '',writable=False, readable=False),
> >               migrate=True)
>
> > From the view when the user enter the email, nothing really happen,
> > no
> > error message. The email is not sent... The Form validation in the
> > Tools.py fails.
>
> > I'm using Web2py Version 1.83.2
> > Please let me know if you have any idea... This code used to work
> > with
> > previous version of Web2py...Thanks,
> > Thanks


[web2py] Re: VPS.net With Web2py.... Unable to install Application

2010-09-28 Thread Yannick
Thousand thanks. yes this latest solution help. I can now create and
upload new application from admin page. Thanks

By the way after the installation how can I change the web2py admin
password ? Which command should I use for that ?

Thanks,
Yannick P.

On Sep 28, 12:50 am, mdipierro  wrote:
> those files contain your admin password. I would backup and put them
> back after reinstalling web2py.
>
> On Sep 27, 11:40 pm, Yannick  wrote:
>
>
>
> > Ok thanks I'll try this... but before I do so what did you mean by
> > "paramaters_*.py" you want me to back-up that file or completely
> > remove everything under /home/www-data/web2py and unzip web2py as www-
> > data user ???
> > Please let me know I'm a little bit confuse.
> > Thanks
>
> > On Sep 27, 11:35 pm, mdipierro  wrote:
>
> > > Just delete everything under /home/www-data/web2py but paramaters_*.py
> > > and unzip web2py again over is as www-data user.
>
> > > On Sep 27, 10:12 pm, Yannick  wrote:
>
> > > > I followed the instruction 
> > > > here:http://groups.google.com/group/web2py/browse_thread/thread/7f0d6ecddf..
> > > > which are:
> > > > Step 1 - Shutdown apache
> > > > Step 2 - Become www-data user
> > > > Step 3 - Start web2py from terminal cmd
> > > > Step 4 - Kill web2py (ctl + z)
> > > > Step 5 - Restart Apache
>
> > > > And on step 2- I had a permission issue : IOError: [Errno 13]
> > > > Permission denied: '/home/www-data/web2py/applications/admin/cron/
> > > > cron.master'
>
> > > > So I did step 2 as a root user.  and did step 4 and 5...
>
> > > > Now I'm able to create a new application but I CAN'T upload an
> > > > existing application. It's very weird I really don't know what's going
> > > > on...
> > > > Maybe I'll just delete my current VPS and just create a brand new VPS
> > > > from scratch hopefully I won't have the same issue... I don't know
> > > > what else to tried.
>
> > > > Thanks,
> > > > Yannick P.
>
> > > > On Sep 24, 9:08 am, Yannick  wrote:
>
> > > > > Hello Chris,
> > > > > Thanks for the note and suggestions: Yes did reboot Apache and
> > > > > Web2py...
>
> > > > > Here is the result of the command I run in web2py dir:
>
> > > > > drwxr-xr-x 6 www-data www-data  4096 2010-09-22 04:15 applications
>
> > > > > From the command it seems that the owner do have permision to read and
> > > > > writehumm...Please let me know if you have any idea since I'm
> > > > > still not able to upload app from admin. I upload them from sftp...
>
> > > > > Thanks,
> > > > > Yannick P.
>
> > > > > On Sep 24, 8:11 am, Christopher Steel  wrote:
>
> > > > > > Yannick,
>
> > > > > > Hi Yannick,
>
> > > > > > As I mentioned before this sounds lot like a permissions issue. If 
> > > > > > you
> > > > > > could include the output of the following command when run from the
> > > > > > web2py directory on your server it could be very helpful.
>
> > > > > >     ls -al | grep applications
>
> > > > > > Where you able to restart Apache and web2py?
>
> > > > > > Cheers,
>
> > > > > > Chris
>
> > > > > > On Sep 23, 11:05 am, Yannick  wrote:
>
> > > > > > > Hello Scausten,
> > > > > > > I wonder were you able to upload an application from the web2py 
> > > > > > > admin
> > > > > > > page after your installation ? For some reason I can't upload any
> > > > > > > application. I still have that message saying "Unable to install
> > > > > > > application..." even after I restart web2py etc...
>
> > > > > > > Please let me know.
>
> > > > > > > Thanks,
> > > > > > > Yannick P.
>
> > > > > > > On Sep 23, 9:19 am, scausten  wrote:> Don't 
> > > > > > > worry, I was doing something extraordinarily stupid - the script
> > > > > > > > is fine.
>
> > > > > > > > On Sep 23, 2:05 pm, mdipierro  wrote:
>
> > > > > > > > > I do not see anything wrong with line 4
>
> > > &

[web2py] Retrieve Password Issue ????

2010-09-28 Thread Yannick
Hello mate,
I wonder if any one has the same issue with the retrieve_password()
in
tools.

#Here is the controllers:
def forgotPassword():
return dict(forgotPwdForm = auth.retrieve_password())

# Here is the view "forgotPassword.html"
Forgot Your Password ? Please enter your email
  {{=forgotPwdForm}}

# Here is the model
...
auth.settings.mailer=mail
...
auth.settings.table_user = db.define_table(
  auth.settings.table_user_name,
  db.Field('fullname', length=250, default=''),
  db.Field('email', length=128,default=''),
db.Field('creationTime',type='datetime',default=now,writable=False),
  db.Field('password', 'password',
readable=False,label='Password', requires=CRYPT()),
  db.Field('registration_key', length=128,
writable=False,
readable=False,default=''),
  db.Field('reset_password_key', length=128, default=
'',writable=False, readable=False),
  migrate=True)



>From the view when the user enter the email, nothing really happen,
no
error message. The email is not sent... The Form validation in the
Tools.py fails.

I'm using Web2py Version 1.83.2
Please let me know if you have any idea... This code used to work
with
previous version of Web2py...Thanks,
Thanks


[web2py] Re: VPS.net With Web2py.... Unable to install Application

2010-09-27 Thread Yannick
Ok thanks I'll try this... but before I do so what did you mean by
"paramaters_*.py" you want me to back-up that file or completely
remove everything under /home/www-data/web2py and unzip web2py as www-
data user ???
Please let me know I'm a little bit confuse.
Thanks

On Sep 27, 11:35 pm, mdipierro  wrote:
> Just delete everything under /home/www-data/web2py but paramaters_*.py
> and unzip web2py again over is as www-data user.
>
> On Sep 27, 10:12 pm, Yannick  wrote:
>
>
>
> > I followed the instruction 
> > here:http://groups.google.com/group/web2py/browse_thread/thread/7f0d6ecddf..
> > which are:
> > Step 1 - Shutdown apache
> > Step 2 - Become www-data user
> > Step 3 - Start web2py from terminal cmd
> > Step 4 - Kill web2py (ctl + z)
> > Step 5 - Restart Apache
>
> > And on step 2- I had a permission issue : IOError: [Errno 13]
> > Permission denied: '/home/www-data/web2py/applications/admin/cron/
> > cron.master'
>
> > So I did step 2 as a root user.  and did step 4 and 5...
>
> > Now I'm able to create a new application but I CAN'T upload an
> > existing application. It's very weird I really don't know what's going
> > on...
> > Maybe I'll just delete my current VPS and just create a brand new VPS
> > from scratch hopefully I won't have the same issue... I don't know
> > what else to tried.
>
> > Thanks,
> > Yannick P.
>
> > On Sep 24, 9:08 am, Yannick  wrote:
>
> > > Hello Chris,
> > > Thanks for the note and suggestions: Yes did reboot Apache and
> > > Web2py...
>
> > > Here is the result of the command I run in web2py dir:
>
> > > drwxr-xr-x 6 www-data www-data  4096 2010-09-22 04:15 applications
>
> > > From the command it seems that the owner do have permision to read and
> > > writehumm...Please let me know if you have any idea since I'm
> > > still not able to upload app from admin. I upload them from sftp...
>
> > > Thanks,
> > > Yannick P.
>
> > > On Sep 24, 8:11 am, Christopher Steel  wrote:
>
> > > > Yannick,
>
> > > > Hi Yannick,
>
> > > > As I mentioned before this sounds lot like a permissions issue. If you
> > > > could include the output of the following command when run from the
> > > > web2py directory on your server it could be very helpful.
>
> > > >     ls -al | grep applications
>
> > > > Where you able to restart Apache and web2py?
>
> > > > Cheers,
>
> > > > Chris
>
> > > > On Sep 23, 11:05 am, Yannick  wrote:
>
> > > > > Hello Scausten,
> > > > > I wonder were you able to upload an application from the web2py admin
> > > > > page after your installation ? For some reason I can't upload any
> > > > > application. I still have that message saying "Unable to install
> > > > > application..." even after I restart web2py etc...
>
> > > > > Please let me know.
>
> > > > > Thanks,
> > > > > Yannick P.
>
> > > > > On Sep 23, 9:19 am, scausten  wrote:> Don't 
> > > > > worry, I was doing something extraordinarily stupid - the script
> > > > > > is fine.
>
> > > > > > On Sep 23, 2:05 pm, mdipierro  wrote:
>
> > > > > > > I do not see anything wrong with line 4
>
> > > > > > > On Sep 23, 5:25 am, scausten  wrote:
>
> > > > > > > > Hi Massimo,
>
> > > > > > > > I've tried to install web2py on vps.net today and I'm getting 
> > > > > > > > the
> > > > > > > > following error message:
>
> > > > > > > > ./setup-web2py-ubuntu.sh: line 4: syntax error near unexpected 
> > > > > > > > token
> > > > > > > > `newline'
>
> > > > > > > > Could you have a look at it please?
>
> > > > > > > > On Sep 23, 4:36 am, mdipierro  wrote:
>
> > > > > > > > > yes this should do it
>
> > > > > > > > > sudo /etc/init.d/apache2 restart
>
> > > > > > > > > I do know why you cannot write on that folder.
>
> > > > > > > > > On Sep 22, 10:14 pm, Yannick  wrote:
>
> > > > > > > > > > Thanks for the note.
> > > > > > > > > >

[web2py] Re: VPS.net With Web2py.... Unable to install Application

2010-09-27 Thread Yannick

I followed the instruction here:
http://groups.google.com/group/web2py/browse_thread/thread/7f0d6ecddf40c6f/2c19fbeffc30bb27?lnk=gst&q=VPS#2c19fbeffc30bb27
http://www.vps.net/forum/public-forums/tutorials-and-how-tos/2115-web2py-on-vps-net
which are:
Step 1 - Shutdown apache
Step 2 - Become www-data user
Step 3 - Start web2py from terminal cmd
Step 4 - Kill web2py (ctl + z)
Step 5 - Restart Apache

And on step 2- I had a permission issue : IOError: [Errno 13]
Permission denied: '/home/www-data/web2py/applications/admin/cron/
cron.master'

So I did step 2 as a root user.  and did step 4 and 5...

Now I'm able to create a new application but I CAN'T upload an
existing application. It's very weird I really don't know what's going
on...
Maybe I'll just delete my current VPS and just create a brand new VPS
from scratch hopefully I won't have the same issue... I don't know
what else to tried.

Thanks,
Yannick P.




On Sep 24, 9:08 am, Yannick  wrote:
> Hello Chris,
> Thanks for the note and suggestions: Yes did reboot Apache and
> Web2py...
>
> Here is the result of the command I run in web2py dir:
>
> drwxr-xr-x 6 www-data www-data  4096 2010-09-22 04:15 applications
>
> From the command it seems that the owner do have permision to read and
> writehumm...Please let me know if you have any idea since I'm
> still not able to upload app from admin. I upload them from sftp...
>
> Thanks,
> Yannick P.
>
> On Sep 24, 8:11 am, Christopher Steel  wrote:
>
>
>
> > Yannick,
>
> > Hi Yannick,
>
> > As I mentioned before this sounds lot like a permissions issue. If you
> > could include the output of the following command when run from the
> > web2py directory on your server it could be very helpful.
>
> >     ls -al | grep applications
>
> > Where you able to restart Apache and web2py?
>
> > Cheers,
>
> > Chris
>
> > On Sep 23, 11:05 am, Yannick  wrote:
>
> > > Hello Scausten,
> > > I wonder were you able to upload an application from the web2py admin
> > > page after your installation ? For some reason I can't upload any
> > > application. I still have that message saying "Unable to install
> > > application..." even after I restart web2py etc...
>
> > > Please let me know.
>
> > > Thanks,
> > > Yannick P.
>
> > > On Sep 23, 9:19 am, scausten  wrote:> Don't worry, I 
> > > was doing something extraordinarily stupid - the script
> > > > is fine.
>
> > > > On Sep 23, 2:05 pm, mdipierro  wrote:
>
> > > > > I do not see anything wrong with line 4
>
> > > > > On Sep 23, 5:25 am, scausten  wrote:
>
> > > > > > Hi Massimo,
>
> > > > > > I've tried to install web2py on vps.net today and I'm getting the
> > > > > > following error message:
>
> > > > > > ./setup-web2py-ubuntu.sh: line 4: syntax error near unexpected token
> > > > > > `newline'
>
> > > > > > Could you have a look at it please?
>
> > > > > > On Sep 23, 4:36 am, mdipierro  wrote:
>
> > > > > > > yes this should do it
>
> > > > > > > sudo /etc/init.d/apache2 restart
>
> > > > > > > I do know why you cannot write on that folder.
>
> > > > > > > On Sep 22, 10:14 pm, Yannick  wrote:
>
> > > > > > > > Thanks for the note.
> > > > > > > > This may be a stupid question:) but in my set up (Mod_WSGI+ 
> > > > > > > > Apache
> > > > > > > > +Web2py) how do you restart web2py from command line ?
> > > > > > > > I tried to reboot apache (sudo /etc/init.d/apache2 restart), 
> > > > > > > > but I
> > > > > > > > don't think it also reboot web2py, because from the Admin page 
> > > > > > > > after
> > > > > > > > the apache rebooting I was still unable to upload an 
> > > > > > > > application.
>
> > > > > > > > Thanks a lot,
> > > > > > > > Yannick P.
>
> > > > > > > > On Sep 22, 6:13 pm, Christopher Steel  
> > > > > > > > wrote:
>
> > > > > > > > > Hi Yannick,
>
> > > > > > > > > This is a permissions issue, shut down web2py then restart 
> > > > > > > > > it. This
> > > > > > > > > has happe

[web2py] Re: VPS.net With Web2py.... Unable to install Application

2010-09-24 Thread Yannick
Hello Chris,
Thanks for the note and suggestions: Yes did reboot Apache and
Web2py...

Here is the result of the command I run in web2py dir:

drwxr-xr-x 6 www-data www-data  4096 2010-09-22 04:15 applications

>From the command it seems that the owner do have permision to read and
writehumm...Please let me know if you have any idea since I'm
still not able to upload app from admin. I upload them from sftp...

Thanks,
Yannick P.


On Sep 24, 8:11 am, Christopher Steel  wrote:
> Yannick,
>
> Hi Yannick,
>
> As I mentioned before this sounds lot like a permissions issue. If you
> could include the output of the following command when run from the
> web2py directory on your server it could be very helpful.
>
>     ls -al | grep applications
>
> Where you able to restart Apache and web2py?
>
> Cheers,
>
> Chris
>
> On Sep 23, 11:05 am, Yannick  wrote:
>
>
>
> > Hello Scausten,
> > I wonder were you able to upload an application from the web2py admin
> > page after your installation ? For some reason I can't upload any
> > application. I still have that message saying "Unable to install
> > application..." even after I restart web2py etc...
>
> > Please let me know.
>
> > Thanks,
> > Yannick P.
>
> > On Sep 23, 9:19 am, scausten  wrote:> Don't worry, I 
> > was doing something extraordinarily stupid - the script
> > > is fine.
>
> > > On Sep 23, 2:05 pm, mdipierro  wrote:
>
> > > > I do not see anything wrong with line 4
>
> > > > On Sep 23, 5:25 am, scausten  wrote:
>
> > > > > Hi Massimo,
>
> > > > > I've tried to install web2py on vps.net today and I'm getting the
> > > > > following error message:
>
> > > > > ./setup-web2py-ubuntu.sh: line 4: syntax error near unexpected token
> > > > > `newline'
>
> > > > > Could you have a look at it please?
>
> > > > > On Sep 23, 4:36 am, mdipierro  wrote:
>
> > > > > > yes this should do it
>
> > > > > > sudo /etc/init.d/apache2 restart
>
> > > > > > I do know why you cannot write on that folder.
>
> > > > > > On Sep 22, 10:14 pm, Yannick  wrote:
>
> > > > > > > Thanks for the note.
> > > > > > > This may be a stupid question:) but in my set up (Mod_WSGI+ Apache
> > > > > > > +Web2py) how do you restart web2py from command line ?
> > > > > > > I tried to reboot apache (sudo /etc/init.d/apache2 restart), but I
> > > > > > > don't think it also reboot web2py, because from the Admin page 
> > > > > > > after
> > > > > > > the apache rebooting I was still unable to upload an application.
>
> > > > > > > Thanks a lot,
> > > > > > > Yannick P.
>
> > > > > > > On Sep 22, 6:13 pm, Christopher Steel  
> > > > > > > wrote:
>
> > > > > > > > Hi Yannick,
>
> > > > > > > > This is a permissions issue, shut down web2py then restart it. 
> > > > > > > > This
> > > > > > > > has happened with some other folks at VPS and that usually 
> > > > > > > > takes care
> > > > > > > > of it.
>
> > > > > > > > Cheers,
>
> > > > > > > > Chris
>
> > > > > > > > On Sep 21, 11:49 pm, Yannick  wrote:
>
> > > > > > > > > Hello mate,
> > > > > > > > > I'm new with VPS Hosting... I just installed Web2py, Postgres 
> > > > > > > > > Admin...
> > > > > > > > > From the Admin Console of Web2py I tried to install the 
> > > > > > > > > application
> > > > > > > > > through the "Upload & install packed application" form and i 
> > > > > > > > > got a
> > > > > > > > > message saying "Unable to Install the application...".  The
> > > > > > > > > application was 44MB, so I tried to install a very small 
> > > > > > > > > application
> > > > > > > > > of 4MB just to see but it didn't work too.
> > > > > > > > > SO basically I manually upload the application on the 
> > > > > > > > > "Application"
> > > > > > > > > directory of Web2py using  SFTP. Then from the Admin Console 
> > > > > > > > > I can see
> > > > > > > > > the application but I when I tried to access the app from the 
> > > > > > > > > browser
> > > > > > > > > "http://IPADDRESS/App/default/index"; I got a message saying 
> > > > > > > > > "Internal
> > > > > > > > > Error" and a link "Ticket issued: unknown"... When I click on 
> > > > > > > > > the
> > > > > > > > > "unknown" I got a message saying "invalid Ticket"...
>
> > > > > > > > > I really don't have any clue of what's going on ??
>
> > > > > > > > > Please help...
>
> > > > > > > > > Thanks
> > > > > > > > > Yannick P.


[web2py] Re: VPS.net With Web2py.... Unable to install Application

2010-09-23 Thread Yannick
Hello Scausten,
I wonder were you able to upload an application from the web2py admin
page after your installation ? For some reason I can't upload any
application. I still have that message saying "Unable to install
application..." even after I restart web2py etc...

Please let me know.

Thanks,
Yannick P.

On Sep 23, 9:19 am, scausten  wrote:
> Don't worry, I was doing something extraordinarily stupid - the script
> is fine.
>
> On Sep 23, 2:05 pm, mdipierro  wrote:
>
>
>
> > I do not see anything wrong with line 4
>
> > On Sep 23, 5:25 am, scausten  wrote:
>
> > > Hi Massimo,
>
> > > I've tried to install web2py on vps.net today and I'm getting the
> > > following error message:
>
> > > ./setup-web2py-ubuntu.sh: line 4: syntax error near unexpected token
> > > `newline'
>
> > > Could you have a look at it please?
>
> > > On Sep 23, 4:36 am, mdipierro  wrote:
>
> > > > yes this should do it
>
> > > > sudo /etc/init.d/apache2 restart
>
> > > > I do know why you cannot write on that folder.
>
> > > > On Sep 22, 10:14 pm, Yannick  wrote:
>
> > > > > Thanks for the note.
> > > > > This may be a stupid question:) but in my set up (Mod_WSGI+ Apache
> > > > > +Web2py) how do you restart web2py from command line ?
> > > > > I tried to reboot apache (sudo /etc/init.d/apache2 restart), but I
> > > > > don't think it also reboot web2py, because from the Admin page after
> > > > > the apache rebooting I was still unable to upload an application.
>
> > > > > Thanks a lot,
> > > > > Yannick P.
>
> > > > > On Sep 22, 6:13 pm, Christopher Steel  wrote:
>
> > > > > > Hi Yannick,
>
> > > > > > This is a permissions issue, shut down web2py then restart it. This
> > > > > > has happened with some other folks at VPS and that usually takes 
> > > > > > care
> > > > > > of it.
>
> > > > > > Cheers,
>
> > > > > > Chris
>
> > > > > > On Sep 21, 11:49 pm, Yannick  wrote:
>
> > > > > > > Hello mate,
> > > > > > > I'm new with VPS Hosting... I just installed Web2py, Postgres 
> > > > > > > Admin...
> > > > > > > From the Admin Console of Web2py I tried to install the 
> > > > > > > application
> > > > > > > through the "Upload & install packed application" form and i got a
> > > > > > > message saying "Unable to Install the application...".  The
> > > > > > > application was 44MB, so I tried to install a very small 
> > > > > > > application
> > > > > > > of 4MB just to see but it didn't work too.
> > > > > > > SO basically I manually upload the application on the 
> > > > > > > "Application"
> > > > > > > directory of Web2py using  SFTP. Then from the Admin Console I 
> > > > > > > can see
> > > > > > > the application but I when I tried to access the app from the 
> > > > > > > browser
> > > > > > > "http://IPADDRESS/App/default/index"; I got a message saying 
> > > > > > > "Internal
> > > > > > > Error" and a link "Ticket issued: unknown"... When I click on the
> > > > > > > "unknown" I got a message saying "invalid Ticket"...
>
> > > > > > > I really don't have any clue of what's going on ??
>
> > > > > > > Please help...
>
> > > > > > > Thanks
> > > > > > > Yannick P.


[web2py] Re: VPS.net With Web2py.... Unable to install Application

2010-09-22 Thread Yannick
Thanks for the note.
This may be a stupid question:) but in my set up (Mod_WSGI+ Apache
+Web2py) how do you restart web2py from command line ?
I tried to reboot apache (sudo /etc/init.d/apache2 restart), but I
don't think it also reboot web2py, because from the Admin page after
the apache rebooting I was still unable to upload an application.


Thanks a lot,
Yannick P.


On Sep 22, 6:13 pm, Christopher Steel  wrote:
> Hi Yannick,
>
> This is a permissions issue, shut down web2py then restart it. This
> has happened with some other folks at VPS and that usually takes care
> of it.
>
> Cheers,
>
> Chris
>
> On Sep 21, 11:49 pm, Yannick  wrote:
>
>
>
> > Hello mate,
> > I'm new with VPS Hosting... I just installed Web2py, Postgres Admin...
> > From the Admin Console of Web2py I tried to install the application
> > through the "Upload & install packed application" form and i got a
> > message saying "Unable to Install the application...".  The
> > application was 44MB, so I tried to install a very small application
> > of 4MB just to see but it didn't work too.
> > SO basically I manually upload the application on the "Application"
> > directory of Web2py using  SFTP. Then from the Admin Console I can see
> > the application but I when I tried to access the app from the browser
> > "http://IPADDRESS/App/default/index"; I got a message saying "Internal
> > Error" and a link "Ticket issued: unknown"... When I click on the
> > "unknown" I got a message saying "invalid Ticket"...
>
> > I really don't have any clue of what's going on ??
>
> > Please help...
>
> > Thanks
> > Yannick P.


[web2py] Re: VPS.net With Web2py.... Unable to install Application

2010-09-22 Thread Yannick
Thanks for the note.
I can't upload an application using Admin interface.
I access web2py admin through Https since I can't access it via Http.
Yes I'm using Apache as webserver.

I did:
cd /home/www-data
chown -R www-data:www-data web2py

And now I'm able to access my application that I upload VIA SFTP NOT
via Web2py upload form. When I tried from web2py Admin I have a
message saying: "unable to install Application..."

So basically I can only install new application by uploading them via
FTP.

Thanks

On Sep 22, 12:20 am, mdipierro  wrote:
> This is a file permission issue. web2py does not have permission to
> write on the file system.
>
> I assume you are not running web2py form your account but you are
> accessing it via port 80 (apache). In this case make sure
>
> cd /home/www-data
> chown -R www-data:www-data web2py
>
> On Sep 21, 10:49 pm, Yannick  wrote:
>
>
>
> > Hello mate,
> > I'm new with VPS Hosting... I just installed Web2py, Postgres Admin...
> > From the Admin Console of Web2py I tried to install the application
> > through the "Upload & install packed application" form and i got a
> > message saying "Unable to Install the application...".  The
> > application was 44MB, so I tried to install a very small application
> > of 4MB just to see but it didn't work too.
> > SO basically I manually upload the application on the "Application"
> > directory of Web2py using  SFTP. Then from the Admin Console I can see
> > the application but I when I tried to access the app from the browser
> > "http://IPADDRESS/App/default/index"; I got a message saying "Internal
> > Error" and a link "Ticket issued: unknown"... When I click on the
> > "unknown" I got a message saying "invalid Ticket"...
>
> > I really don't have any clue of what's going on ??
>
> > Please help...
>
> > Thanks
> > Yannick P.


[web2py] VPS.net With Web2py.... Unable to install Application

2010-09-21 Thread Yannick
Hello mate,
I'm new with VPS Hosting... I just installed Web2py, Postgres Admin...
>From the Admin Console of Web2py I tried to install the application
through the "Upload & install packed application" form and i got a
message saying "Unable to Install the application...".  The
application was 44MB, so I tried to install a very small application
of 4MB just to see but it didn't work too.
SO basically I manually upload the application on the "Application"
directory of Web2py using  SFTP. Then from the Admin Console I can see
the application but I when I tried to access the app from the browser
"http://IPADDRESS/App/default/index"; I got a message saying "Internal
Error" and a link "Ticket issued: unknown"... When I click on the
"unknown" I got a message saying "invalid Ticket"...

I really don't have any clue of what's going on ??

Please help...

Thanks
Yannick P.


[web2py] Re: VPS.net for Hosting....

2010-09-21 Thread Yannick
Oh I was able to successfully play with DB on VPS by installing
phppgAdmin and access it remotely. I was thinking I need a special
setting.
I'm still looking for tutorial to be able to send email using Postfix
or any other tool from my Application on VPS VM.

Thanks again for your help.

On Sep 21, 8:21 pm, Yannick  wrote:
> Thanks for your help All.
> Yes by removing this line:
> sudo ln -s /etc/apache2/mods-available/authnz_external.load /etc/
> apache2/mods-enabled
> And deleting the file: sudo rm /etc/apache2/mods-enabled/
> authnz_external.load
>
> I was finally able to install Web2py on VPS.net
>
> It's there a video showing how to set up a DB with Postgres on VPS?
> Set up the SMTP server using Postfix etc...
> If there are anymore tutorial out there using web2py on VPS.net please
> let me know.
>
> Cheers,
> Yannick P.
>
> On Sep 21, 3:53 pm, mdipierro  wrote:
>
>
>
> > Looks like there is a typo in line 185. You do not need it. delete it.
>
> > On Sep 21, 2:22 pm, Yannick  wrote:
>
> > > Humm Thanks for your note all BUT it seems that the latest script has
> > > another error on line 185 on it.
>
> > > I just run the latest script on VPS.net server and here is the error
> > > message I keep having
>
> > > Restarting web server
> > > apache2
> > > * We failed to correctly shutdown apache, so we're now killing all
> > > running apache processes. This is almost certainly suboptimal, so
> > > please make sure your system is working as you'd expect now!
>
> > > apache2: Syntax error on line 185 of /etc/apache2/apache2.conf: Could
> > > not open configuration file /etc/apache2/mods-enabled/
> > > authnz_external.load: No such file or directory
>
> > > Here is the script I got and run 
> > > :http://web2py.googlecode.com/hg/scripts/setup-web2py-ubuntu.sh
>
> > > Please let me know if you have any idea.
> > > Cheers,
> > > Yannick P.
> > > On Sep 21, 10:47 am, mdipierro  wrote:
>
> > > > done
>
> > > > On Sep 21, 9:41 am, Anthony  wrote:
>
> > > > > Also needs to be changed in the 
> > > > > book:http://web2py.com/book/default/chapter/11#One-Step-Production-Deployment
>
> > > > > On Sep 21, 10:17 am, "mr.freeze"  wrote:
>
> > > > > > That's your slice.  You can log in and update it to the new link 
> > > > > > (or I
> > > > > > can if you're too busy).
>
> > > > > > On Sep 21, 9:07 am, mdipierro  wrote:
>
> > > > > > > Problem is... I copied your recipe in the book without checking 
> > > > > > > the
> > > > > > > url. :-(
>
> > > > > > > Massimo
>
> > > > > > > On Sep 21, 9:03 am, "mr.freeze"  wrote:
>
> > > > > > > > Is the one mentioned here 
> > > > > > > > different?http://www.web2pyslices.com/main/slices/take_slice/29
>
> > > > > > > > On Sep 21, 9:01 am, mdipierro  wrote:
>
> > > > > > > > > where did you get setup-web2py-ubuntu.sh
>
> > > > > > > > > This is the one:
>
> > > > > > > > >http://web2py.googlecode.com/hg/scripts/setup-web2py-ubuntu.sh
>
> > > > > > > > > the last line prompts you for the password.
>
> > > > > > > > > On Sep 21, 8:17 am, Yannick  wrote:
>
> > > > > > > > > > Thanks Villa,
> > > > > > > > > > I just tried it just like you suggested I alter the script 
> > > > > > > > > > and remove
> > > > > > > > > > the "display-name=%
> > > > > > > > > > {GROUP}" at line 89 and now it seem to work, I got this 
> > > > > > > > > > from the
> > > > > > > > > > command line:
>
> > > > > > > > > > httpd (no pid file) not running
> > > > > > > > > > [OK]
> > > > > > > > > > done!
>
> > > > > > > > > > I can access the web2py welcome page from my IP BUT I can't 
> > > > > > > > > > access the
> > > > > > > > > > administration page BECAUSE during the installation I 
> > > > > > > > > > didn't get the
> > > > > > > > > &

[web2py] Re: VPS.net for Hosting....

2010-09-21 Thread Yannick
Thanks for your help All.
Yes by removing this line:
sudo ln -s /etc/apache2/mods-available/authnz_external.load /etc/
apache2/mods-enabled
And deleting the file: sudo rm /etc/apache2/mods-enabled/
authnz_external.load

I was finally able to install Web2py on VPS.net

It's there a video showing how to set up a DB with Postgres on VPS?
Set up the SMTP server using Postfix etc...
If there are anymore tutorial out there using web2py on VPS.net please
let me know.

Cheers,
Yannick P.


On Sep 21, 3:53 pm, mdipierro  wrote:
> Looks like there is a typo in line 185. You do not need it. delete it.
>
> On Sep 21, 2:22 pm, Yannick  wrote:
>
>
>
> > Humm Thanks for your note all BUT it seems that the latest script has
> > another error on line 185 on it.
>
> > I just run the latest script on VPS.net server and here is the error
> > message I keep having
>
> > Restarting web server
> > apache2
> > * We failed to correctly shutdown apache, so we're now killing all
> > running apache processes. This is almost certainly suboptimal, so
> > please make sure your system is working as you'd expect now!
>
> > apache2: Syntax error on line 185 of /etc/apache2/apache2.conf: Could
> > not open configuration file /etc/apache2/mods-enabled/
> > authnz_external.load: No such file or directory
>
> > Here is the script I got and run 
> > :http://web2py.googlecode.com/hg/scripts/setup-web2py-ubuntu.sh
>
> > Please let me know if you have any idea.
> > Cheers,
> > Yannick P.
> > On Sep 21, 10:47 am, mdipierro  wrote:
>
> > > done
>
> > > On Sep 21, 9:41 am, Anthony  wrote:
>
> > > > Also needs to be changed in the 
> > > > book:http://web2py.com/book/default/chapter/11#One-Step-Production-Deployment
>
> > > > On Sep 21, 10:17 am, "mr.freeze"  wrote:
>
> > > > > That's your slice.  You can log in and update it to the new link (or I
> > > > > can if you're too busy).
>
> > > > > On Sep 21, 9:07 am, mdipierro  wrote:
>
> > > > > > Problem is... I copied your recipe in the book without checking the
> > > > > > url. :-(
>
> > > > > > Massimo
>
> > > > > > On Sep 21, 9:03 am, "mr.freeze"  wrote:
>
> > > > > > > Is the one mentioned here 
> > > > > > > different?http://www.web2pyslices.com/main/slices/take_slice/29
>
> > > > > > > On Sep 21, 9:01 am, mdipierro  wrote:
>
> > > > > > > > where did you get setup-web2py-ubuntu.sh
>
> > > > > > > > This is the one:
>
> > > > > > > >http://web2py.googlecode.com/hg/scripts/setup-web2py-ubuntu.sh
>
> > > > > > > > the last line prompts you for the password.
>
> > > > > > > > On Sep 21, 8:17 am, Yannick  wrote:
>
> > > > > > > > > Thanks Villa,
> > > > > > > > > I just tried it just like you suggested I alter the script 
> > > > > > > > > and remove
> > > > > > > > > the "display-name=%
> > > > > > > > > {GROUP}" at line 89 and now it seem to work, I got this from 
> > > > > > > > > the
> > > > > > > > > command line:
>
> > > > > > > > > httpd (no pid file) not running
> > > > > > > > > [OK]
> > > > > > > > > done!
>
> > > > > > > > > I can access the web2py welcome page from my IP BUT I can't 
> > > > > > > > > access the
> > > > > > > > > administration page BECAUSE during the installation I didn't 
> > > > > > > > > get the
> > > > > > > > > prompt asking me to enter a PASSWORD...
> > > > > > > > > Can you please let me know how you did enter the web2py admin
> > > > > > > > > password ?
> > > > > > > > > I guess we have to update the tutorial on how to install 
> > > > > > > > > Web2py on
> > > > > > > > > VPS.net, because the steps on the video said we should get a 
> > > > > > > > > prompt
> > > > > > > > > for the PWD but I didn't got it...
>
> > > > > > > > > Thanks for your help
>
> > > > > > > > > On Sep 21, 8:11 am

[web2py] Re: VPS.net for Hosting....

2010-09-21 Thread Yannick
Humm Thanks for your note all BUT it seems that the latest script has
another error on line 185 on it.

I just run the latest script on VPS.net server and here is the error
message I keep having

Restarting web server
apache2
* We failed to correctly shutdown apache, so we're now killing all
running apache processes. This is almost certainly suboptimal, so
please make sure your system is working as you'd expect now!

apache2: Syntax error on line 185 of /etc/apache2/apache2.conf: Could
not open configuration file /etc/apache2/mods-enabled/
authnz_external.load: No such file or directory



Here is the script I got and run : 
http://web2py.googlecode.com/hg/scripts/setup-web2py-ubuntu.sh


Please let me know if you have any idea.
Cheers,
Yannick P.
On Sep 21, 10:47 am, mdipierro  wrote:
> done
>
> On Sep 21, 9:41 am, Anthony  wrote:
>
>
>
> > Also needs to be changed in the 
> > book:http://web2py.com/book/default/chapter/11#One-Step-Production-Deployment
>
> > On Sep 21, 10:17 am, "mr.freeze"  wrote:
>
> > > That's your slice.  You can log in and update it to the new link (or I
> > > can if you're too busy).
>
> > > On Sep 21, 9:07 am, mdipierro  wrote:
>
> > > > Problem is... I copied your recipe in the book without checking the
> > > > url. :-(
>
> > > > Massimo
>
> > > > On Sep 21, 9:03 am, "mr.freeze"  wrote:
>
> > > > > Is the one mentioned here 
> > > > > different?http://www.web2pyslices.com/main/slices/take_slice/29
>
> > > > > On Sep 21, 9:01 am, mdipierro  wrote:
>
> > > > > > where did you get setup-web2py-ubuntu.sh
>
> > > > > > This is the one:
>
> > > > > >http://web2py.googlecode.com/hg/scripts/setup-web2py-ubuntu.sh
>
> > > > > > the last line prompts you for the password.
>
> > > > > > On Sep 21, 8:17 am, Yannick  wrote:
>
> > > > > > > Thanks Villa,
> > > > > > > I just tried it just like you suggested I alter the script and 
> > > > > > > remove
> > > > > > > the "display-name=%
> > > > > > > {GROUP}" at line 89 and now it seem to work, I got this from the
> > > > > > > command line:
>
> > > > > > > httpd (no pid file) not running
> > > > > > > [OK]
> > > > > > > done!
>
> > > > > > > I can access the web2py welcome page from my IP BUT I can't 
> > > > > > > access the
> > > > > > > administration page BECAUSE during the installation I didn't get 
> > > > > > > the
> > > > > > > prompt asking me to enter a PASSWORD...
> > > > > > > Can you please let me know how you did enter the web2py admin
> > > > > > > password ?
> > > > > > > I guess we have to update the tutorial on how to install Web2py on
> > > > > > > VPS.net, because the steps on the video said we should get a 
> > > > > > > prompt
> > > > > > > for the PWD but I didn't got it...
>
> > > > > > > Thanks for your help
>
> > > > > > > On Sep 21, 8:11 am, villas  wrote:
>
> > > > > > > > Yannick,  just to clarify,  I copied the script to my server
>
> > > > > > > > wgethttp://web2py.googlecode.com/svn/trunk/scripts/setup-web2py-ubuntu.sh
>
> > > > > > > > Made the alteration at around line 89.
> > > > > > > > Then ran the script.
>
> > > > > > > > As I said,  I also made other alterations for my own specific
> > > > > > > > circumstances.
>
> > > > > > > > On Sep 21, 12:10 pm, Yannick  wrote:
>
> > > > > > > > > Thanks for the note... Humm how did you change this line 
> > > > > > > > > since it
> > > > > > > > > comes as a all package ? Is there a package which has a code 
> > > > > > > > > change ?
>
> > > > > > > > > Thannks
>
> > > > > > > > > On Sep 21, 6:37 am, villas  wrote:
>
> > > > > > > > > > Try removing display-name=%{GROUP} from that line.  i.e.
>
> > > > > > > > > > Replace
> > > > > > > > > >   WSGIDaemonProcess web2py user=www-data group=www-data 
> > &g

[web2py] Re: VPS.net for Hosting....

2010-09-21 Thread Yannick
Thanks Villa,
I just tried it just like you suggested I alter the script and remove
the "display-name=%
{GROUP}" at line 89 and now it seem to work, I got this from the
command line:

httpd (no pid file) not running
[OK]
done!

I can access the web2py welcome page from my IP BUT I can't access the
administration page BECAUSE during the installation I didn't get the
prompt asking me to enter a PASSWORD...
Can you please let me know how you did enter the web2py admin
password ?
I guess we have to update the tutorial on how to install Web2py on
VPS.net, because the steps on the video said we should get a prompt
for the PWD but I didn't got it...

Thanks for your help

On Sep 21, 8:11 am, villas  wrote:
> Yannick,  just to clarify,  I copied the script to my server
>
> wgethttp://web2py.googlecode.com/svn/trunk/scripts/setup-web2py-ubuntu.sh
>
> Made the alteration at around line 89.
> Then ran the script.
>
> As I said,  I also made other alterations for my own specific
> circumstances.
>
> On Sep 21, 12:10 pm, Yannick  wrote:
>
>
>
> > Thanks for the note... Humm how did you change this line since it
> > comes as a all package ? Is there a package which has a code change ?
>
> > Thannks
>
> > On Sep 21, 6:37 am, villas  wrote:
>
> > > Try removing display-name=%{GROUP} from that line.  i.e.
>
> > > Replace
> > >   WSGIDaemonProcess web2py user=www-data group=www-data display-name=%
> > > {GROUP}
>
> > > With
> > >   WSGIDaemonProcess web2py user=www-data group=www-data
>
> > > I am not knowledgeable enough to know whether this has any other
> > > consequences, but I seem to remember that it worked for me :-)
>
> > > On Sep 21, 6:17 am, Yannick  wrote:
>
> > > > I retried a clean installation and got the same error message...
> > > > I really don't understand why this... I follow the exact steps from
> > > > the video.
>
> > > > Thanks in advance if someone had the same issue that I'm having and
> > > > was able to solve it.
>
> > > > On Sep 21, 12:53 am, mdipierro  wrote:
>
> > > > > You are getting an error on this line:
>
> > > > > WSGIDaemonProcess web2py user=www-data group=www-data
>
> > > > > Do not know why.
>
> > > > > On Sep 20, 11:48 pm, Yannick  wrote:
>
> > > > > > Thanks. I tried the script in order to install Web2py on VPS.net and
> > > > > > here is the error message I got:
>
> > > > > > We failed to correctly shutdown apache, so we're now killing all
> > > > > > running apache processes. this is almost certainly suboptimal, so
> > > > > > please make sure your system is working as you'd expect now!
>
> > > > > > Syntax error on line 6 of /etc/apache2/sites-enabled/00-default
> > > > > > Invalid option to WSGI daemon process definition.
>
> > > > > > [fail]
>
> > > > > > done!
>
> > > > > > Please help I follow the steps on:http://vimeo.com/10377947
> > > > > > Here is the command I enter:
> > > > > > wgethttp://web2py.googlecode.com/svn/trunk/scripts/setup-web2py-ubuntu.sh
> > > > > > chmod +x setup-web2py-ubuntu.sh
> > > > > > sudo ./setup-web2py-ubuntu.sh
>
> > > > > > Thanks,
> > > > > > Yannick P.
>
> > > > > > On Sep 20, 1:24 am, mdipierro  wrote:
>
> > > > > > > I think you do
>
> > > > > > > sudo apt-get install python-imaging
>
> > > > > > > but I did not try
>
> > > > > > > On Sep 19, 9:59 pm, Yannick  wrote:
>
> > > > > > > > Good Thanks I'll try to play around with it...The installation 
> > > > > > > > seem
> > > > > > > > easier than Webfaction...
>
> > > > > > > > My application also use PIL Api for photo... Can I easily also 
> > > > > > > > install
> > > > > > > > PIL on VPS.net ?
>
> > > > > > > > Thanks,
> > > > > > > > Yannick P.
>
> > > > > > > > On Sep 19, 10:37 pm, mdipierro  wrote:
>
> > > > > > > > > yes and I could not be happier.
>
> > > > > > > > > On Sep 19, 9:27 pm, "mr.freeze"  wrote:
>
> > > > > > > > > > Massimo uses it for web2py.com I believe. He made a 
> > > > > > > > > > video:http://vimeo.com/10377947
>
> > > > > > > > > > On Sep 19, 9:23 pm, Yannick  wrote:
>
> > > > > > > > > > > Hello All,
>
> > > > > > > > > > > It's there anyone who use VPS.net as a Hosting company ?  
> > > > > > > > > > > If Yes can
> > > > > > > > > > > you please let me know how to install a Web2py 
> > > > > > > > > > > application on their
> > > > > > > > > > > server using APACHE as webserver ???
>
> > > > > > > > > > > Please let me know if you have any idea...
>
> > > > > > > > > > > Thanks in advance,
>
> > > > > > > > > > > Yannick P.


[web2py] Re: VPS.net for Hosting....

2010-09-21 Thread Yannick
Thanks for the note... Humm how did you change this line since it
comes as a all package ? Is there a package which has a code change ?

Thannks

On Sep 21, 6:37 am, villas  wrote:
> Try removing display-name=%{GROUP} from that line.  i.e.
>
> Replace
>   WSGIDaemonProcess web2py user=www-data group=www-data display-name=%
> {GROUP}
>
> With
>   WSGIDaemonProcess web2py user=www-data group=www-data
>
> I am not knowledgeable enough to know whether this has any other
> consequences, but I seem to remember that it worked for me :-)
>
> On Sep 21, 6:17 am, Yannick  wrote:
>
>
>
> > I retried a clean installation and got the same error message...
> > I really don't understand why this... I follow the exact steps from
> > the video.
>
> > Thanks in advance if someone had the same issue that I'm having and
> > was able to solve it.
>
> > On Sep 21, 12:53 am, mdipierro  wrote:
>
> > > You are getting an error on this line:
>
> > > WSGIDaemonProcess web2py user=www-data group=www-data
>
> > > Do not know why.
>
> > > On Sep 20, 11:48 pm, Yannick  wrote:
>
> > > > Thanks. I tried the script in order to install Web2py on VPS.net and
> > > > here is the error message I got:
>
> > > > We failed to correctly shutdown apache, so we're now killing all
> > > > running apache processes. this is almost certainly suboptimal, so
> > > > please make sure your system is working as you'd expect now!
>
> > > > Syntax error on line 6 of /etc/apache2/sites-enabled/00-default
> > > > Invalid option to WSGI daemon process definition.
>
> > > > [fail]
>
> > > > done!
>
> > > > Please help I follow the steps on:http://vimeo.com/10377947
> > > > Here is the command I enter:
> > > > wgethttp://web2py.googlecode.com/svn/trunk/scripts/setup-web2py-ubuntu.sh
> > > > chmod +x setup-web2py-ubuntu.sh
> > > > sudo ./setup-web2py-ubuntu.sh
>
> > > > Thanks,
> > > > Yannick P.
>
> > > > On Sep 20, 1:24 am, mdipierro  wrote:
>
> > > > > I think you do
>
> > > > > sudo apt-get install python-imaging
>
> > > > > but I did not try
>
> > > > > On Sep 19, 9:59 pm, Yannick  wrote:
>
> > > > > > Good Thanks I'll try to play around with it...The installation seem
> > > > > > easier than Webfaction...
>
> > > > > > My application also use PIL Api for photo... Can I easily also 
> > > > > > install
> > > > > > PIL on VPS.net ?
>
> > > > > > Thanks,
> > > > > > Yannick P.
>
> > > > > > On Sep 19, 10:37 pm, mdipierro  wrote:
>
> > > > > > > yes and I could not be happier.
>
> > > > > > > On Sep 19, 9:27 pm, "mr.freeze"  wrote:
>
> > > > > > > > Massimo uses it for web2py.com I believe. He made a 
> > > > > > > > video:http://vimeo.com/10377947
>
> > > > > > > > On Sep 19, 9:23 pm, Yannick  wrote:
>
> > > > > > > > > Hello All,
>
> > > > > > > > > It's there anyone who use VPS.net as a Hosting company ?  If 
> > > > > > > > > Yes can
> > > > > > > > > you please let me know how to install a Web2py application on 
> > > > > > > > > their
> > > > > > > > > server using APACHE as webserver ???
>
> > > > > > > > > Please let me know if you have any idea...
>
> > > > > > > > > Thanks in advance,
>
> > > > > > > > > Yannick P.


[web2py] Re: VPS.net for Hosting....

2010-09-20 Thread Yannick
I retried a clean installation and got the same error message...
I really don't understand why this... I follow the exact steps from
the video.

Thanks in advance if someone had the same issue that I'm having and
was able to solve it.

On Sep 21, 12:53 am, mdipierro  wrote:
> You are getting an error on this line:
>
> WSGIDaemonProcess web2py user=www-data group=www-data
>
> Do not know why.
>
> On Sep 20, 11:48 pm, Yannick  wrote:
>
>
>
> > Thanks. I tried the script in order to install Web2py on VPS.net and
> > here is the error message I got:
>
> > We failed to correctly shutdown apache, so we're now killing all
> > running apache processes. this is almost certainly suboptimal, so
> > please make sure your system is working as you'd expect now!
>
> > Syntax error on line 6 of /etc/apache2/sites-enabled/00-default
> > Invalid option to WSGI daemon process definition.
>
> > [fail]
>
> > done!
>
> > Please help I follow the steps on:http://vimeo.com/10377947
> > Here is the command I enter:
> > wgethttp://web2py.googlecode.com/svn/trunk/scripts/setup-web2py-ubuntu.sh
> > chmod +x setup-web2py-ubuntu.sh
> > sudo ./setup-web2py-ubuntu.sh
>
> > Thanks,
> > Yannick P.
>
> > On Sep 20, 1:24 am, mdipierro  wrote:
>
> > > I think you do
>
> > > sudo apt-get install python-imaging
>
> > > but I did not try
>
> > > On Sep 19, 9:59 pm, Yannick  wrote:
>
> > > > Good Thanks I'll try to play around with it...The installation seem
> > > > easier than Webfaction...
>
> > > > My application also use PIL Api for photo... Can I easily also install
> > > > PIL on VPS.net ?
>
> > > > Thanks,
> > > > Yannick P.
>
> > > > On Sep 19, 10:37 pm, mdipierro  wrote:
>
> > > > > yes and I could not be happier.
>
> > > > > On Sep 19, 9:27 pm, "mr.freeze"  wrote:
>
> > > > > > Massimo uses it for web2py.com I believe. He made a 
> > > > > > video:http://vimeo.com/10377947
>
> > > > > > On Sep 19, 9:23 pm, Yannick  wrote:
>
> > > > > > > Hello All,
>
> > > > > > > It's there anyone who use VPS.net as a Hosting company ?  If Yes 
> > > > > > > can
> > > > > > > you please let me know how to install a Web2py application on 
> > > > > > > their
> > > > > > > server using APACHE as webserver ???
>
> > > > > > > Please let me know if you have any idea...
>
> > > > > > > Thanks in advance,
>
> > > > > > > Yannick P.


[web2py] Re: VPS.net for Hosting....

2010-09-20 Thread Yannick
Thanks. I tried the script in order to install Web2py on VPS.net and
here is the error message I got:


We failed to correctly shutdown apache, so we're now killing all
running apache processes. this is almost certainly suboptimal, so
please make sure your system is working as you'd expect now!

Syntax error on line 6 of /etc/apache2/sites-enabled/00-default
Invalid option to WSGI daemon process definition.

[fail]

done!


Please help I follow the steps on: http://vimeo.com/10377947
Here is the command I enter:
wget http://web2py.googlecode.com/svn/trunk/scripts/setup-web2py-ubuntu.sh
chmod +x setup-web2py-ubuntu.sh
sudo ./setup-web2py-ubuntu.sh


Thanks,
Yannick P.


On Sep 20, 1:24 am, mdipierro  wrote:
> I think you do
>
> sudo apt-get install python-imaging
>
> but I did not try
>
> On Sep 19, 9:59 pm, Yannick  wrote:
>
>
>
> > Good Thanks I'll try to play around with it...The installation seem
> > easier than Webfaction...
>
> > My application also use PIL Api for photo... Can I easily also install
> > PIL on VPS.net ?
>
> > Thanks,
> > Yannick P.
>
> > On Sep 19, 10:37 pm, mdipierro  wrote:
>
> > > yes and I could not be happier.
>
> > > On Sep 19, 9:27 pm, "mr.freeze"  wrote:
>
> > > > Massimo uses it for web2py.com I believe. He made a 
> > > > video:http://vimeo.com/10377947
>
> > > > On Sep 19, 9:23 pm, Yannick  wrote:
>
> > > > > Hello All,
>
> > > > > It's there anyone who use VPS.net as a Hosting company ?  If Yes can
> > > > > you please let me know how to install a Web2py application on their
> > > > > server using APACHE as webserver ???
>
> > > > > Please let me know if you have any idea...
>
> > > > > Thanks in advance,
>
> > > > > Yannick P.


[web2py] Re: VPS.net for Hosting....

2010-09-19 Thread Yannick
Good Thanks I'll try to play around with it...The installation seem
easier than Webfaction...

My application also use PIL Api for photo... Can I easily also install
PIL on VPS.net ?

Thanks,
Yannick P.

On Sep 19, 10:37 pm, mdipierro  wrote:
> yes and I could not be happier.
>
> On Sep 19, 9:27 pm, "mr.freeze"  wrote:
>
>
>
> > Massimo uses it for web2py.com I believe. He made a 
> > video:http://vimeo.com/10377947
>
> > On Sep 19, 9:23 pm, Yannick  wrote:
>
> > > Hello All,
>
> > > It's there anyone who use VPS.net as a Hosting company ?  If Yes can
> > > you please let me know how to install a Web2py application on their
> > > server using APACHE as webserver ???
>
> > > Please let me know if you have any idea...
>
> > > Thanks in advance,
>
> > > Yannick P.


[web2py] VPS.net for Hosting....

2010-09-19 Thread Yannick
Hello All,

It's there anyone who use VPS.net as a Hosting company ?  If Yes can
you please let me know how to install a Web2py application on their
server using APACHE as webserver ???

Please let me know if you have any idea...

Thanks in advance,

Yannick P.


[web2py] Auth - Retrieve Password Not Working....

2010-09-19 Thread Yannick
Hello mate,
I wonder if any one has the same issue with the retrieve_password() in
tools

#Here is the controllers:
def forgotPassword():
return dict(forgotPwdForm = auth.retrieve_password())

# Here is the view "forgotPassword.html"
Forgot Your Password ? Please enter your email
  {{=forgotPwdForm}}

# Here is the model
auth.settings.table_user = db.define_table(
  auth.settings.table_user_name,
  db.Field('fullname', length=250, default=''),
  db.Field('email', length=128,default=''),
 
db.Field('creationTime',type='datetime',default=now,writable=False),
  db.Field('password', 'password',
readable=False,label='Password', requires=CRYPT()),
  db.Field('registration_key', length=128, writable=False,
readable=False,default=''),
  db.Field('reset_password_key', length=128, default=
'',writable=False, readable=False),
  migrate=True)


>From the view when the user enter his email, nothing really happen, no
error message. The retrieved password is not sent...
I'm using Web2py Version 1.83.2

Please let me know if you have any idea... This code used to work with
previous version of Web2py...Thanks,

Thanks


[web2py] Re: Scaffolding app with Twitter OAuth1.0a auth

2010-09-05 Thread Yannick
Hello Thanks for the note.
I was using the Simple Authentication on my application to send
tweets. I just noticed that twitter no longer support it.  I guess I
have to switch to Twitter oAuth API.
I was wondering because it looks like to send tweet, each user of my
application should get a CLIENT_ID, CLIENT_SECRET  (oauth_token and
oauth_token_secret). I wonder where they will get it from ? Should
each of them have to register my application in their twitter Account
to get it ?

Thanks for your help,
Yannick P.


On Aug 30, 4:00 am, Michele Comitini 
wrote:
> Actually if you look on developer.twitter.com, you will find some
> library that maps thetwitterREST api to
> python methods.  But I did not relay on that as it would have added
> more dependencies.
> I think that is something that you can use depending the application
> you are going to develop.
>
> Things are simple even without external libraries, look for instance
> at the get_user method in db.py, how it gets user 
> info:http://code.google.com/r/michelecomitini-facebookaccess/source/browse...
>
>     def get_user(self):
>         if self.accessToken() is not None:
>             client =oauth.Client(self.consumer, self.accessToken())
>             resp, content =
> client.request('http://api.twitter.com/1/account/verify_credentials.json')
>             if resp['status'] != '200':
>                 # cannot get user info. should check status
>                 return None
>             u = json.loads(content)
>             return dict(username=u['screen_name'], name=u['name'],
> registration_id=u['id'])
>
> so you build a client, make a request to a REST api url
> (http://api.twitter.com/1/account/verify_credentials.json)
>
> To post a tweet see:http://dev.twitter.com/doc/post/statuses/update
>
> in your controller you should write something like this:
>
> import oauth2 asoauth
> .
> .
> .
> @auth.requires_login()
> def sendtweet():
>   token = auth.settings.login_form.accessToken() # you can use this
> also if you prefer: token=session.access_token
>   consumer =oauth.Consumer(CLIENT_ID, CLIENT_SECRET) #<- CLIENT_ID,
> CLIENT_SECRET are defined in db.py
>   client =oauth.Client(self.consumer, token)
>   # encode the message
>   message = 'My web2py post!"
>   data=urlencode(status=message)
>   #make a post
>   resp, content =
> client.request('http://api.twitter.com/1/statuses/update.json',
> "POST", body=data)
>   if resp['status'] != '200':
>     #manage the error
>     return dict(message="Could not send tweet! :-( ")
>
>   return dict(message="Succesfully sent! :-)")
>
> if you call method returning some data I suggest tu use the .json
> version of it and use
> simplejson to decode it to a python dictionary (see the get_user() method 
> above)
>
> hope that helps...
> mic
>
> 2010/8/30 Albert Abril :
>
> > Just a question: what do you use for post a tweet, read statuses... ?
> > Thanks in advance.
>
> > On Sun, Aug 29, 2010 at 12:39 PM, Albert Abril 
> > wrote:
>
> >> :) Thank you!
>
> >> On Sun, Aug 29, 2010 at 1:45 AM, Michele Comitini
> >>  wrote:
>
> >>> Hello all,
>
> >>> I've uploaded a scaffolding app as example of authentication with
> >>>twitteroauth.  You can find source code here:
>
> >>>https://code.google.com/r/michelecomitini-facebookaccess/source/brows...
>
> >>> Or you can clone the repository locally:
> >>>https://code.google.com/r/michelecomitini-facebookaccess/source/checkout
>
> >>> as usual it is also on GAE for testing:
> >>>http://grafbook.appspot.com/helloTwitter
>
> >>> Please enjoy and send feedback.
>
> >>> tnx
> >>> michele


[web2py] Re: Can't send tweet from my application

2010-09-05 Thread Yannick
Thanks for the note and the link. Yes you right that's the reason why.
Twitter is no longer supporting Basic Authentication.
We need to use OAuth. I just read this post:
http://groups.google.com/group/web2py/browse_thread/thread/56e916dc8784e20a/ea6392970ae4cceb?lnk=gst&q=oAuth+twitter#ea6392970ae4cceb

And it looks like to send tweet, each user of my application should
get a CLIENT_ID, CLIENT_SECRET . I wonder where they will get it
from ? Should they have to register my application in thier twitter
Account to get it ?


Thanks,
Yannick P.

On Sep 4, 11:04 pm, mdmcginn  wrote:
> I don't know if this is the solution, but Twitter is now requiring
> OAuth instead of the previous Basic Auth. They've warned that many
> apps would stop working. Seehttp://dev.twitter.com/pages/basic_to_oauth
> --
> Michael McGinnis
>
> On Sep 4, 5:39 pm, Yannick  wrote:
>
> > Hello Mate,
> > I used to send tweet through my application successfully without any
> > trouble but today I keep getting an "401: Unauthorized" when I send a
> > tweet from my application... Here is the code :
> > def postTweets():
> >    try:
> >         import urllib, urllib2, base64
> >         import gluon.contrib.simplejson as sj
> >         args= urllib.urlencode([('status',"My Message")])
> >         headers={}
> >         headers['Authorization'] = 'Basic
> > '+base64.b64encode("userName"+':' +"password")
> >         request = urllib2.Request('http://twitter.com/statuses/
> > update.json', args, headers)
> >         return sj.loads(urllib2.urlopen(request).read())
> >     except Exception:
> >         print 'Problem here'
> >         raise
>
> > Here is the error I'm getting:
> > .
> > 
> > File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/
> > python2.5/urllib2.py", line 506, in http_error_default
> >     raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
> > urllib2.HTTPError: HTTP Error 401: Unauthorized
>
> > Please any help... thanks


[web2py] Can't send tweet from my application

2010-09-04 Thread Yannick
Hello Mate,
I used to send tweet through my application successfully without any
trouble but today I keep getting an "401: Unauthorized" when I send a
tweet from my application... Here is the code :
def postTweets():
   try:
import urllib, urllib2, base64
import gluon.contrib.simplejson as sj
args= urllib.urlencode([('status',"My Message")])
headers={}
headers['Authorization'] = 'Basic
'+base64.b64encode("userName"+':' +"password")
request = urllib2.Request('http://twitter.com/statuses/
update.json', args, headers)
return sj.loads(urllib2.urlopen(request).read())
except Exception:
print 'Problem here'
raise

Here is the error I'm getting:
.

File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/urllib2.py", line 506, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
urllib2.HTTPError: HTTP Error 401: Unauthorized



Please any help... thanks


[web2py] Re: Upload Issue --- Very Wierd --- Maybe a bug!

2010-06-03 Thread Yannick
Any idea Please ? Does any one already notice such thing ? I'm using
Web2py Version: 1.76.5
Python: 2.5

Thanks!

On Jun 3, 2:00 am, Yannick  wrote:
> Hello mate.
> I can't upload in this situation below:
>
> Here is the view:
> 
> ...
> mainImage = $(".image-wrapper").HandlerFile(
>             {
>                 mainImageUrl: "",
>                 helper: $("#tooltip"),
>                 ...
>             }
> ...
> 
> Upload Pictures. You can upload up to 10 pictures at once.
>             {{=upload.custom.begin}}
>                        name="fileupload" type="file" accept="gif|jpg|png" />
>                       
>             {{=upload.custom.end}}
>
> 
> ...
> ...
> #
> Controller
> #
> ...
>  # this is a customize function
>  form=multicrud.create(db.photo,
>                    message = 'file(s) uploaded',
>                    multiUpload='fileupload',
>                    onaccept = clearPictureCache,
>                    multiUploadFilename= 'photoname',#'filename',
>                    multiMaxFiles=10,
>                    next= URL(r=request,c='BuTagCenter', f='index') )
> ...
> return dict(upload = form)
>
> #
> When debugging I noticed that the accepts() function from "html.py"
> was failing because the "request_vars._formkey" is different from the
> "session.get('_formkey[%s]'% self.formname)".
>
> And when I remove this  from the view
>  "
> mainImage = $(".image-wrapper").HandlerFile(
>             {
>                 mainImageUrl: "",
>                 helper: $("#tooltip"),
>                 ...
>             }"
>  everything work well... the validation is perfect in the "html.py"
> and the file is uploaded successfully...
>
> So I wonder WHY this
> "mainImage = $(".image-wrapper").HandlerFile(
>             {
>                 mainImageUrl: "",
>                 helper: $("#tooltip"),
>                 ...
>             }"
> is affecting the form key variables that is send to the server ??? I'm
> really surprise by this since it shouldn't related...
>
> Please any ideas is welcome... thanks for your help,
>
> Cheers,


[web2py] Upload Issue --- Very Wierd --- Maybe a bug!

2010-06-02 Thread Yannick
Hello mate.
I can't upload in this situation below:

Here is the view:

...
mainImage = $(".image-wrapper").HandlerFile(
{
mainImageUrl: "",
helper: $("#tooltip"),
...
}
...

Upload Pictures. You can upload up to 10 pictures at once.
{{=upload.custom.begin}}
  
  
{{=upload.custom.end}}


...
...
#
Controller
#
...
 # this is a customize function
 form=multicrud.create(db.photo,
   message = 'file(s) uploaded',
   multiUpload='fileupload',
   onaccept = clearPictureCache,
   multiUploadFilename= 'photoname',#'filename',
   multiMaxFiles=10,
   next= URL(r=request,c='BuTagCenter', f='index') )
...
return dict(upload = form)

#
When debugging I noticed that the accepts() function from "html.py"
was failing because the "request_vars._formkey" is different from the
"session.get('_formkey[%s]'% self.formname)".

And when I remove this  from the view
 "
mainImage = $(".image-wrapper").HandlerFile(
{
mainImageUrl: "",
helper: $("#tooltip"),
...
}"
 everything work well... the validation is perfect in the "html.py"
and the file is uploaded successfully...

So I wonder WHY this
"mainImage = $(".image-wrapper").HandlerFile(
{
mainImageUrl: "",
helper: $("#tooltip"),
...
}"
is affecting the form key variables that is send to the server ??? I'm
really surprise by this since it shouldn't related...



Please any ideas is welcome... thanks for your help,

Cheers,


[web2py] Re: Deployment Recipes Page 281

2010-05-05 Thread Yannick
Do you have the installation guide for Mac ?
Thanks

On May 5, 4:35 pm, Thadeus Burgess  wrote:
> The apt with super cow powers on a Mac! (eyes grow big in
> astonishment!) BLASPHEMY.
>
> --
> Thadeus
>
>
>
> On Wed, May 5, 2010 at 2:56 PM, Yannick  wrote:
> > Hello mate,
> > Sorry to bug you with that...it may be an offline question... Maybe
> > this is pretty easy but i was wondering the book give an example of
> > how to deploy web2py, Apache on Linux and so on... I was wondering if
> > there is an installation guide for macOS deployment as well ???
> > I tried to follow the Linux instructions in the book to install
> > Apache, SSH, etc... on MacOS but not successful.
> > for example when I run this command : sudo /sw/bin/apt-get -y install
> > openssh-server
> > I got:
> > Reading Package Lists... Done
> > Building Dependency Tree... Done
> > E: Couldn't find package openssh-server
>
> > Did someone successfully deploy web2py + Apache + SSH on mac ? If yes
> > can you please let me know how you did it ?
>
> > Thanks :)


[web2py] Deployment Recipes Page 281

2010-05-05 Thread Yannick
Hello mate,
Sorry to bug you with that...it may be an offline question... Maybe
this is pretty easy but i was wondering the book give an example of
how to deploy web2py, Apache on Linux and so on... I was wondering if
there is an installation guide for macOS deployment as well ???
I tried to follow the Linux instructions in the book to install
Apache, SSH, etc... on MacOS but not successful.
for example when I run this command : sudo /sw/bin/apt-get -y install
openssh-server
I got:
Reading Package Lists... Done
Building Dependency Tree... Done
E: Couldn't find package openssh-server

Did someone successfully deploy web2py + Apache + SSH on mac ? If yes
can you please let me know how you did it ?

Thanks :)


[web2py] Re: Caching Advise !

2010-05-05 Thread Yannick

 @ Massimo,
Thanks I was still using cherryPy webServer... But I'll try to install
Apache on my environment and give it a try...
When I look at your suggestion you king of assume that all the picture
will be in the same directory "Uploads"... Each user will have his own
Sub-directory of pictures under "Uploads". Does it matter anything in
the configuration you game me ?
Thanks

@ Thadeus
Thanks for the hint.. I don't expect to allow an image more than
4MB... I was also thinking about caching them on the client side...
Not sure sure if it is a good idea... Do you have any idea how
Application like Facebook cache pictures ?
Thanks,

Yannick P.

On May 5, 11:56 am, Thadeus Burgess  wrote:
> If your images are fairly large they are going to be slow no matter what.
>
> You probably need two versions, a mini thumbnail version, and then the
> original. On your main page just display the thumbnails, they will
> load quite fast, but you can link them to the original.
>
> --
> Thadeus
>
>
>
> On Tue, May 4, 2010 at 10:21 PM, mdipierro  wrote:
> > With apache you can do
>
> >  AliasMatch ^/appname/default/customDownload/(.*)
> > \
> >           /home/www-data/web2py/applications/appname/uploads/
> > $1
> >  
> >    Order
> > Allow,Deny
> >    Allow from
> > all
> >  
>
> > On May 4, 10:17 pm, Yannick  wrote:
> >> Hehe Thanks for the note...
>
> >> Thanks for the clarification... The Html loading is not slow it's fine
> >> BUT loading the pictures are still kind of slow even when I only
> >> stream them...  here is a code I have in my custom download method:
> >> def customDownload():
>
> >> response.stream(open(os.path.join(request.folder,folderName,request.args(0)
> >>  ) ,'rb'))
>
> >> Is there any others techniques available in Web2py that can help me
> >> speed the Pictures loading process ?
>
> >> Any ideas please let me know.
>
> >> Thanks...
>
> >> On May 4, 9:29 pm, mdipierro  wrote:
>
> >> > show -> slow.
>
> >> > Note to self: do not type in the dark.
>
> >> > On May 4, 8:16 pm, Massimo Di Pierro  wrote:
>
> >> > > You need to understand why it is show. It is show to load the age or
> >> > > to load the pictures (because there are lots of the m in the page)?
> >> > > caching the select only affect the time to download the html page but
> >> > > does not affect the pictures since you are caching the list of
> >> > > function names not not the actual pictures.
>
> >> > > I suspect that the problem is that the system is doing database access
> >> > > for each picture (that is what download() does), in order to check
> >> > > whether the user is allowed to view the picture. If you do not need to
> >> > > validate each picture, you can write your own download function that
> >> > > does not perform validation and only does streaming or (better) you
> >> > > can ask web2py to bypass web2py and serve images directly.
>
> >> > > On May 4, 2010, at 6:36 PM, Yannick wrote:
>
> >> > > > Hello mate,
>
> >> > > > I used a lot of pictures in my application. Currently what I'm doing
> >> > > > is I cache the DAL Select like this:
> >> > > > "db().select(db.photo.fileupload, db.photo.id, cache=(cache.ram,
> >> > > > 3600))"
>
> >> > > > And when the users upload new pictures, in the "onaccept" function I
> >> > > > clear the cache like this:
> >> > > > -  cache.ram.clear()
> >> > > > So that the cache will be refreshed when the user load back the
> >> > > > pictures again.
>
> >> > > > - First, I want to know if it is a good approach ?
> >> > > > - Second, it is a better way to improve this design to make my system
> >> > > > faster ? (Because it is still a bit slow)
> >> > > > - Third, when I do this "cache.ram.clear" it actually clear the cache
> >> > > > for all users sessions, how can I only clear the cache of a single
> >> > > > user session NOT all of them ???
>
> >> > > > Please let me know.
>
> >> > > > Cheers,
> >> > > > Yannick P.


[web2py] Re: Caching Advise !

2010-05-04 Thread Yannick
Hehe Thanks for the note...

Thanks for the clarification... The Html loading is not slow it's fine
BUT loading the pictures are still kind of slow even when I only
stream them...  here is a code I have in my custom download method:
def customDownload():
 
response.stream(open(os.path.join(request.folder,folderName,request.args(0)) 
,'rb'))

Is there any others techniques available in Web2py that can help me
speed the Pictures loading process ?

Any ideas please let me know.

Thanks...


On May 4, 9:29 pm, mdipierro  wrote:
> show -> slow.
>
> Note to self: do not type in the dark.
>
> On May 4, 8:16 pm, Massimo Di Pierro  wrote:
>
>
>
> > You need to understand why it is show. It is show to load the age or  
> > to load the pictures (because there are lots of the m in the page)?  
> > caching the select only affect the time to download the html page but  
> > does not affect the pictures since you are caching the list of  
> > function names not not the actual pictures.
>
> > I suspect that the problem is that the system is doing database access  
> > for each picture (that is what download() does), in order to check  
> > whether the user is allowed to view the picture. If you do not need to  
> > validate each picture, you can write your own download function that  
> > does not perform validation and only does streaming or (better) you  
> > can ask web2py to bypass web2py and serve images directly.
>
> > On May 4, 2010, at 6:36 PM, Yannick wrote:
>
> > > Hello mate,
>
> > > I used a lot of pictures in my application. Currently what I'm doing
> > > is I cache the DAL Select like this:
> > > "db().select(db.photo.fileupload, db.photo.id, cache=(cache.ram,
> > > 3600))"
>
> > > And when the users upload new pictures, in the "onaccept" function I
> > > clear the cache like this:
> > > -  cache.ram.clear()
> > > So that the cache will be refreshed when the user load back the
> > > pictures again.
>
> > > - First, I want to know if it is a good approach ?
> > > - Second, it is a better way to improve this design to make my system
> > > faster ? (Because it is still a bit slow)
> > > - Third, when I do this "cache.ram.clear" it actually clear the cache
> > > for all users sessions, how can I only clear the cache of a single
> > > user session NOT all of them ???
>
> > > Please let me know.
>
> > > Cheers,
> > > Yannick P.


[web2py] Caching Advise !

2010-05-04 Thread Yannick
Hello mate,

I used a lot of pictures in my application. Currently what I'm doing
is I cache the DAL Select like this:
 "db().select(db.photo.fileupload, db.photo.id, cache=(cache.ram,
3600))"

And when the users upload new pictures, in the "onaccept" function I
clear the cache like this:
-  cache.ram.clear()
So that the cache will be refreshed when the user load back the
pictures again.

- First, I want to know if it is a good approach ?
- Second, it is a better way to improve this design to make my system
faster ? (Because it is still a bit slow)
- Third, when I do this "cache.ram.clear" it actually clear the cache
for all users sessions, how can I only clear the cache of a single
user session NOT all of them ???

Please let me know.

Cheers,
Yannick P.



[web2py] Re: Ajax and Auth API

2010-03-31 Thread Yannick
Thanks Massimo for the note, I really appreciate your help... Now I
have more control on the layout using your latest change thx... BUT
there are few problems...  the "next " doesn't seems to work I
have to do this:

1)
- auth.settings.register_next= URL(r=request,c='controller',
f='index') to actually go where I want to go right after a successful
registration...

If i only do this in the action :
- next = URL(r=request,c='controller', f='index')
  return dict(form=auth.register(onaccept=lambda form:
(updateInfo(form),response.headers.update({'web2py-component-
command':"document.location='%s'"%next}

After a registration the page will be redirect to "http://
127.0.0.1:8000/App/default/index"...

2)
Also for the login using Auth and Ajax, when I enter a username and
fake password the page is also redirect to  "http://127.0.0.1:8000/App/
default/index". (I put the code to handle the error, I wonder why the
page get redirect instead of returning an error msg)

3)
Also for the registration, when there is an error in the registration
form, I handle the errors BUT the form returned is empty... i was
wondering how to keep the data in the form returned when there is an
error... something like "Keepvalue= true"... I hope you understand
what I mean...


Thanks and please let me know if you have any idea,

Yannick P.

On Mar 30, 9:35 pm, mdipierro  wrote:
> One more try.. closer to the solutions...
>
> view  as before and action
>
> def register():
>     ...
>     next = URL(r=request,f='index')
>     return dict(form=auth.register(onaccept=lambda form:
> (updateInfo(form),response.headers.update({'web2py-component-
> command':"document.location='%s'"%next}
>
> On Mar 30, 8:06 pm, Yannick  wrote:
>
>
>
> > Thanks for the note I followed your instructions step by step
> > unfortunately even this solution doesn't work... the Action dictate
> > the display, I have NO control on the view...
>
> > #
> > #here is the view Register.html:
> > #
>
> > {{=form.custom.begin}}
> >  Full Name:  > name="fullname" type="text" value="" />
> >  Email:  > type="text" value="" />
> >  Password:   > name="password" type="password" value="" />
> >  Verify Pwd:  > type="password" />
> >  
> > {{=form.custom.end}}
>
> > #
> > # Here is the action
> > #
> > def register():
> >     ...
> >     next = URL(r=request,f='index')
> >     return auth.register(onaccept=lambda form:
> > (updateInfo(form),response.headers.update({'web2py-component-
> > command':"document.location='%s'"%next})))
>
> > Whatever I enter in the view will not be display NOTHING, only the
> > registration form return from the action will be displayed... It's
> > like  the form from the action override everything html code I
> > enter...
>
> > I'm kind of desperate... If you have any other idea please let me
> > know... Or if you know a place where there is a working example please
> > send me a link... In the meantime I'll just drop this Auth API -
> > Ajax...
>
> > Thanks a lot for your help...
> > Yannick P.
>
> > On Mar 27, 8:36 pm, mdipierro  wrote:
>
> > > IF, as I assume, the register action is called via the
> > > {{=LOAD('controller','register')}} helper THEN
>
> > > there should be no ajax handling in register.html. It should just be:
>
> > > {{=form.custom.begin}}
> > >  Full Name:  > > name="fullname" type="text" value="" />
> > >  Email:  > > type="text" value="" />
> > >  Password:   > > name="password" type="password" value="" />
> > >  Verify Pwd:  > > type="password" />
> > >  
> > > {{=form.custom.end}}
>
> > > Moreover all the INPUT fields in the custom form must have names as
> > > the corresponding fields in auth_user table and all required fields i
> > > auth_user MUST be present in the custom form.
>
> > > Moreover since you form is using
> > >  > > type="text" value="" />
> > > instead of {{=form.custom.widget.fullname}} (assuming you do have a
> > > field called fullname, which is not there in the default) you will
> > > have to handle manually all error reporting.
>
> > > On 27 Mar, 10:

[web2py] Re: Ajax and Auth API

2010-03-30 Thread Yannick
Thanks for the note I followed your instructions step by step
unfortunately even this solution doesn't work... the Action dictate
the display, I have NO control on the view...

#
#here is the view Register.html:
#

{{=form.custom.begin}}
 Full Name: 
 Email: 
 Password:  
 Verify Pwd: 
 
{{=form.custom.end}}

#
# Here is the action
#
def register():
...
next = URL(r=request,f='index')
return auth.register(onaccept=lambda form:
(updateInfo(form),response.headers.update({'web2py-component-
command':"document.location='%s'"%next})))

Whatever I enter in the view will not be display NOTHING, only the
registration form return from the action will be displayed... It's
like  the form from the action override everything html code I
enter...

I'm kind of desperate... If you have any other idea please let me
know... Or if you know a place where there is a working example please
send me a link... In the meantime I'll just drop this Auth API -
Ajax...

Thanks a lot for your help...
Yannick P.



On Mar 27, 8:36 pm, mdipierro  wrote:
> IF, as I assume, the register action is called via the
> {{=LOAD('controller','register')}} helper THEN
>
> there should be no ajax handling in register.html. It should just be:
>
> {{=form.custom.begin}}
>  Full Name:  name="fullname" type="text" value="" />
>  Email:  type="text" value="" />
>  Password:   name="password" type="password" value="" />
>  Verify Pwd:  type="password" />
>  
> {{=form.custom.end}}
>
> Moreover all the INPUT fields in the custom form must have names as
> the corresponding fields in auth_user table and all required fields i
> auth_user MUST be present in the custom form.
>
> Moreover since you form is using
>  type="text" value="" />
> instead of {{=form.custom.widget.fullname}} (assuming you do have a
> field called fullname, which is not there in the default) you will
> have to handle manually all error reporting.
>
> On 27 Mar, 10:10, Yannick  wrote:
>
>
>
> > Hello Massimo,  First thanks for you help... I'm stil not successful
> > with customizing the form for Auth Api using Ajax. Please let me know
> > what I'm doing wrong... Here is my view and controller (I did not
> > extend Layout.html)
>
> > #
> > # Register.html
> > ##
> > 
> > 
> >  $('#regForm').submit(function(){
> >     url = "{{=URL(r=request, f='register')}}";
> >     ids = [ 'auth_user_fullname', 'auth_user_email',
> > 'auth_user_password', 'auth_user_password_2' ];
> >          ajax(url, ids , 'registerMsg');
> >  });
>
> > // I took this from Web2py_ajax just for testing this Register
> > function ajax(u,s,t) {
> >   var query="";
> >   for(i=0; i<s.length; i++) {
> >      if(i>0) query=query+"&";
> >      query=query+encodeURIComponent(s[i])
> > +"="+encodeURIComponent(document.getElementById(s[i]).value);
> >   }
> >   jQuery.ajax({type: "POST", url: u, data: query, success:
> > function(msg) { if(t==':eval') eval(msg); else
> > document.getElementById(t).innerHTML=msg; } });}
>
> > 
>
> >  
> > 
> >  > method="post">
> >  Full Name:  > name="fullname" type="text" value="" />
> >  Email:  > type="text" value="" />
> >  Password:   > name="password" type="password" value="" />
> >  Verify Pwd:  > type="password" />
> >  
> > 
> > 
>
> > 
>
> > ##
> > # Controller
> > ##
>
> > def register():
> >     auth.settings.table_user.last_name.writable=False
> >     auth.settings.table_user.last_name.readable=False
>
> >     next = URL(r=request,f='index')
> >     return auth.register(onaccept=lambda form:
> > (updateInfo(form),response.headers.update({'web2py-component-
> > command':"document.location='%s'"%next})))
>
> > #
>
> > When doing this my view has no control on the display, it's like the
> > form return from the register Action overwritte everything... Can you
> > please let me know when I'm wrong here...
> > Thanks,
> > Yannick P.

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: Ajax and Auth API

2010-03-27 Thread Yannick
Hello Massimo,  First thanks for you help... I'm stil not successful
with customizing the form for Auth Api using Ajax. Please let me know
what I'm doing wrong... Here is my view and controller (I did not
extend Layout.html)

#
# Register.html
##


 $('#regForm').submit(function(){
url = "{{=URL(r=request, f='register')}}";
ids = [ 'auth_user_fullname', 'auth_user_email',
'auth_user_password', 'auth_user_password_2' ];
 ajax(url, ids , 'registerMsg');
 });

// I took this from Web2py_ajax just for testing this Register
function ajax(u,s,t) {
  var query="";
  for(i=0; i<s.length; i++) {
 if(i>0) query=query+"&";
 query=query+encodeURIComponent(s[i])
+"="+encodeURIComponent(document.getElementById(s[i]).value);
  }
  jQuery.ajax({type: "POST", url: u, data: query, success:
function(msg) { if(t==':eval') eval(msg); else
document.getElementById(t).innerHTML=msg; } });
}



 


 Full Name: 
 Email: 
 Password:  
 Verify Pwd: 
 





##
# Controller
##

def register():
auth.settings.table_user.last_name.writable=False
auth.settings.table_user.last_name.readable=False

next = URL(r=request,f='index')
return auth.register(onaccept=lambda form:
(updateInfo(form),response.headers.update({'web2py-component-
command':"document.location='%s'"%next})))


#

When doing this my view has no control on the display, it's like the
form return from the register Action overwritte everything... Can you
please let me know when I'm wrong here...
Thanks,
Yannick P.

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: Ajax and Auth API

2010-03-26 Thread Yannick
Thanks Massimo, Yes it's working now... Thousand thanks... BUT I still
don't know how I can have more control on the display of each field:
Like it's possible to load each field and display them as I want ?

- And I also wanted to know how to catch the error messages so I can
display them like I want... Like being able to get the error message
like this:
  {{if formname.errors.email:}} Email {{=formname.errors.email}}
{{pass}}

Please let me know, I feel like I don't have much flexibility for form
displayed other than putting this in the client side
"{{=LOAD('BuRegAuth', 'register', ajax_trap=True)}}  "

Thanks a lot for your help,
Yannick P.

On Mar 26, 12:02 am, mdipierro  wrote:
> You have two problems:
>
> 1) you are calling register twice. In index() and the LOAD callback.
> That generates two forms and confuses web2py on which one you are
> submitting. So index should just be
>
> 2) You specify onaccept both in settings and as argument of the
> register function. The latter overrides the former.
>
> Bottom line: replace this
>
> auth.settings.register_onaccept = updateInfo
> ...
> def register():
>     ...
>     return auth.register(onaccept=lambda
> form:response.headers.update({'web2py-component-
> command':"document.location='%s'"%next}))
> ...
> def index():
>     return dict(register = register())
>
> with this
>
> # auth.settings.register_onaccept = updateInfo
> ...
> def register():
>     ...
>     return auth.register(onaccept=lambda
> form:(updateinfo(form),response.headers.update({'web2py-component-
> command':"document.location='%s'"%next})))
> ...
> def index():
>     return dict()
>
> On Mar 25, 10:39 pm, Yannick  wrote:
>
>
>
> > Thanks.  Here is the complete action:
>
> > 
> > # I'm testing the registration with Ajax and here
> > # is my simple Controller
> > 
> > from applications.TestApp.modules.ControllerUtils import *
> > controlUtils = ControllerUtils(db)
>
> > # Registration Setting Information
> > auth.settings.registration_requires_verification = False
> > auth.settings.registration_requires_approval = False
>
> > def updateInfo(form):
> >     setTrue = True
> >     setFalse = False
> >     # Create a brand new album for each newly created account
> >     feedback = db.album.insert(buacct_fk = session.auth.user.id,
> >                                 albumname="Default", albumdesc="This
> > is your default Album",
> >                                albumviewprv=setFalse,
> > albumactif=setTrue)
>
> >    # Send a welcome email
> >    controlUtils.sendEmail(form.vars.email,
> >                                     'Welcome to ',
> >                                     'Enjoy the journey'
> >     )
> >     return dict()
>
> > auth.settings.register_onaccept = updateInfo
>
> > def register():
> >     auth.settings.table_user.delete_email.writable = False
> >     auth.settings.table_user.acct_frozen_cmt.writable = False
> >     auth.settings.table_user.accountFrozen.writable = False
> >     auth.settings.table_user.creationTime.writable = False
> >     auth.settings.table_user.language.writable = False
> >     auth.settings.table_user.birthday.writable = False
> >     auth.settings.table_user.delete_email.readable = False
> >     auth.settings.table_user.acct_frozen_cmt.readable = False
> >     auth.settings.table_user.accountFrozen.readable = False
> >     auth.settings.table_user.creationTime.readable = False
> >     auth.settings.table_user.birthday.readable = False
> >     auth.settings.table_user.language.readable = False
>
> >     next = URL(r=request,f='index')
> >     return auth.register(onaccept=lambda
> > form:response.headers.update({'web2py-component-
> > command':"document.location='%s'"%next}))
>
> > def index():
> >     return dict(register = register())
>
> > 
> > # The View "index.html": Very simple since i'm testing registration
> > with Ajax...
> > 
> >     
> >           
> >           
> >        {{=LOAD('BuRegAuth', 'register', ajax_trap=True)}}
> >     
>
> > #
> > And also I notice that everything is displayed as textfield, How can I
> > have mo

[web2py] Re: Ajax and Auth API

2010-03-25 Thread Yannick
Thanks.  Here is the complete action:


# I'm testing the registration with Ajax and here
# is my simple Controller

from applications.TestApp.modules.ControllerUtils import *
controlUtils = ControllerUtils(db)

# Registration Setting Information
auth.settings.registration_requires_verification = False
auth.settings.registration_requires_approval = False


def updateInfo(form):
setTrue = True
setFalse = False
# Create a brand new album for each newly created account
feedback = db.album.insert(buacct_fk = session.auth.user.id,
albumname="Default", albumdesc="This
is your default Album",
   albumviewprv=setFalse,
albumactif=setTrue)

   # Send a welcome email
   controlUtils.sendEmail(form.vars.email,
'Welcome to ',
'Enjoy the journey'
)
return dict()

auth.settings.register_onaccept = updateInfo

def register():
auth.settings.table_user.delete_email.writable = False
auth.settings.table_user.acct_frozen_cmt.writable = False
auth.settings.table_user.accountFrozen.writable = False
auth.settings.table_user.creationTime.writable = False
auth.settings.table_user.language.writable = False
auth.settings.table_user.birthday.writable = False
auth.settings.table_user.delete_email.readable = False
auth.settings.table_user.acct_frozen_cmt.readable = False
auth.settings.table_user.accountFrozen.readable = False
auth.settings.table_user.creationTime.readable = False
auth.settings.table_user.birthday.readable = False
auth.settings.table_user.language.readable = False


next = URL(r=request,f='index')
return auth.register(onaccept=lambda
form:response.headers.update({'web2py-component-
command':"document.location='%s'"%next}))

def index():
return dict(register = register())



# The View "index.html": Very simple since i'm testing registration
with Ajax...


  
  
   {{=LOAD('BuRegAuth', 'register', ajax_trap=True)}}




#
And also I notice that everything is displayed as textfield, How can I
have more control, about being able to display some fields as drop
down etc...
I also notice that this below have NO effect :
   - auth.settings.table_user.birthday.writable = False
   - auth.settings.table_user.birthday.readable = False
(the fields still appear in the form)


Thanks  for your help.

Yannick P.

On Mar 25, 8:49 pm, mdipierro  wrote:
> I think something else must be interfering with the session formkeys.
> I would need to look at the complete action and view.
>
> On Mar 25, 7:27 pm, Yannick  wrote:
>
>
>
> > Thanks for the note... But I tried it, I don't have the error anymore
> > but the data is not saved in the DB... I run in debug mode and put and
> > break point in my action "def register():" and I notice that the form
> > validation is not successful in the method "register()" of the Class
> > Auth() of "Tools.py"... I have no clue why it fails... The same value
> > works fine (recorded in DB) without the AJAX...
>
> > If you have any hint please let me know... I search a lot in the
> > threads of this Web2py group and I can't find an example of how to
> > used Auth Api with Ajax...
>
> > Yannick P.
>
> > On Mar 25, 1:19 pm, mdipierro  wrote:
>
> > > One more try
>
> > > def register():
> > >    next = URL(r=request,f='index')
> > >    return auth.register(onaccept=lambda
> > > form:response.headers.update({'web2py-component-
> > > command':"document.location='%s'"%next}))
>
> > > On Mar 25, 11:58 am, Yannick  wrote:
>
> > > > Hello thanks Massimo for the note... But I can't make it work... the
> > > > change_password() doesn't change the value in the DB... So I tried
> > > > other function just to test like "register()" and in this case i even
> > > > have an error message saying "TypeError: list objects are
> > > > unhashable"... I really don't know what I'm doing wrong up here...
> > > > Below it's the controller and view... Please let me know if you have
> > > > any idea...
>
> > > > #
> > > > #View "index.html"
> > > > #
> > > > .
> > > > .
> > &

[web2py] Re: Ajax and Auth API

2010-03-25 Thread Yannick
Thanks for the note... But I tried it, I don't have the error anymore
but the data is not saved in the DB... I run in debug mode and put and
break point in my action "def register():" and I notice that the form
validation is not successful in the method "register()" of the Class
Auth() of "Tools.py"... I have no clue why it fails... The same value
works fine (recorded in DB) without the AJAX...

If you have any hint please let me know... I search a lot in the
threads of this Web2py group and I can't find an example of how to
used Auth Api with Ajax...

Yannick P.

On Mar 25, 1:19 pm, mdipierro  wrote:
> One more try
>
> def register():
>    next = URL(r=request,f='index')
>    return auth.register(onaccept=lambda
> form:response.headers.update({'web2py-component-
> command':"document.location='%s'"%next}))
>
> On Mar 25, 11:58 am, Yannick  wrote:
>
>
>
> > Hello thanks Massimo for the note... But I can't make it work... the
> > change_password() doesn't change the value in the DB... So I tried
> > other function just to test like "register()" and in this case i even
> > have an error message saying "TypeError: list objects are
> > unhashable"... I really don't know what I'm doing wrong up here...
> > Below it's the controller and view... Please let me know if you have
> > any idea...
>
> > #
> > #View "index.html"
> > #
> > .
> > .
> > {{=LOAD('default','register',ajax_trap=True)}}
> > .
> > .
> > ###
> > #Controller: "default.py"
> > ###
> > def register():
> >    next = URL(r=request,f='index')
> >    return auth.register(onaccept=lambda form:
> > response.headers.update({['web2py-component-
> > command']:"document.location='%s'"%next}))
>
> > def otherAction():
> >    .
> >    .
> >    return dict(..)
>
> > def index():
> >    return (register = register(), otherAction=otherAction())
>
> > #
> > # Here is the error message
> > 
> > Traceback (most recent call last):
> >   File "gluon/restricted.py", line 173, in restricted
> >   File "C:/Documents and Settings/YannickT/web2py/applications/events/
> > controllers/default.py", line 70, in 
> >   File "gluon/globals.py", line 96, in 
> >   File "C:/Documents and Settings/YannickT/web2py/applications/events/
> > controllers/default.py", line 27, in register
> >   File "gluon/tools.py", line 1271, in register
> >   File "C:/Documents and Settings/YannickT/web2py/applications/events/
> > controllers/default.py", line 27, in 
> > TypeError: list objects are unhashable
>
> > Thanks for your help,
> > Yannick P.
>
> > On Mar 24, 10:17 pm, mdipierro  wrote:
>
> > > My bad
>
> > > auth.change_password(onaccept=lambda form:
> > > response.headers.update({'web2py-
> > > component-command']:"document.location='%s'"%next}))
>
> > > On Mar 24, 8:21 pm, Yannick  wrote:
>
> > > > Sorry but I have a lot of syntax error in the action:
>
> > > > auth.change_password(onaccept=lambda form: response.headers['web2py-
> > > > component-command']="document.location='%s'"%next))
>
> > > > I don't seems to see why... Please let me know if you see it...
> > > > Thanks,
>
> > > > On Mar 24, 2:00 pm, mdipierro  wrote:
>
> > > > > ###
> > > > > 
> > > > >   $("#pwdChangeForm").submit(function(){
> > > > >    url={{=URL(r=requet, f="changePwd")}};
> > > > >    ids = ['currentpwd', 'pwd1', 'pwd2'];
> > > > >    ajax(url, ids, 'confirmationMsg');   # This is the Ajax method that
> > > > > is coming with Web2py
> > > > >    return false;
>
> > > > > });
>
> > > > > 
>
> > > > > In view:
> > > > > {{=LOAD('defualt','changePwd',ajax_trap=True)}}
>
> > > > > ##
> > > > > # Action: (Here I want to use the Auth method named change_password. )
> > > > > 

[web2py] Re: Ajax and Auth API

2010-03-25 Thread Yannick

Hello thanks Massimo for the note... But I can't make it work... the
change_password() doesn't change the value in the DB... So I tried
other function just to test like "register()" and in this case i even
have an error message saying "TypeError: list objects are
unhashable"... I really don't know what I'm doing wrong up here...
Below it's the controller and view... Please let me know if you have
any idea...

#
#View "index.html"
#
.
.
{{=LOAD('default','register',ajax_trap=True)}}
.
.
###
#Controller: "default.py"
###
def register():
   next = URL(r=request,f='index')
   return auth.register(onaccept=lambda form:
response.headers.update({['web2py-component-
command']:"document.location='%s'"%next}))

def otherAction():
   .
   .
   return dict(..)

def index():
   return (register = register(), otherAction=otherAction())



#
# Here is the error message

Traceback (most recent call last):
  File "gluon/restricted.py", line 173, in restricted
  File "C:/Documents and Settings/YannickT/web2py/applications/events/
controllers/default.py", line 70, in 
  File "gluon/globals.py", line 96, in 
  File "C:/Documents and Settings/YannickT/web2py/applications/events/
controllers/default.py", line 27, in register
  File "gluon/tools.py", line 1271, in register
  File "C:/Documents and Settings/YannickT/web2py/applications/events/
controllers/default.py", line 27, in 
TypeError: list objects are unhashable



Thanks for your help,
Yannick P.

On Mar 24, 10:17 pm, mdipierro  wrote:
> My bad
>
> auth.change_password(onaccept=lambda form:
> response.headers.update({'web2py-
> component-command']:"document.location='%s'"%next}))
>
> On Mar 24, 8:21 pm, Yannick  wrote:
>
>
>
> > Sorry but I have a lot of syntax error in the action:
>
> > auth.change_password(onaccept=lambda form: response.headers['web2py-
> > component-command']="document.location='%s'"%next))
>
> > I don't seems to see why... Please let me know if you see it...
> > Thanks,
>
> > On Mar 24, 2:00 pm, mdipierro  wrote:
>
> > > ###
> > > 
> > >   $("#pwdChangeForm").submit(function(){
> > >    url={{=URL(r=requet, f="changePwd")}};
> > >    ids = ['currentpwd', 'pwd1', 'pwd2'];
> > >    ajax(url, ids, 'confirmationMsg');   # This is the Ajax method that
> > > is coming with Web2py
> > >    return false;
>
> > > });
>
> > > 
>
> > > In view:
> > > {{=LOAD('defualt','changePwd',ajax_trap=True)}}
>
> > > ##
> > > # Action: (Here I want to use the Auth method named change_password. )
> > > ##
> > > def changePwd:
> > >    next = URL(r=request,f='index')
> > >    return auth.change_password(onaccept=lambda form:\
> > >        response.headers['web2py-component-
> > > command'="document.location='%s'" % next)
>
> > > On Mar 24, 12:22 pm, Yannick  wrote:
>
> > > > Ok here is a view form to change user password:
> > > > ###
> > > > 
> > > >   $("#pwdChangeForm").submit(function(){
> > > >    url={{=URL(r=requet, f="changePwd")}};
> > > >    ids = ['currentpwd', 'pwd1', 'pwd2'];
> > > >    ajax(url, ids, 'confirmationMsg');   # This is the Ajax method that
> > > > is coming with Web2py
> > > >    return false;});
>
> > > > 
>
> > > > 
> > > > 
> > > >     Current password:     > > > name="currentpassword">
> > > >     new password:          > > > name="password1">
> > > >     Old password:           > > > name="password2">
> > > >     
> > > > 
> > > > ##
> > > > # Action: (Here I want to use the Auth method named change_password. )
> > > > ##
> > > > def changePwd:
> > > >    return auth.change_password()
>
> > > > So basically from the action I wan

[web2py] Re: Ajax and Auth API

2010-03-24 Thread Yannick
Sorry but I have a lot of syntax error in the action:

auth.change_password(onaccept=lambda form: response.headers['web2py-
component-command']="document.location='%s'"%next))

I don't seems to see why... Please let me know if you see it...
Thanks,


On Mar 24, 2:00 pm, mdipierro  wrote:
> ###
> 
>   $("#pwdChangeForm").submit(function(){
>    url={{=URL(r=requet, f="changePwd")}};
>    ids = ['currentpwd', 'pwd1', 'pwd2'];
>    ajax(url, ids, 'confirmationMsg');   # This is the Ajax method that
> is coming with Web2py
>    return false;
>
> });
>
> 
>
> In view:
> {{=LOAD('defualt','changePwd',ajax_trap=True)}}
>
> ##
> # Action: (Here I want to use the Auth method named change_password. )
> ##
> def changePwd:
>    next = URL(r=request,f='index')
>    return auth.change_password(onaccept=lambda form:\
>        response.headers['web2py-component-
> command'="document.location='%s'" % next)
>
> On Mar 24, 12:22 pm, Yannick  wrote:
>
>
>
> > Ok here is a view form to change user password:
> > ###
> > 
> >   $("#pwdChangeForm").submit(function(){
> >    url={{=URL(r=requet, f="changePwd")}};
> >    ids = ['currentpwd', 'pwd1', 'pwd2'];
> >    ajax(url, ids, 'confirmationMsg');   # This is the Ajax method that
> > is coming with Web2py
> >    return false;});
>
> > 
>
> > 
> > 
> >     Current password:     > name="currentpassword">
> >     new password:          > name="password1">
> >     Old password:           > name="password2">
> >     
> > 
> > ##
> > # Action: (Here I want to use the Auth method named change_password. )
> > ######
> > def changePwd:
> >    return auth.change_password()
>
> > So basically from the action I wanted to be able to know when the form
> > is validated and return a confirmation that will be display through
> > AJAX. I hope you understand what I mean here... Instead of returning a
> > form, I want to return a string that represent a success or an Error
> > message... How can I do that without the need to create my how code to
> > change the password . Thanks!
>
> > Yannick P.
>
> > On Mar 24, 12:11 pm, mdipierro  wrote:
>
> > > show us your action and explan how you want it to behave in details,
> > > and I can post an example.
>
> > > On Mar 24, 11:06 am, Yannick  wrote:
>
> > > > Sorry I really don't understand... I have to code my own Auth function
> > > > like "register(), login() etc..." it that what you meant ?
>
> > > > Yes I know I have to create my own action but I wanted to re-use the
> > > > Auth Api function by calling them inside my action...
> > > > So basically what you are saying is that i can't do it that way ?
>
> > > > Please let me know if I'm missing something here...
>
> > > > Thanks a lot,
> > > > Yannick P.
> > > > On Mar 24, 11:16 am, mdipierro  wrote:
>
> > > > > You should make your own action and use {{=LOAD(..)}}
>
> > > > > On Mar 24, 9:32 am, Yannick  wrote:
>
> > > > > > Hello mate,
> > > > > > This can be an easy question but I don't know how to used the Web2py
> > > > > > "Ajax (u,s,t)" function to call build-in Web2py Authentication API.
> > > > > > It's there any example ?...
>
> > > > > > There is a cool example using JDiv:
> > > > > >  def register():
> > > > > >     return auth.register(onaccept=lambda form: jDiv.flash('try
> > > > > > login'))
>
> > > > > > This is cool BUT I DON'T want to use jDiv...
> > > > > > How can I do the same without using JDIV... But instead i want to 
> > > > > > use
> > > > > > AJAX(u,s,t){} function just like any other form that use Ajax 
> > > > > > function
> > > > > > to send value ( The only difference here is the fact that I'll send
> > > > > > value to already build Auth API like auth.register(),
> > > > > > auth.password_change(), auth.login() etc... )
>
> > > > > > Please let me know if you have any hints.
>
> > > > > > Yannick P.

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: Ajax and Auth API

2010-03-24 Thread Yannick
Ok here is a view form to change user password:
###

  $("#pwdChangeForm").submit(function(){
   url={{=URL(r=requet, f="changePwd")}};
   ids = ['currentpwd', 'pwd1', 'pwd2'];
   ajax(url, ids, 'confirmationMsg');   # This is the Ajax method that
is coming with Web2py
   return false;
});




Current password:
new password: 
Old password:  


##
# Action: (Here I want to use the Auth method named change_password. )
##
def changePwd:
   return auth.change_password()

So basically from the action I wanted to be able to know when the form
is validated and return a confirmation that will be display through
AJAX. I hope you understand what I mean here... Instead of returning a
form, I want to return a string that represent a success or an Error
message... How can I do that without the need to create my how code to
change the password . Thanks!

Yannick P.


On Mar 24, 12:11 pm, mdipierro  wrote:
> show us your action and explan how you want it to behave in details,
> and I can post an example.
>
> On Mar 24, 11:06 am, Yannick  wrote:
>
>
>
> > Sorry I really don't understand... I have to code my own Auth function
> > like "register(), login() etc..." it that what you meant ?
>
> > Yes I know I have to create my own action but I wanted to re-use the
> > Auth Api function by calling them inside my action...
> > So basically what you are saying is that i can't do it that way ?
>
> > Please let me know if I'm missing something here...
>
> > Thanks a lot,
> > Yannick P.
> > On Mar 24, 11:16 am, mdipierro  wrote:
>
> > > You should make your own action and use {{=LOAD(..)}}
>
> > > On Mar 24, 9:32 am, Yannick  wrote:
>
> > > > Hello mate,
> > > > This can be an easy question but I don't know how to used the Web2py
> > > > "Ajax (u,s,t)" function to call build-in Web2py Authentication API.
> > > > It's there any example ?...
>
> > > > There is a cool example using JDiv:
> > > >  def register():
> > > >     return auth.register(onaccept=lambda form: jDiv.flash('try
> > > > login'))
>
> > > > This is cool BUT I DON'T want to use jDiv...
> > > > How can I do the same without using JDIV... But instead i want to use
> > > > AJAX(u,s,t){} function just like any other form that use Ajax function
> > > > to send value ( The only difference here is the fact that I'll send
> > > > value to already build Auth API like auth.register(),
> > > > auth.password_change(), auth.login() etc... )
>
> > > > Please let me know if you have any hints.
>
> > > > Yannick P.

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: Ajax and Auth API

2010-03-24 Thread Yannick
Sorry I really don't understand... I have to code my own Auth function
like "register(), login() etc..." it that what you meant ?

Yes I know I have to create my own action but I wanted to re-use the
Auth Api function by calling them inside my action...
So basically what you are saying is that i can't do it that way ?

Please let me know if I'm missing something here...

Thanks a lot,
Yannick P.
On Mar 24, 11:16 am, mdipierro  wrote:
> You should make your own action and use {{=LOAD(..)}}
>
> On Mar 24, 9:32 am, Yannick  wrote:
>
>
>
> > Hello mate,
> > This can be an easy question but I don't know how to used the Web2py
> > "Ajax (u,s,t)" function to call build-in Web2py Authentication API.
> > It's there any example ?...
>
> > There is a cool example using JDiv:
> >  def register():
> >     return auth.register(onaccept=lambda form: jDiv.flash('try
> > login'))
>
> > This is cool BUT I DON'T want to use jDiv...
> > How can I do the same without using JDIV... But instead i want to use
> > AJAX(u,s,t){} function just like any other form that use Ajax function
> > to send value ( The only difference here is the fact that I'll send
> > value to already build Auth API like auth.register(),
> > auth.password_change(), auth.login() etc... )
>
> > Please let me know if you have any hints.
>
> > Yannick P.

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Ajax and Auth API

2010-03-24 Thread Yannick
Hello mate,
This can be an easy question but I don't know how to used the Web2py
"Ajax (u,s,t)" function to call build-in Web2py Authentication API.
It's there any example ?...

There is a cool example using JDiv:
 def register():
return auth.register(onaccept=lambda form: jDiv.flash('try
login'))

This is cool BUT I DON'T want to use jDiv...
How can I do the same without using JDIV... But instead i want to use
AJAX(u,s,t){} function just like any other form that use Ajax function
to send value ( The only difference here is the fact that I'll send
value to already build Auth API like auth.register(),
auth.password_change(), auth.login() etc... )


Please let me know if you have any hints.

Yannick P.

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Retrieving latest update record from DB ???

2010-03-06 Thread Yannick
Hello mate,
I was wondering if any one of you knows how to retrieve the latest
UPDATE record in Web2py ??? Like for example how to do this using DAL
of Web2py:

- Select top 1  from  order by RecordTime desc

OR this one:

- Select  from  order by RecordTime asc LIMIT 1


Anyway please let me know how I can select the latest update record on
a table that contain "RecordDateTime" as one of his column. I'm using
DB Postgres.

Thanks very much,

Yannick P.

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: Weird Error Message From Web2py - OSError: [Errno 24] Too many open files ???????

2010-02-21 Thread Yannick
Thanks for the note... I'm usually running Web2py through Wing IDE
since it is easy for debugging...
Please let me know if you have any questions regarding this issue

Yannick P.

On Feb 21, 4:02 pm, Massimo Di Pierro  wrote:
> This is interesting I will take a look asap.
>
> Meanwhile, if you are not using cron, run web2py with -N.
>
> Massimo
>
> On Feb 21, 2010, at 1:28 PM, Yannick wrote:
>
> > Hello mate,
> > I'm using the latest version of Web2py and Mac OS and since few web2py
> > release I have been having this problem and I don't know what is the
> > cause of this...
> > When it happens I can't access my application anymore I got a this
> > message from the browser: "Internal error
> > Ticket issued: unrecoverable "
> > So basicallly I just have to reboot the server to get my appl working
> > again...
>
> > Here is the exceptions I got from Web2py:
>
> > ###
> > Exception in thread Thread-106:
> > Traceback (most recent call last):
> >  File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/
> > python2.5/threading.py", line 486, in __bootstrap_inner
> >    self.run()
> >  File "/Users/OnemeWs/App Server/web2py/gluon/contrib/cron.py", line
> > 229, in run
> >    shell=self.shell)
> >  File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/
> > python2.5/subprocess.py", line 587, in __init__
> >    errread, errwrite) = self._get_handles(stdin, stdout, stderr)
> >  File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/
> > python2.5/subprocess.py", line 953, in _get_handles
> >    errread, errwrite = os.pipe()
> > OSError: [Errno 24] Too many open files
> > 
> > Exception in thread Thread-107:
> > Traceback (most recent call last):
> >  File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/
> > python2.5/threading.py", line 486, in __bootstrap_inner
> >    self.run()
> >  File "/Users/OnemeWs/App Server/web2py/gluon/contrib/cron.py", line
> > 229, in run
> >    shell=self.shell)
> >  File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/
> > python2.5/subprocess.py", line 587, in __init__
> >    errread, errwrite) = self._get_handles(stdin, stdout, stderr)
> >  File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/
> > python2.5/subprocess.py", line 933, in _get_handles
> >    p2cread, p2cwrite = os.pipe()
> > OSError: [Errno 24] Too many open files
> > #
> > Exception in thread Thread-1:
> > Traceback (most recent call last):
> >  File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/
> > python2.5/threading.py", line 486, in __bootstrap_inner
> >    self.run()
> >  File "/Users/OnemeWs/App Server/web2py/gluon/contrib/cron.py", line
> > 55, in run
> >    s.run()
> >  File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/
> > python2.5/sched.py", line 114, in run
> >  File "/Users/OnemeWs/App Server/web2py/gluon/contrib/cron.py", line
> > 47, in launch
> >    crondance(self.path, 'hard', startup = self.startup)
> >  File "/Users/OnemeWs/App Server/web2py/gluon/contrib/cron.py", line
> > 261, in crondance
> >    f = open(crontab, 'rt')
> > IOError: [Errno 24] Too many open files:
> > ##
>
> > Please any idea ?

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Weird Error Message From Web2py - OSError: [Errno 24] Too many open files ???????

2010-02-21 Thread Yannick
Hello mate,
I'm using the latest version of Web2py and Mac OS and since few web2py
release I have been having this problem and I don't know what is the
cause of this...
When it happens I can't access my application anymore I got a this
message from the browser: "Internal error
Ticket issued: unrecoverable "
So basicallly I just have to reboot the server to get my appl working
again...

Here is the exceptions I got from Web2py:

###
Exception in thread Thread-106:
Traceback (most recent call last):
  File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/threading.py", line 486, in __bootstrap_inner
self.run()
  File "/Users/OnemeWs/App Server/web2py/gluon/contrib/cron.py", line
229, in run
shell=self.shell)
  File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/subprocess.py", line 587, in __init__
errread, errwrite) = self._get_handles(stdin, stdout, stderr)
  File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/subprocess.py", line 953, in _get_handles
errread, errwrite = os.pipe()
OSError: [Errno 24] Too many open files

Exception in thread Thread-107:
Traceback (most recent call last):
  File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/threading.py", line 486, in __bootstrap_inner
self.run()
  File "/Users/OnemeWs/App Server/web2py/gluon/contrib/cron.py", line
229, in run
shell=self.shell)
  File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/subprocess.py", line 587, in __init__
errread, errwrite) = self._get_handles(stdin, stdout, stderr)
  File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/subprocess.py", line 933, in _get_handles
p2cread, p2cwrite = os.pipe()
OSError: [Errno 24] Too many open files
#
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/threading.py", line 486, in __bootstrap_inner
self.run()
  File "/Users/OnemeWs/App Server/web2py/gluon/contrib/cron.py", line
55, in run
s.run()
  File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/
python2.5/sched.py", line 114, in run
  File "/Users/OnemeWs/App Server/web2py/gluon/contrib/cron.py", line
47, in launch
crondance(self.path, 'hard', startup = self.startup)
  File "/Users/OnemeWs/App Server/web2py/gluon/contrib/cron.py", line
261, in crondance
f = open(crontab, 'rt')
IOError: [Errno 24] Too many open files:
##

Please any idea ?

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: Alert when email not sent sucessfully !

2010-01-25 Thread Yannick
Thanks for the note... Yes that's why I was asking because I don't
have a verification link on my appl... I was wondering if there are a
way to know about the failure ASAP... the failure message from SMTP
come later in the process...

On Jan 25, 11:32 pm, Thadeus Burgess  wrote:
> Check the servers SMTP for mail-delivery failure messages.
>
> Beyond that, if they never click your verification link thats a fairly
> good indication the email is false, you could always use anything past
> 2 weeks is probably fake filters too.
>
> -Thadeus
>
> On Mon, Jan 25, 2010 at 10:29 PM, Yannick  wrote:
> > Hello mate,
> > This may be a stupid question... I wonder if there is way to know if
> > an email has been successfully send or not... Like for example someone
> > can register  to a website using a fake (valid format email) email and
> > the application will send an email but I wonder how to track these
> > cases... Like have a sort of alert when the email is not successfully
> > sent in web2py...
>
> > Thanks a lot for your help,
>
> > Cheers,
> > Yannick P.
>
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "web2py-users" group.
> > To post to this group, send email to web...@googlegroups.com.
> > To unsubscribe from this group, send email to 
> > web2py+unsubscr...@googlegroups.com.
> > For more options, visit this group 
> > athttp://groups.google.com/group/web2py?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Alert when email not sent sucessfully !

2010-01-25 Thread Yannick
Hello mate,
This may be a stupid question... I wonder if there is way to know if
an email has been successfully send or not... Like for example someone
can register  to a website using a fake (valid format email) email and
the application will send an email but I wonder how to track these
cases... Like have a sort of alert when the email is not successfully
sent in web2py...

Thanks a lot for your help,

Cheers,
Yannick P.

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Several File Upload Using Ajax... Any Example available by any chance ?

2010-01-13 Thread Yannick
Hello mate,
I just wonder if there is an example of several upload file (all at
once a little bit like gmail attachment files) with Web2py ?
If you know some example... Please let me know...

Cheers,
Yannick P.
-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.




[web2py:38310] Re: Fail login doesn't return an errorm msg

2010-01-04 Thread Yannick

I just test back this issue using the latest version of web2py and
still I have a double submission, I don't have any feedback message
coming from the session...

Here is my development environment:

OS :  Mac OS X Version 10.6.2
Python :   2.5.4
DB:   PostgreSQL 8.4
Web2py : 1.74.5
Wing IDE Professional 3.2


Do you please have any any hints that can help here ? I'm desperately
looking for a solution or hints...

Thanks a lot for your help...

Cheers,
Yannick P.

On Dec 21 2009, 11:40 pm, Yannick  wrote:
> Hello Massimo,
> Just wonder have you been able to reproduce the scenario ? If yes any
> hints ?
>
> Thanks for your help...
> Yannick P.
>
> On Dec 17, 8:30 pm, Yannick  wrote:
>
> > Hi Massimo,
> > I just sent you the application so that you can reproduce this
> > error...
>
> > Thanks again,
> > Yannick P.
>
> > On Dec 16, 6:44 pm, Yannick  wrote:
>
> > > I just test it and the error I got in 1.74.1 has been fixed...
> > > Thanks... However the double redirection issue is still pending...
>
> > > I tried to print this in the model : request.function and
> > > request.vars  and here is the result when I submit the form:
> > > login
> > >  > > '7c6c9864-567e-4aec-9339-86b554b031ce', 'password': 'a',
> > > '_formname': 'login', '_next': ''}>
> > > login
> > > 
>
> > > You can see there is a double redirect...
>
> > > I put a break point in the login function inside tool.py and watch the
> > > "session":
> > > the session.flash looks to be empty like session.flash = u""
> > > And at the end of the process (break point finish) the value of the
> > > session said "error evaluating"  like :
> > > session = 
>
> > > I'm really running out of idea about debugging this issue... It used
> > > to work with early previous version of web2py... Is anybody has an
> > > idea or already have this issue ?
>
> > > Thanks for your help...
> > > Yannick P.
>
> > > On Dec 16, 8:11 am, Yannick  wrote:
>
> > > > Thanks for the note... I'll test and confirm it late this afternoon...
> > > > Tks
>
> > > > On Dec 15, 9:37 pm, mdipierro  wrote:
>
> > > > > I think this is now fixed in trunk. Can you confirm?
>
> > > > > On Dec 15, 8:04 pm, mdipierro  wrote:
>
> > > > > > fixing this tonight
>
> > > > > > On Dec 15, 6:28 pm, Yannick  wrote:
>
> > > > > > > Hmmm Think there is an issue with this release... Please take a 
> > > > > > > look
> > > > > > > to the ticket generated after a user tried to login using a fake
> > > > > > > password:
>
> > > > > > > 
>
> > > > > > > Traceback (most recent call last):
> > > > > > >   File "/Users/OnemeWs/App Server/web2py/gluon/restricted.py", 
> > > > > > > line
> > > > > > > 173, in restricted
> > > > > > >     exec ccode in environment
> > > > > > >   File "/Users/OnemeWs/App Server/web2py/applications/BeUnickDemo/
> > > > > > > controllers/default.py", line 171, in 
>
> > > > > > >   File "/Users/OnemeWs/App Server/web2py/gluon/globals.py", line 
> > > > > > > 96,
> > > > > > > in 
> > > > > > >     self._caller = lambda f: f()
> > > > > > >   File "/Users/OnemeWs/App Server/web2py/applications/BeUnickDemo/
> > > > > > > controllers/default.py", line 134, in login
> > > > > > >     return dict(loginform = auth.login())
> > > > > > >   File "/Users/OnemeWs/App Server/web2py/gluon/tools.py", line 
> > > > > > > 980, in
> > > > > > > login
> > > > > > >     onvalidation=onvalidation):
> > > > > > >   File "/Users/OnemeWs/App Server/web2py/gluon/sqlhtml.py", line 
> > > > > > > 771,
> > > > > > > in accepts
> > > > > > >     onvalidation,
> > > > > > >   File "/Users/OnemeWs/App Server/web2py/gluon/html.py", line 
> > > > > > > 1267, in
> > > > > > > 

[web2py:38105] Just Take a Time to wish you ALL - HAPPY NEW YEAR 2010 !

2009-12-30 Thread Yannick
I wish you all the best for this new year 2010... A year full of
Health, Wealth, Peace, Joy, Success in all you project... And a lot
more :)

Here is a small e-card I created for fun and host on my web2py small
website...

http://www.onemewebservices.com/onemewish
( This e-card may not be working properly if you are using firefox
version lower than 3.5 sorry for that)


Once again special thanks to Massimo for all he has done for us
through this powerful tool... I'm sure 2010 will be another great year
for Web2py...


Yannick P.

--

You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.




[web2py:37635] Re: Fail login doesn't return an errorm msg

2009-12-21 Thread Yannick
Hello Massimo,
Just wonder have you been able to reproduce the scenario ? If yes any
hints ?

Thanks for your help...
Yannick P.

On Dec 17, 8:30 pm, Yannick  wrote:
> Hi Massimo,
> I just sent you the application so that you can reproduce this
> error...
>
> Thanks again,
> Yannick P.
>
> On Dec 16, 6:44 pm, Yannick  wrote:
>
> > I just test it and the error I got in 1.74.1 has been fixed...
> > Thanks... However the double redirection issue is still pending...
>
> > I tried to print this in the model : request.function and
> > request.vars  and here is the result when I submit the form:
> > login
> >  > '7c6c9864-567e-4aec-9339-86b554b031ce', 'password': 'a',
> > '_formname': 'login', '_next': ''}>
> > login
> > 
>
> > You can see there is a double redirect...
>
> > I put a break point in the login function inside tool.py and watch the
> > "session":
> > the session.flash looks to be empty like session.flash = u""
> > And at the end of the process (break point finish) the value of the
> > session said "error evaluating"  like :
> > session = 
>
> > I'm really running out of idea about debugging this issue... It used
> > to work with early previous version of web2py... Is anybody has an
> > idea or already have this issue ?
>
> > Thanks for your help...
> > Yannick P.
>
> > On Dec 16, 8:11 am, Yannick  wrote:
>
> > > Thanks for the note... I'll test and confirm it late this afternoon...
> > > Tks
>
> > > On Dec 15, 9:37 pm, mdipierro  wrote:
>
> > > > I think this is now fixed in trunk. Can you confirm?
>
> > > > On Dec 15, 8:04 pm, mdipierro  wrote:
>
> > > > > fixing this tonight
>
> > > > > On Dec 15, 6:28 pm, Yannick  wrote:
>
> > > > > > Hmmm Think there is an issue with this release... Please take a look
> > > > > > to the ticket generated after a user tried to login using a fake
> > > > > > password:
>
> > > > > > 
>
> > > > > > Traceback (most recent call last):
> > > > > >   File "/Users/OnemeWs/App Server/web2py/gluon/restricted.py", line
> > > > > > 173, in restricted
> > > > > >     exec ccode in environment
> > > > > >   File "/Users/OnemeWs/App Server/web2py/applications/BeUnickDemo/
> > > > > > controllers/default.py", line 171, in 
>
> > > > > >   File "/Users/OnemeWs/App Server/web2py/gluon/globals.py", line 96,
> > > > > > in 
> > > > > >     self._caller = lambda f: f()
> > > > > >   File "/Users/OnemeWs/App Server/web2py/applications/BeUnickDemo/
> > > > > > controllers/default.py", line 134, in login
> > > > > >     return dict(loginform = auth.login())
> > > > > >   File "/Users/OnemeWs/App Server/web2py/gluon/tools.py", line 980, 
> > > > > > in
> > > > > > login
> > > > > >     onvalidation=onvalidation):
> > > > > >   File "/Users/OnemeWs/App Server/web2py/gluon/sqlhtml.py", line 
> > > > > > 771,
> > > > > > in accepts
> > > > > >     onvalidation,
> > > > > >   File "/Users/OnemeWs/App Server/web2py/gluon/html.py", line 1267, 
> > > > > > in
> > > > > > accepts
> > > > > >     status = self._traverse(status)
> > > > > >   File "/Users/OnemeWs/App Server/web2py/gluon/html.py", line 449, 
> > > > > > in
> > > > > > _traverse
> > > > > >     newstatus = c._traverse(status) and newstatus
> > > > > >   File "/Users/OnemeWs/App Server/web2py/gluon/html.py", line 449, 
> > > > > > in
> > > > > > _traverse
> > > > > >     newstatus = c._traverse(status) and newstatus
> > > > > >   File "/Users/OnemeWs/App Server/web2py/gluon/html.py", line 449, 
> > > > > > in
> > > > > > _traverse
> > > > > >     newstatus = c._traverse(status) and newstatus
> > > > > >   File "/Users/OnemeWs/App Server/web2py/gluon/html.py", line 449, 
> > > > > &

[web2py:37611] Re: Need help with custom widget

2009-12-21 Thread Yannick
I think this will do if you use jquery:

 $("#idTextarea").focus(function () {
 $(this).val("")
});
 make sure to have the id in the textarea html code

Hope it helps it not please provide and example of what you want...

Thanks,
Yannick P.


On Dec 21, 8:09 am, weheh  wrote:
> I have a textarea with some welcoming text already in it, but I'd like
> a javascript to clear the text with when the user sets focus on the
> textarea. The textarea and the rest of my form, of which textarea is a
> part, are created using a custom form that also uses widgets to
> display the form fields. I think I need a custom widget to do what I
> want. I've read the doc but just can't seem to make it work for me.
> I'd appreciate it if someone could show me how to do it. Thx.

--

You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.




[web2py:37494] Re: web2py 1.74.2 is OUT

2009-12-17 Thread Yannick
@ mr.freeze: Yes my auth_user do have a table name. I just didn't
display the all code for the model...

@ Massimo: thanks for your help, I just sent you the application so
you can reproduce the scenario.

Thanks for your help.

Yannick P.

On Dec 17, 11:40 am, "mr.freeze"  wrote:
> Yannick, in your example code from the other thread, your auth_user
> table doesn't have a table name.
>
> On Dec 17, 8:09 am, Yannick  wrote:
>
> > This issue here i have no idea how to fix it using the latest version
> > 1.74.3
>
> >http://groups.google.com/group/web2py/browse_thread/thread/f6899f2583...
>
> > Please help :)
>
> > Yannick P.
>
> > On Dec 17, 3:10 am, szimszon  wrote:
>
> > > Confirm.
>
> > > On dec. 17, 00:16, mdipierro  wrote:
>
> > > > fixed in 1.74.3. Thank you!
>
> > > > On Dec 16, 4:48 pm, Oleg  wrote:
>
> > > > > in db.py
> > > > > db.define_table('test', Field('name'))
>
> > > > > in default.py
> > > > > def index():
> > > > >   session.test_id = db.test.insert(name='test_name')
> > > > >   return dict()
>
> > > > > On Dec 16, 5:51 pm, mdipierro  wrote:
>
> > > > > > I need to see the action that triggers this.
>
> > > > > > On Dec 16, 10:02 am, Oleg  wrote:
>
> > > > > > > have the same problem. Under 1.72.3 it worked.
> > > > > > > it is broken somewhere on the way to 1.73... hm.. or I understand
> > > > > > > something wrong...
>
> > > > > > > Oleg
>
> > > > > > > On Dec 16, 8:52 am, szimszon  wrote:
>
> > > > > > > > Hi,
>
> > > > > > > > I have an error in 1.74.2:
>
> > > > > > > > (dp1
> > > > > > > > S'output'
> > > > > > > > p2
> > > > > > > > S''
> > > > > > > > sS'layer'
> > > > > > > > p3
> > > > > > > > S'Framework'
> > > > > > > > p4
> > > > > > > > sS'code'
> > > > > > > > p5
> > > > > > > > S''
> > > > > > > > sS'traceback'
> > > > > > > > p6
> > > > > > > > S'Traceback (most recent call last):\n  File "gluon/main.py", 
> > > > > > > > line
> > > > > > > > 505, in wsgib
> > > > > > > > ase\n    session._try_store_on_disk(request, response)\n  File 
> > > > > > > > "gluon/
> > > > > > > > globals.py
> > > > > > > > ", line 375, in _try_store_on_disk\n    cPickle.dump(dict(self),
> > > > > > > > response.sessio
> > > > > > > > n_file)\nPicklingError: Value returned by  > > > > > > > Reference_pickler
> > > > > > > > at 0x8c86d
> > > > > > > > 4c> must be string or tuple
> > > > > > > > \n'
> > > > > > > > p7
> > > > > > > > s.
>
> > > > > > > > On dec. 16, 07:13, mdipierro  wrote:
>
> > > > > > > > > thanks to people who reported bugs in 1.74.1.
>
> > > > > > > > > Massimo

--

You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.




[web2py:37493] Re: Fail login doesn't return an errorm msg

2009-12-17 Thread Yannick
Hi Massimo,
I just sent you the application so that you can reproduce this
error...

Thanks again,
Yannick P.

On Dec 16, 6:44 pm, Yannick  wrote:
> I just test it and the error I got in 1.74.1 has been fixed...
> Thanks... However the double redirection issue is still pending...
>
> I tried to print this in the model : request.function and
> request.vars  and here is the result when I submit the form:
> login
>  '7c6c9864-567e-4aec-9339-86b554b031ce', 'password': 'a',
> '_formname': 'login', '_next': ''}>
> login
> 
>
> You can see there is a double redirect...
>
> I put a break point in the login function inside tool.py and watch the
> "session":
> the session.flash looks to be empty like session.flash = u""
> And at the end of the process (break point finish) the value of the
> session said "error evaluating"  like :
> session = 
>
> I'm really running out of idea about debugging this issue... It used
> to work with early previous version of web2py... Is anybody has an
> idea or already have this issue ?
>
> Thanks for your help...
> Yannick P.
>
> On Dec 16, 8:11 am, Yannick  wrote:
>
> > Thanks for the note... I'll test and confirm it late this afternoon...
> > Tks
>
> > On Dec 15, 9:37 pm, mdipierro  wrote:
>
> > > I think this is now fixed in trunk. Can you confirm?
>
> > > On Dec 15, 8:04 pm, mdipierro  wrote:
>
> > > > fixing this tonight
>
> > > > On Dec 15, 6:28 pm, Yannick  wrote:
>
> > > > > Hmmm Think there is an issue with this release... Please take a look
> > > > > to the ticket generated after a user tried to login using a fake
> > > > > password:
>
> > > > > 
>
> > > > > Traceback (most recent call last):
> > > > >   File "/Users/OnemeWs/App Server/web2py/gluon/restricted.py", line
> > > > > 173, in restricted
> > > > >     exec ccode in environment
> > > > >   File "/Users/OnemeWs/App Server/web2py/applications/BeUnickDemo/
> > > > > controllers/default.py", line 171, in 
>
> > > > >   File "/Users/OnemeWs/App Server/web2py/gluon/globals.py", line 96,
> > > > > in 
> > > > >     self._caller = lambda f: f()
> > > > >   File "/Users/OnemeWs/App Server/web2py/applications/BeUnickDemo/
> > > > > controllers/default.py", line 134, in login
> > > > >     return dict(loginform = auth.login())
> > > > >   File "/Users/OnemeWs/App Server/web2py/gluon/tools.py", line 980, in
> > > > > login
> > > > >     onvalidation=onvalidation):
> > > > >   File "/Users/OnemeWs/App Server/web2py/gluon/sqlhtml.py", line 771,
> > > > > in accepts
> > > > >     onvalidation,
> > > > >   File "/Users/OnemeWs/App Server/web2py/gluon/html.py", line 1267, in
> > > > > accepts
> > > > >     status = self._traverse(status)
> > > > >   File "/Users/OnemeWs/App Server/web2py/gluon/html.py", line 449, in
> > > > > _traverse
> > > > >     newstatus = c._traverse(status) and newstatus
> > > > >   File "/Users/OnemeWs/App Server/web2py/gluon/html.py", line 449, in
> > > > > _traverse
> > > > >     newstatus = c._traverse(status) and newstatus
> > > > >   File "/Users/OnemeWs/App Server/web2py/gluon/html.py", line 449, in
> > > > > _traverse
> > > > >     newstatus = c._traverse(status) and newstatus
> > > > >   File "/Users/OnemeWs/App Server/web2py/gluon/html.py", line 449, in
> > > > > _traverse
> > > > >     newstatus = c._traverse(status) and newstatus
> > > > >   File "/Users/OnemeWs/App Server/web2py/gluon/html.py", line 456, in
> > > > > _traverse
> > > > >     newstatus = self._validate()
> > > > >   File "/Users/OnemeWs/App Server/web2py/gluon/html.py", line 1074, in
> > > > > _validate
> > > > >     (value, errors) = validator(value)
> > > > >   File "/Users/OnemeWs/App Server/web2py/gluon/validators.py", line
> > > > > 728, in __call__
> > > > >     if (not self.banned or not self.banned.match(domain)) \
> >

[web2py:37448] Re: web2py 1.74.2 is OUT

2009-12-17 Thread Yannick
This issue here i have no idea how to fix it using the latest version
1.74.3

http://groups.google.com/group/web2py/browse_thread/thread/f6899f258368382f/71297e7132c2760c#71297e7132c2760c

Please help :)

Yannick P.

On Dec 17, 3:10 am, szimszon  wrote:
> Confirm.
>
> On dec. 17, 00:16, mdipierro  wrote:
>
> > fixed in 1.74.3. Thank you!
>
> > On Dec 16, 4:48 pm, Oleg  wrote:
>
> > > in db.py
> > > db.define_table('test', Field('name'))
>
> > > in default.py
> > > def index():
> > >   session.test_id = db.test.insert(name='test_name')
> > >   return dict()
>
> > > On Dec 16, 5:51 pm, mdipierro  wrote:
>
> > > > I need to see the action that triggers this.
>
> > > > On Dec 16, 10:02 am, Oleg  wrote:
>
> > > > > have the same problem. Under 1.72.3 it worked.
> > > > > it is broken somewhere on the way to 1.73... hm.. or I understand
> > > > > something wrong...
>
> > > > > Oleg
>
> > > > > On Dec 16, 8:52 am, szimszon  wrote:
>
> > > > > > Hi,
>
> > > > > > I have an error in 1.74.2:
>
> > > > > > (dp1
> > > > > > S'output'
> > > > > > p2
> > > > > > S''
> > > > > > sS'layer'
> > > > > > p3
> > > > > > S'Framework'
> > > > > > p4
> > > > > > sS'code'
> > > > > > p5
> > > > > > S''
> > > > > > sS'traceback'
> > > > > > p6
> > > > > > S'Traceback (most recent call last):\n  File "gluon/main.py", line
> > > > > > 505, in wsgib
> > > > > > ase\n    session._try_store_on_disk(request, response)\n  File 
> > > > > > "gluon/
> > > > > > globals.py
> > > > > > ", line 375, in _try_store_on_disk\n    cPickle.dump(dict(self),
> > > > > > response.sessio
> > > > > > n_file)\nPicklingError: Value returned by  > > > > > Reference_pickler
> > > > > > at 0x8c86d
> > > > > > 4c> must be string or tuple
> > > > > > \n'
> > > > > > p7
> > > > > > s.
>
> > > > > > On dec. 16, 07:13, mdipierro  wrote:
>
> > > > > > > thanks to people who reported bugs in 1.74.1.
>
> > > > > > > Massimo

--

You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.




[web2py:37411] Re: Fail login doesn't return an errorm msg

2009-12-16 Thread Yannick
I just test it and the error I got in 1.74.1 has been fixed...
Thanks... However the double redirection issue is still pending...

I tried to print this in the model : request.function and
request.vars  and here is the result when I submit the form:
login

login


You can see there is a double redirect...

I put a break point in the login function inside tool.py and watch the
"session":
the session.flash looks to be empty like session.flash = u""
And at the end of the process (break point finish) the value of the
session said "error evaluating"  like :
session = 

I'm really running out of idea about debugging this issue... It used
to work with early previous version of web2py... Is anybody has an
idea or already have this issue ?

Thanks for your help...
Yannick P.

On Dec 16, 8:11 am, Yannick  wrote:
> Thanks for the note... I'll test and confirm it late this afternoon...
> Tks
>
> On Dec 15, 9:37 pm, mdipierro  wrote:
>
> > I think this is now fixed in trunk. Can you confirm?
>
> > On Dec 15, 8:04 pm, mdipierro  wrote:
>
> > > fixing this tonight
>
> > > On Dec 15, 6:28 pm, Yannick  wrote:
>
> > > > Hmmm Think there is an issue with this release... Please take a look
> > > > to the ticket generated after a user tried to login using a fake
> > > > password:
>
> > > > 
>
> > > > Traceback (most recent call last):
> > > >   File "/Users/OnemeWs/App Server/web2py/gluon/restricted.py", line
> > > > 173, in restricted
> > > >     exec ccode in environment
> > > >   File "/Users/OnemeWs/App Server/web2py/applications/BeUnickDemo/
> > > > controllers/default.py", line 171, in 
>
> > > >   File "/Users/OnemeWs/App Server/web2py/gluon/globals.py", line 96,
> > > > in 
> > > >     self._caller = lambda f: f()
> > > >   File "/Users/OnemeWs/App Server/web2py/applications/BeUnickDemo/
> > > > controllers/default.py", line 134, in login
> > > >     return dict(loginform = auth.login())
> > > >   File "/Users/OnemeWs/App Server/web2py/gluon/tools.py", line 980, in
> > > > login
> > > >     onvalidation=onvalidation):
> > > >   File "/Users/OnemeWs/App Server/web2py/gluon/sqlhtml.py", line 771,
> > > > in accepts
> > > >     onvalidation,
> > > >   File "/Users/OnemeWs/App Server/web2py/gluon/html.py", line 1267, in
> > > > accepts
> > > >     status = self._traverse(status)
> > > >   File "/Users/OnemeWs/App Server/web2py/gluon/html.py", line 449, in
> > > > _traverse
> > > >     newstatus = c._traverse(status) and newstatus
> > > >   File "/Users/OnemeWs/App Server/web2py/gluon/html.py", line 449, in
> > > > _traverse
> > > >     newstatus = c._traverse(status) and newstatus
> > > >   File "/Users/OnemeWs/App Server/web2py/gluon/html.py", line 449, in
> > > > _traverse
> > > >     newstatus = c._traverse(status) and newstatus
> > > >   File "/Users/OnemeWs/App Server/web2py/gluon/html.py", line 449, in
> > > > _traverse
> > > >     newstatus = c._traverse(status) and newstatus
> > > >   File "/Users/OnemeWs/App Server/web2py/gluon/html.py", line 456, in
> > > > _traverse
> > > >     newstatus = self._validate()
> > > >   File "/Users/OnemeWs/App Server/web2py/gluon/html.py", line 1074, in
> > > > _validate
> > > >     (value, errors) = validator(value)
> > > >   File "/Users/OnemeWs/App Server/web2py/gluon/validators.py", line
> > > > 728, in __call__
> > > >     if (not self.banned or not self.banned.match(domain)) \
> > > > AttributeError: 'lazyT' object has no attribute 'match'
>
> > > > 
>
> > > > Anyway idea ?
>
> > > > Yannick P.
>
> > > > On Dec 14, 11:30 pm, mdipierro  wrote:
>
> > > > > I do not know. Glad it is fixed anyway.
>
> > > > > On Dec 14, 9:19 pm, Yannick  wrote:
>
> > > > > > Hello Massimo,
> > > > > > Thanks I just test the new release and realized that the double
> > > > > > redirect seem to be fixed on the Auth - Login I just wonder what
> > > >

[web2py:37346] Re: Fail login doesn't return an errorm msg

2009-12-16 Thread Yannick
Thanks for the note... I'll test and confirm it late this afternoon...
Tks

On Dec 15, 9:37 pm, mdipierro  wrote:
> I think this is now fixed in trunk. Can you confirm?
>
> On Dec 15, 8:04 pm, mdipierro  wrote:
>
> > fixing this tonight
>
> > On Dec 15, 6:28 pm, Yannick  wrote:
>
> > > Hmmm Think there is an issue with this release... Please take a look
> > > to the ticket generated after a user tried to login using a fake
> > > password:
>
> > > 
>
> > > Traceback (most recent call last):
> > >   File "/Users/OnemeWs/App Server/web2py/gluon/restricted.py", line
> > > 173, in restricted
> > >     exec ccode in environment
> > >   File "/Users/OnemeWs/App Server/web2py/applications/BeUnickDemo/
> > > controllers/default.py", line 171, in 
>
> > >   File "/Users/OnemeWs/App Server/web2py/gluon/globals.py", line 96,
> > > in 
> > >     self._caller = lambda f: f()
> > >   File "/Users/OnemeWs/App Server/web2py/applications/BeUnickDemo/
> > > controllers/default.py", line 134, in login
> > >     return dict(loginform = auth.login())
> > >   File "/Users/OnemeWs/App Server/web2py/gluon/tools.py", line 980, in
> > > login
> > >     onvalidation=onvalidation):
> > >   File "/Users/OnemeWs/App Server/web2py/gluon/sqlhtml.py", line 771,
> > > in accepts
> > >     onvalidation,
> > >   File "/Users/OnemeWs/App Server/web2py/gluon/html.py", line 1267, in
> > > accepts
> > >     status = self._traverse(status)
> > >   File "/Users/OnemeWs/App Server/web2py/gluon/html.py", line 449, in
> > > _traverse
> > >     newstatus = c._traverse(status) and newstatus
> > >   File "/Users/OnemeWs/App Server/web2py/gluon/html.py", line 449, in
> > > _traverse
> > >     newstatus = c._traverse(status) and newstatus
> > >   File "/Users/OnemeWs/App Server/web2py/gluon/html.py", line 449, in
> > > _traverse
> > >     newstatus = c._traverse(status) and newstatus
> > >   File "/Users/OnemeWs/App Server/web2py/gluon/html.py", line 449, in
> > > _traverse
> > >     newstatus = c._traverse(status) and newstatus
> > >   File "/Users/OnemeWs/App Server/web2py/gluon/html.py", line 456, in
> > > _traverse
> > >     newstatus = self._validate()
> > >   File "/Users/OnemeWs/App Server/web2py/gluon/html.py", line 1074, in
> > > _validate
> > >     (value, errors) = validator(value)
> > >   File "/Users/OnemeWs/App Server/web2py/gluon/validators.py", line
> > > 728, in __call__
> > >     if (not self.banned or not self.banned.match(domain)) \
> > > AttributeError: 'lazyT' object has no attribute 'match'
>
> > > 
>
> > > Anyway idea ?
>
> > > Yannick P.
>
> > > On Dec 14, 11:30 pm, mdipierro  wrote:
>
> > > > I do not know. Glad it is fixed anyway.
>
> > > > On Dec 14, 9:19 pm, Yannick  wrote:
>
> > > > > Hello Massimo,
> > > > > Thanks I just test the new release and realized that the double
> > > > > redirect seem to be fixed on the Auth - Login I just wonder what
> > > > > was the root of the issue I got in the previous release...
>
> > > > > Thanks
>
> > > > > On Dec 12, 12:31 pm, Yannick  wrote:
>
> > > > > > Hello Massimo, thanks for the note...
> > > > > > i did follow your instructions which was :
> > > > > > 1) I put this in the view {{=loginform}}
> > > > > > 2) I print request.function and request.vars from the model
> > > > > > And here is what i see:
> > > > > > login
> > > > > >  > > > > > '440a019c-1479-4b0d-8e86-b27c0496dd7a', 'password': '12w12123',
> > > > > > '_formname': 'login', '_next': ''}>
> > > > > > login
> > > > > > 
>
> > > > > > It looks like there is a double redirect...
>
> > > > > > I did create a small brand new application just to test the login 
> > > > > > with
> > > > > > Auth using the web2py admin consol

[web2py:37297] Re: Fail login doesn't return an errorm msg

2009-12-15 Thread Yannick
Hmmm Think there is an issue with this release... Please take a look
to the ticket generated after a user tried to login using a fake
password:




Traceback (most recent call last):
  File "/Users/OnemeWs/App Server/web2py/gluon/restricted.py", line
173, in restricted
exec ccode in environment
  File "/Users/OnemeWs/App Server/web2py/applications/BeUnickDemo/
controllers/default.py", line 171, in 

  File "/Users/OnemeWs/App Server/web2py/gluon/globals.py", line 96,
in 
self._caller = lambda f: f()
  File "/Users/OnemeWs/App Server/web2py/applications/BeUnickDemo/
controllers/default.py", line 134, in login
return dict(loginform = auth.login())
  File "/Users/OnemeWs/App Server/web2py/gluon/tools.py", line 980, in
login
onvalidation=onvalidation):
  File "/Users/OnemeWs/App Server/web2py/gluon/sqlhtml.py", line 771,
in accepts
onvalidation,
  File "/Users/OnemeWs/App Server/web2py/gluon/html.py", line 1267, in
accepts
status = self._traverse(status)
  File "/Users/OnemeWs/App Server/web2py/gluon/html.py", line 449, in
_traverse
newstatus = c._traverse(status) and newstatus
  File "/Users/OnemeWs/App Server/web2py/gluon/html.py", line 449, in
_traverse
newstatus = c._traverse(status) and newstatus
  File "/Users/OnemeWs/App Server/web2py/gluon/html.py", line 449, in
_traverse
newstatus = c._traverse(status) and newstatus
  File "/Users/OnemeWs/App Server/web2py/gluon/html.py", line 449, in
_traverse
newstatus = c._traverse(status) and newstatus
  File "/Users/OnemeWs/App Server/web2py/gluon/html.py", line 456, in
_traverse
newstatus = self._validate()
  File "/Users/OnemeWs/App Server/web2py/gluon/html.py", line 1074, in
_validate
(value, errors) = validator(value)
  File "/Users/OnemeWs/App Server/web2py/gluon/validators.py", line
728, in __call__
if (not self.banned or not self.banned.match(domain)) \
AttributeError: 'lazyT' object has no attribute 'match'


####


Anyway idea ?

Yannick P.


On Dec 14, 11:30 pm, mdipierro  wrote:
> I do not know. Glad it is fixed anyway.
>
> On Dec 14, 9:19 pm, Yannick  wrote:
>
> > Hello Massimo,
> > Thanks I just test the new release and realized that the double
> > redirect seem to be fixed on the Auth - Login I just wonder what
> > was the root of the issue I got in the previous release...
>
> > Thanks
>
> > On Dec 12, 12:31 pm, Yannick  wrote:
>
> > > Hello Massimo, thanks for the note...
> > > i did follow your instructions which was :
> > > 1) I put this in the view {{=loginform}}
> > > 2) I print request.function and request.vars from the model
> > > And here is what i see:
> > > login
> > >  > > '440a019c-1479-4b0d-8e86-b27c0496dd7a', 'password': '12w12123',
> > > '_formname': 'login', '_next': ''}>
> > > login
> > > 
>
> > > It looks like there is a double redirect...
>
> > > I did create a small brand new application just to test the login with
> > > Auth using the web2py admin console ( Just to double check that is not
> > > my code which cause this) and I have the same result...
>
> > > I'll send you the code that I used to test it... I really don't know
> > > why that happen, I think it use to work in the pass...
>
> > > Thanks for your help...
>
> > > Cheers,
> > > Yannick P.
>
> > > On Dec 11, 9:59 am, mdipierro  wrote:
>
> > > > For debugging purposes
>
> > > > 1) try replace everything in the view with {{=loginform}}
>
> > > > 2) try print request.function, request.vars
>
> > > > what do you see?
>
> > > > Feel free to send me your code and I will take a look.
>
> > > > massimo
>
> > > > On Dec 11, 8:47 am, Yannick  wrote:
>
> > > > > Yes I did comment this out "auth.settings.login_next=URL(r=request,
> > > > > f='profile') "
> > > > > but still same old, the double redirect is still there... I really
> > > > > wonder what trigger that double redirection... there is nothing extra
> > > > > I'm doing here, I fulling using Auth API... Hmmm...
>
> > > > > On Dec 11, 9:33 am, Wes James  wrote:
>
> > > > > > On Thu, Dec 10, 2009 at 8:09 PM, Yannick  
> > > > > > wrote:
> > 

[web2py:37295] Auth-Login : Backward compatibility with the new release 1.74.1

2009-12-15 Thread Yannick

This is a follow up of this thread:
http://groups.google.com/group/web2py/browse_thread/thread/f6899f258368382f/761a94c588521b8c#761a94c588521b8c

Basically now when I migrate my application with this new release and
trying to login an user with a fake password I'm expecting to have a
feedback message (error) from the session... But instead there is a
server error here is the ticket that is generated:

Traceback (most recent call last):
  File "/Users/OnemeWs/App Server/web2py/gluon/restricted.py", line
173, in restricted
exec ccode in environment
  File "/Users/OnemeWs/App Server/web2py/applications/BeUnickDemo/
controllers/default.py", line 171, in 



  File "/Users/OnemeWs/App Server/web2py/gluon/globals.py", line 96,
in 
self._caller = lambda f: f()
  File "/Users/OnemeWs/App Server/web2py/applications/AppDemo/
controllers/default.py", line 134, in login
return dict(loginform = auth.login())
  File "/Users/OnemeWs/App Server/web2py/gluon/tools.py", line 980, in
login
onvalidation=onvalidation):
  File "/Users/OnemeWs/App Server/web2py/gluon/sqlhtml.py", line 771,
in accepts
onvalidation,
  File "/Users/OnemeWs/App Server/web2py/gluon/html.py", line 1267, in
accepts
status = self._traverse(status)
  File "/Users/OnemeWs/App Server/web2py/gluon/html.py", line 449, in
_traverse
newstatus = c._traverse(status) and newstatus
  File "/Users/OnemeWs/App Server/web2py/gluon/html.py", line 449, in
_traverse
newstatus = c._traverse(status) and newstatus
  File "/Users/OnemeWs/App Server/web2py/gluon/html.py", line 449, in
_traverse
newstatus = c._traverse(status) and newstatus
  File "/Users/OnemeWs/App Server/web2py/gluon/html.py", line 449, in
_traverse
newstatus = c._traverse(status) and newstatus
  File "/Users/OnemeWs/App Server/web2py/gluon/html.py", line 456, in
_traverse
newstatus = self._validate()
  File "/Users/OnemeWs/App Server/web2py/gluon/html.py", line 1074, in
_validate
(value, errors) = validator(value)
  File "/Users/OnemeWs/App Server/web2py/gluon/validators.py", line
728, in __call__
if (not self.banned or not self.banned.match(domain)) \
AttributeError: 'lazyT' object has no attribute 'match'

########


Does anyone notice this issue in their application after they migrate
to the new release ?

Thanks,
Cheers,
Yannick P.

--

You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.




[web2py:37208] Re: Fail login doesn't return an errorm msg

2009-12-14 Thread Yannick
Hello Massimo,
Thanks I just test the new release and realized that the double
redirect seem to be fixed on the Auth - Login I just wonder what
was the root of the issue I got in the previous release...

Thanks

On Dec 12, 12:31 pm, Yannick  wrote:
> Hello Massimo, thanks for the note...
> i did follow your instructions which was :
> 1) I put this in the view {{=loginform}}
> 2) I print request.function and request.vars from the model
> And here is what i see:
> login
>  '440a019c-1479-4b0d-8e86-b27c0496dd7a', 'password': '12w12123',
> '_formname': 'login', '_next': ''}>
> login
> 
>
> It looks like there is a double redirect...
>
> I did create a small brand new application just to test the login with
> Auth using the web2py admin console ( Just to double check that is not
> my code which cause this) and I have the same result...
>
> I'll send you the code that I used to test it... I really don't know
> why that happen, I think it use to work in the pass...
>
> Thanks for your help...
>
> Cheers,
> Yannick P.
>
> On Dec 11, 9:59 am, mdipierro  wrote:
>
> > For debugging purposes
>
> > 1) try replace everything in the view with {{=loginform}}
>
> > 2) try print request.function, request.vars
>
> > what do you see?
>
> > Feel free to send me your code and I will take a look.
>
> > massimo
>
> > On Dec 11, 8:47 am, Yannick  wrote:
>
> > > Yes I did comment this out "auth.settings.login_next=URL(r=request,
> > > f='profile') "
> > > but still same old, the double redirect is still there... I really
> > > wonder what trigger that double redirection... there is nothing extra
> > > I'm doing here, I fulling using Auth API... Hmmm...
>
> > > On Dec 11, 9:33 am, Wes James  wrote:
>
> > > > On Thu, Dec 10, 2009 at 8:09 PM, Yannick  wrote:
> > > > > Hello thanks for the note...
>
> > > > > I did add "print request.function"
> > > > > and Yes there is a double redirection because the output print the
> > > > > function login twice :
> > > > > login
> > > > > login
>
> > > > > I wonder how to fix this double redirection here is one of the setting
> > > > > I have in my controller:
> > > > > auth.settings.login_next=URL(r=request, f='profile')
>
> > > > comment this out just to see what happens...
>
> > > > or use wingide and see where it goes.
>
> > > > > Do you have any idea... I'll keep debugging...
>
> > > > > On Dec 9, 11:20 pm, mdipierro  wrote:
> > > > >> Add a
>
> > > > >> print request.function
>
> > > > >> to your model and check if there is a double redirect.
> > > > >> The other possibility is that sessions are not working.
>
> > > > >> On Dec 9, 9:12 pm, Yannick  wrote:
>
> > > > >> > Is anyone already has this issue and where able to solve it... I 
> > > > >> > don't
> > > > >> > see any double redirect in my code...
>
> > > > >> > Thanks for your help...
>
> > > > >> > On Dec 9, 11:36 am, Wes James  wrote:
>
> > > > >> > > Sorry,  I'm not sure exactly when/where I made this change in 
> > > > >> > > the last
> > > > >> > > week.  You can use wingide and check what the repsponse.flash is
> > > > >> > > between function calls.
>
> > > > >> > > -wes
>
> > > > >> > > On Wed, Dec 9, 2009 at 8:49 AM, Yannick  
> > > > >> > > wrote:
> > > > >> > > > Hmm interesting, thanks for the note... I don't think I'm 
> > > > >> > > > doing a
> > > > >> > > > double redirection in my code though... can you please let me 
> > > > >> > > > know how
> > > > >> > > > you resolved that issue when you had it >
>
> > > > >> > > > Thanks,
> > > > >> > > > Yannick P.
>
> > > > >> > > > On Dec 9, 9:30 am, Wes James  wrote:
> > > > >> > > >> On Tue, Dec 8, 2009 at 9:35 PM, Yannick 
> > > > >> > > >>  wrote:
> > > > >> > > >> > hello mate,
> > > > >&

[web2py:37207] Re: web2py 1.74.1 is OUT

2009-12-14 Thread Yannick
Thanks the double redirect seems to be fixed in this release...

On Dec 14, 1:45 pm, Thadeus Burgess  wrote:
> Also you can specify custom options to the export_to_csv.
>
> export_to_csv(delimiter = ',', quotechar = '"', quoting = csv.QUOTE_MINIMAL)
>
> On Mon, Dec 14, 2009 at 10:46 AM, mdipierro  wrote:
> > I fixed it on the web site
>
> > On Dec 14, 10:35 am, Jonathan Lundell  wrote:
> >> On Dec 14, 2009, at 8:33 AM, mdipierro wrote:
>
> >> > - Moved to mercurial
>
> >>http://www.web2py.com/examples/default/downloadstillsays SVN.
>
> > --
>
> > You received this message because you are subscribed to the Google Groups 
> > "web2py-users" group.
> > To post to this group, send email to web...@googlegroups.com.
> > To unsubscribe from this group, send email to 
> > web2py+unsubscr...@googlegroups.com.
> > For more options, visit this group 
> > athttp://groups.google.com/group/web2py?hl=en.

--

You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.




[web2py:37097] Re: Fail login doesn't return an errorm msg

2009-12-12 Thread Yannick
Hello Massimo, thanks for the note...
i did follow your instructions which was :
1) I put this in the view {{=loginform}}
2) I print request.function and request.vars from the model
And here is what i see:
login

login


It looks like there is a double redirect...

I did create a small brand new application just to test the login with
Auth using the web2py admin console ( Just to double check that is not
my code which cause this) and I have the same result...

I'll send you the code that I used to test it... I really don't know
why that happen, I think it use to work in the pass...

Thanks for your help...

Cheers,
Yannick P.

On Dec 11, 9:59 am, mdipierro  wrote:
> For debugging purposes
>
> 1) try replace everything in the view with {{=loginform}}
>
> 2) try print request.function, request.vars
>
> what do you see?
>
> Feel free to send me your code and I will take a look.
>
> massimo
>
> On Dec 11, 8:47 am, Yannick  wrote:
>
> > Yes I did comment this out "auth.settings.login_next=URL(r=request,
> > f='profile') "
> > but still same old, the double redirect is still there... I really
> > wonder what trigger that double redirection... there is nothing extra
> > I'm doing here, I fulling using Auth API... Hmmm...
>
> > On Dec 11, 9:33 am, Wes James  wrote:
>
> > > On Thu, Dec 10, 2009 at 8:09 PM, Yannick  wrote:
> > > > Hello thanks for the note...
>
> > > > I did add "print request.function"
> > > > and Yes there is a double redirection because the output print the
> > > > function login twice :
> > > > login
> > > > login
>
> > > > I wonder how to fix this double redirection here is one of the setting
> > > > I have in my controller:
> > > > auth.settings.login_next=URL(r=request, f='profile')
>
> > > comment this out just to see what happens...
>
> > > or use wingide and see where it goes.
>
> > > > Do you have any idea... I'll keep debugging...
>
> > > > On Dec 9, 11:20 pm, mdipierro  wrote:
> > > >> Add a
>
> > > >> print request.function
>
> > > >> to your model and check if there is a double redirect.
> > > >> The other possibility is that sessions are not working.
>
> > > >> On Dec 9, 9:12 pm, Yannick  wrote:
>
> > > >> > Is anyone already has this issue and where able to solve it... I 
> > > >> > don't
> > > >> > see any double redirect in my code...
>
> > > >> > Thanks for your help...
>
> > > >> > On Dec 9, 11:36 am, Wes James  wrote:
>
> > > >> > > Sorry,  I'm not sure exactly when/where I made this change in the 
> > > >> > > last
> > > >> > > week.  You can use wingide and check what the repsponse.flash is
> > > >> > > between function calls.
>
> > > >> > > -wes
>
> > > >> > > On Wed, Dec 9, 2009 at 8:49 AM, Yannick  
> > > >> > > wrote:
> > > >> > > > Hmm interesting, thanks for the note... I don't think I'm doing a
> > > >> > > > double redirection in my code though... can you please let me 
> > > >> > > > know how
> > > >> > > > you resolved that issue when you had it >
>
> > > >> > > > Thanks,
> > > >> > > > Yannick P.
>
> > > >> > > > On Dec 9, 9:30 am, Wes James  wrote:
> > > >> > > >> On Tue, Dec 8, 2009 at 9:35 PM, Yannick  
> > > >> > > >> wrote:
> > > >> > > >> > hello mate,
> > > >> > > >> > I wonder  because I noticed that in auth, when the user fails 
> > > >> > > >> > to login
> > > >> > > >> > (enter a fake username and password) there is no error message
> > > >> > > >> > returned...
>
> > > >> > > >> Yannick,
>
> > > >> > > >> I just tried it on one of my sites and I got "Invalid Login" 
> > > >> > > >> flash message.
>
> > > >> > > >> I had the same issue on one of my forms not showing  field 
> > > >> > > >> validation
> > > >> > > >> errors.  It was as mr.freeze indicated, a double redirect that 
> > > >> > > >> was
> > > >> > > >> causing this .
>
> > > >> > > >> -wes
>
> > > >> > > > --
>
> > > >> > > > You received this message because you are subscribed to the 
> > > >> > > > Google Groups "web2py-users" group.
> > > >> > > > To post to this group, send email to web...@googlegroups.com.
> > > >> > > > To unsubscribe from this group, send email to 
> > > >> > > > web2py+unsubscr...@googlegroups.com.
> > > >> > > > For more options, visit this group 
> > > >> > > > athttp://groups.google.com/group/web2py?hl=en.
>
> > > > --
>
> > > > You received this message because you are subscribed to the Google 
> > > > Groups "web2py-users" group.
> > > > To post to this group, send email to web...@googlegroups.com.
> > > > To unsubscribe from this group, send email to 
> > > > web2py+unsubscr...@googlegroups.com.
> > > > For more options, visit this group 
> > > > athttp://groups.google.com/group/web2py?hl=en.

--

You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.




[web2py:37017] Re: Fail login doesn't return an errorm msg

2009-12-11 Thread Yannick

Yes I did comment this out "auth.settings.login_next=URL(r=request,
f='profile') "
but still same old, the double redirect is still there... I really
wonder what trigger that double redirection... there is nothing extra
I'm doing here, I fulling using Auth API... Hmmm...



On Dec 11, 9:33 am, Wes James  wrote:
> On Thu, Dec 10, 2009 at 8:09 PM, Yannick  wrote:
> > Hello thanks for the note...
>
> > I did add "print request.function"
> > and Yes there is a double redirection because the output print the
> > function login twice :
> > login
> > login
>
> > I wonder how to fix this double redirection here is one of the setting
> > I have in my controller:
> > auth.settings.login_next=URL(r=request, f='profile')
>
> comment this out just to see what happens...
>
> or use wingide and see where it goes.
>
>
>
> > Do you have any idea... I'll keep debugging...
>
> > On Dec 9, 11:20 pm, mdipierro  wrote:
> >> Add a
>
> >> print request.function
>
> >> to your model and check if there is a double redirect.
> >> The other possibility is that sessions are not working.
>
> >> On Dec 9, 9:12 pm, Yannick  wrote:
>
> >> > Is anyone already has this issue and where able to solve it... I don't
> >> > see any double redirect in my code...
>
> >> > Thanks for your help...
>
> >> > On Dec 9, 11:36 am, Wes James  wrote:
>
> >> > > Sorry,  I'm not sure exactly when/where I made this change in the last
> >> > > week.  You can use wingide and check what the repsponse.flash is
> >> > > between function calls.
>
> >> > > -wes
>
> >> > > On Wed, Dec 9, 2009 at 8:49 AM, Yannick  wrote:
> >> > > > Hmm interesting, thanks for the note... I don't think I'm doing a
> >> > > > double redirection in my code though... can you please let me know 
> >> > > > how
> >> > > > you resolved that issue when you had it >
>
> >> > > > Thanks,
> >> > > > Yannick P.
>
> >> > > > On Dec 9, 9:30 am, Wes James  wrote:
> >> > > >> On Tue, Dec 8, 2009 at 9:35 PM, Yannick  
> >> > > >> wrote:
> >> > > >> > hello mate,
> >> > > >> > I wonder  because I noticed that in auth, when the user fails to 
> >> > > >> > login
> >> > > >> > (enter a fake username and password) there is no error message
> >> > > >> > returned...
>
> >> > > >> Yannick,
>
> >> > > >> I just tried it on one of my sites and I got "Invalid Login" flash 
> >> > > >> message.
>
> >> > > >> I had the same issue on one of my forms not showing  field 
> >> > > >> validation
> >> > > >> errors.  It was as mr.freeze indicated, a double redirect that was
> >> > > >> causing this .
>
> >> > > >> -wes
>
> >> > > > --
>
> >> > > > You received this message because you are subscribed to the Google 
> >> > > > Groups "web2py-users" group.
> >> > > > To post to this group, send email to web...@googlegroups.com.
> >> > > > To unsubscribe from this group, send email to 
> >> > > > web2py+unsubscr...@googlegroups.com.
> >> > > > For more options, visit this group 
> >> > > > athttp://groups.google.com/group/web2py?hl=en.
>
> > --
>
> > You received this message because you are subscribed to the Google Groups 
> > "web2py-users" group.
> > To post to this group, send email to web...@googlegroups.com.
> > To unsubscribe from this group, send email to 
> > web2py+unsubscr...@googlegroups.com.
> > For more options, visit this group 
> > athttp://groups.google.com/group/web2py?hl=en.

--

You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.




[web2py:37013] Re: Fail login doesn't return an errorm msg

2009-12-11 Thread Yannick
I tried the solution in this thread but unsuccessful:
http://groups.google.com/group/web2py/browse_thread/thread/9e2441a938368b3a/451cfaf61e60a731?lnk=gst&q=double+redirect#451cfaf61e60a731

Anyway idea ?

Yannick P.

On Dec 10, 10:09 pm, Yannick  wrote:
> Hello thanks for the note...
>
> I did add "print request.function"
> and Yes there is a double redirection because the output print the
> function login twice :
> login
> login
>
> I wonder how to fix this double redirection here is one of the setting
> I have in my controller:
> auth.settings.login_next=URL(r=request, f='profile')
>
> Do you have any idea... I'll keep debugging...
>
> On Dec 9, 11:20 pm, mdipierro  wrote:
>
> > Add a
>
> > print request.function
>
> > to your model and check if there is a double redirect.
> > The other possibility is that sessions are not working.
>
> > On Dec 9, 9:12 pm, Yannick  wrote:
>
> > > Is anyone already has this issue and where able to solve it... I don't
> > > see any double redirect in my code...
>
> > > Thanks for your help...
>
> > > On Dec 9, 11:36 am, Wes James  wrote:
>
> > > > Sorry,  I'm not sure exactly when/where I made this change in the last
> > > > week.  You can use wingide and check what the repsponse.flash is
> > > > between function calls.
>
> > > > -wes
>
> > > > On Wed, Dec 9, 2009 at 8:49 AM, Yannick  wrote:
> > > > > Hmm interesting, thanks for the note... I don't think I'm doing a
> > > > > double redirection in my code though... can you please let me know how
> > > > > you resolved that issue when you had it >
>
> > > > > Thanks,
> > > > > Yannick P.
>
> > > > > On Dec 9, 9:30 am, Wes James  wrote:
> > > > >> On Tue, Dec 8, 2009 at 9:35 PM, Yannick  
> > > > >> wrote:
> > > > >> > hello mate,
> > > > >> > I wonder  because I noticed that in auth, when the user fails to 
> > > > >> > login
> > > > >> > (enter a fake username and password) there is no error message
> > > > >> > returned...
>
> > > > >> Yannick,
>
> > > > >> I just tried it on one of my sites and I got "Invalid Login" flash 
> > > > >> message.
>
> > > > >> I had the same issue on one of my forms not showing  field validation
> > > > >> errors.  It was as mr.freeze indicated, a double redirect that was
> > > > >> causing this .
>
> > > > >> -wes
>
> > > > > --
>
> > > > > You received this message because you are subscribed to the Google 
> > > > > Groups "web2py-users" group.
> > > > > To post to this group, send email to web...@googlegroups.com.
> > > > > To unsubscribe from this group, send email to 
> > > > > web2py+unsubscr...@googlegroups.com.
> > > > > For more options, visit this group 
> > > > > athttp://groups.google.com/group/web2py?hl=en.

--

You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.




[web2py:36999] Re: Fail login doesn't return an errorm msg

2009-12-10 Thread Yannick
Hello thanks for the note...

I did add "print request.function"
and Yes there is a double redirection because the output print the
function login twice :
login
login

I wonder how to fix this double redirection here is one of the setting
I have in my controller:
auth.settings.login_next=URL(r=request, f='profile')

Do you have any idea... I'll keep debugging...

On Dec 9, 11:20 pm, mdipierro  wrote:
> Add a
>
> print request.function
>
> to your model and check if there is a double redirect.
> The other possibility is that sessions are not working.
>
> On Dec 9, 9:12 pm, Yannick  wrote:
>
>
>
> > Is anyone already has this issue and where able to solve it... I don't
> > see any double redirect in my code...
>
> > Thanks for your help...
>
> > On Dec 9, 11:36 am, Wes James  wrote:
>
> > > Sorry,  I'm not sure exactly when/where I made this change in the last
> > > week.  You can use wingide and check what the repsponse.flash is
> > > between function calls.
>
> > > -wes
>
> > > On Wed, Dec 9, 2009 at 8:49 AM, Yannick  wrote:
> > > > Hmm interesting, thanks for the note... I don't think I'm doing a
> > > > double redirection in my code though... can you please let me know how
> > > > you resolved that issue when you had it >
>
> > > > Thanks,
> > > > Yannick P.
>
> > > > On Dec 9, 9:30 am, Wes James  wrote:
> > > >> On Tue, Dec 8, 2009 at 9:35 PM, Yannick  wrote:
> > > >> > hello mate,
> > > >> > I wonder  because I noticed that in auth, when the user fails to 
> > > >> > login
> > > >> > (enter a fake username and password) there is no error message
> > > >> > returned...
>
> > > >> Yannick,
>
> > > >> I just tried it on one of my sites and I got "Invalid Login" flash 
> > > >> message.
>
> > > >> I had the same issue on one of my forms not showing  field validation
> > > >> errors.  It was as mr.freeze indicated, a double redirect that was
> > > >> causing this .
>
> > > >> -wes
>
> > > > --
>
> > > > You received this message because you are subscribed to the Google 
> > > > Groups "web2py-users" group.
> > > > To post to this group, send email to web...@googlegroups.com.
> > > > To unsubscribe from this group, send email to 
> > > > web2py+unsubscr...@googlegroups.com.
> > > > For more options, visit this group 
> > > > athttp://groups.google.com/group/web2py?hl=en.

--

You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.




[web2py:36934] Re: Fail login doesn't return an errorm msg

2009-12-09 Thread Yannick
Is anyone already has this issue and where able to solve it... I don't
see any double redirect in my code...

Thanks for your help...

On Dec 9, 11:36 am, Wes James  wrote:
> Sorry,  I'm not sure exactly when/where I made this change in the last
> week.  You can use wingide and check what the repsponse.flash is
> between function calls.
>
> -wes
>
> On Wed, Dec 9, 2009 at 8:49 AM, Yannick  wrote:
> > Hmm interesting, thanks for the note... I don't think I'm doing a
> > double redirection in my code though... can you please let me know how
> > you resolved that issue when you had it >
>
> > Thanks,
> > Yannick P.
>
> > On Dec 9, 9:30 am, Wes James  wrote:
> >> On Tue, Dec 8, 2009 at 9:35 PM, Yannick  wrote:
> >> > hello mate,
> >> > I wonder  because I noticed that in auth, when the user fails to login
> >> > (enter a fake username and password) there is no error message
> >> > returned...
>
> >> Yannick,
>
> >> I just tried it on one of my sites and I got "Invalid Login" flash message.
>
> >> I had the same issue on one of my forms not showing  field validation
> >> errors.  It was as mr.freeze indicated, a double redirect that was
> >> causing this .
>
> >> -wes
>
> > --
>
> > You received this message because you are subscribed to the Google Groups 
> > "web2py-users" group.
> > To post to this group, send email to web...@googlegroups.com.
> > To unsubscribe from this group, send email to 
> > web2py+unsubscr...@googlegroups.com.
> > For more options, visit this group 
> > athttp://groups.google.com/group/web2py?hl=en.

--

You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.




[web2py:36881] Re: Fail login doesn't return an errorm msg

2009-12-09 Thread Yannick
Hmm interesting, thanks for the note... I don't think I'm doing a
double redirection in my code though... can you please let me know how
you resolved that issue when you had it >

Thanks,
Yannick P.

On Dec 9, 9:30 am, Wes James  wrote:
> On Tue, Dec 8, 2009 at 9:35 PM, Yannick  wrote:
> > hello mate,
> > I wonder  because I noticed that in auth, when the user fails to login
> > (enter a fake username and password) there is no error message
> > returned...
>
> Yannick,
>
> I just tried it on one of my sites and I got "Invalid Login" flash message.
>
> I had the same issue on one of my forms not showing  field validation
> errors.  It was as mr.freeze indicated, a double redirect that was
> causing this .
>
> -wes

--

You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.




[web2py:36842] Fail login doesn't return an errorm msg

2009-12-08 Thread Yannick
hello mate,
I wonder  because I noticed that in auth, when the user fails to login
(enter a fake username and password) there is no error message
returned...

Here is a small code

# Model
auth.settings.table_user = db.define_table(
db.Field('email', length=128,default=''),
db.Field('password', 'password', readable=False,label='Password',
requires=CRYPT()),
migrate=False)
db.auth_user.email.requires = [IS_EMAIL(), IS_NOT_IN_DB(db, '%s.email'
 %
auth.settings.table_user._tablename)]

# Controller
def login():
   return dict(loginform = auth.login() )

# View
 {{if loginform.errors.email:}} Email {{=loginform.errors.email}}
{{pass}} 
 {{if loginform.errors.password:}} Password
{{=loginform.errors.password}}{{pass}}  
 {{if loginform.errors.error_message :}} Invalid {{pass}}  



  {{=loginform.custom.begin}}
  

  Emailing:
  {{=loginform.custom.widget.email}}


  Password:
  {{=loginform.custom.widget.password}}


  {{=loginform.custom.submit}}
  

  
  {{=loginform.custom.end}}



I when to capture the error message of the failure using
"form.error.XXX" not through session.flash...

Please let me know if you have any hints...

Yannick P.

--

You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.




[web2py:36081] Re: SQL Query with Case Statement...

2009-11-27 Thread Yannick
Thanks for the note Massimo,
I did test what you suggested, but it's not working with no error or
ticket generated ... I print the generated SQL query and it looks
fine... I think DAL doesn't handle "Case"...
Thanks anyway I'll used a work around solution...

Cheers,
Yannick P.

On Nov 26, 8:27 am, mdipierro  wrote:
> You cannot but you can try this:
>
> db(db.employees.salary,
> "CASE WHEN  salary <= 2000 THEN 'PoorOne' END AS salary_level",
> orderby=db.employees.salary)
>
> let us know if it works.
>
> On Nov 26, 6:53 am, Yannick  wrote:
>
> > Hello Mate,
>
> > I just double check in the book and the documentation resources
> > because I was wondering how to actually create a DAL query that
> > include "Case" statement ?
> > Like let's say I have an SQL like this :
>
> > SELECT salary,
> >  CASE
> >  WHEN  salary <= 2000 THEN 'PoorOne'
> > END AS salary_level
> > FROM employees
> > ORDER BY salary ASC
>
> > How can I write such a query with "CASE" statement in Web2py ?
>
> > Thanks,
> > Yannick P.

--

You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.




[web2py:36033] SQL Query with Case Statement...

2009-11-26 Thread Yannick
Hello Mate,

I just double check in the book and the documentation resources
because I was wondering how to actually create a DAL query that
include "Case" statement ?
Like let's say I have an SQL like this :

SELECT salary,
 CASE
 WHEN  salary <= 2000 THEN 'PoorOne'
END AS salary_level
FROM employees
ORDER BY salary ASC


How can I write such a query with "CASE" statement in Web2py ?

Thanks,
Yannick P.

--

You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.




[web2py:36032] Re: Complex SQL Query - Left Out Join With A Third table...

2009-11-26 Thread Yannick
Thanks Massimo,
I just wonder, I do know that is possible to see the SQL Query by
using _select()... I was wondering if there opposite operation ? Like
if is possible to write the SQL query and see DAL code of web2py ?

Thanks,
Yannick P.

On Nov 25, 9:00 am, mdipierro  wrote:
> Yes.
>
> left=(db.table_B.on(db.table_A.ID = db.table_B.FK)),
>       db.table_C.on(db.table_A.ID = db.table_C.FK)))
>
> On Nov 24, 10:26 pm, Yannick  wrote:
>
> > Hello mate,
> > Let's said for example I have the following:
>
> > rows = db().select(db.table_A.first_name, db.table_B.email,
> > db.table_B.ID,
> >                                                 left=db.table_B.on
> > ( db.table_A.ID = db.table_B.FK) )
>
> > NOW I  want to do  another left OUTER JOIN of the table from 
> > with a third table "table_C" on a condition "db.table_B.ID =
> > db.table_C.ID"
> > How can I do that ?
>
> > Thanks for your help,
>
> > Cheers,
> > Yannick P.

--

You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.




[web2py:35971] Complex SQL Query - Left Out Join With A Third table...

2009-11-24 Thread Yannick

Hello mate,
Let's said for example I have the following:

rows = db().select(db.table_A.first_name, db.table_B.email,
db.table_B.ID,
left=db.table_B.on
( db.table_A.ID = db.table_B.FK) )

NOW I  want to do  another left OUTER JOIN of the table from 
with a third table "table_C" on a condition "db.table_B.ID =
db.table_C.ID"
How can I do that ?


Thanks for your help,

Cheers,
Yannick P.



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:33710] Re: powered by web2py?

2009-10-26 Thread Yannick

www.onemewebservices.com
is powered by web2py... Good job !

Yannick P.

On Oct 26, 4:34 am, Boris Manojlovic 
wrote:
> http://designer.bojanka.net/
> is hosted on appspot with web2py
>
> On Mon, Oct 26, 2009 at 3:46 AM, mdipierro  wrote:
>
> >www.appliedstacks.comis dead. This means I lost a way to keep track
> > of web2py sites. So I made something trivial for now:
>
> >http://web2py.com/poweredby
>
> > I am sure I missing many sites that were reported. Could you help me
> > update the list by posting on this thread?
>
> --
> "Only two things are infinite, the universe and human stupidity, and
> I'm not sure about the former."-Albert Einstein
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:32825] Re: Error with Database (MySQL) when using latest release....

2009-10-13 Thread Yannick

Yes I had this error message once, I don't remember exactly how i get
around this though... I think what happen was I changed an attribute
of the database table  and "migrate" was set to "True" and I got that
error message... And then I set migrate to False... And i think that
day I restore my database and clean up everything since I was doing
some testing on my application...

I hope it helps... Please let us know what exactly happen before you
get that error message ?

Cheers,
Yannick P.
On Oct 13, 9:48 am, Rick  wrote:
> I have also come across this with web2py 1.67.2, using stock MySQL on
> Ubuntu 8.10, when I add unique=True to a string column in a table
> definition.
>
> On Sep 22, 11:13 am, Yannick  wrote:
>
>
>
> > Hello mate,
> > Below you can find the error message that I received from Database
> > (MySQL) when using the latest Web2py version: 1.67.1 BUT when I use an
> > old version Web2py: 1.66.2, I have NO problem NO error using the same
> > environment...
> > I wonder why this new release complaint ?
>
> > Please let me if you have any hint ???
>
> > Traceback (most recent call last):
> >   File "/home/fedora/src/web2py/gluon/restricted.py", line 178, in
> > restricted
> >     exec ccode in environment
> >   File "/home/fedora/src/web2py/applications/AppName/models/db.py",
> > line 104, in 
> >     buDefineTable.define_tables()
> >   File "/home/fedora/src/web2py/applications/AppName/modules/
> > dbDefinition.py", line 126, in define_tables
> >     migrate = True)
> >   File "/home/fedora/src/web2py/gluon/sql.py", line 1033, in
> > define_table
> >     query = t._create(migrate=migrate)
> >   File "/home/fedora/src/web2py/gluon/sql.py", line 1368, in _create
> >     self._db._execute(query)
> >   File "/home/fedora/src/web2py/gluon/sql.py", line 739, in 
> >     self._execute = lambda *a, **b: self._cursor.execute(*a, **b)
> >   File "/usr/lib/python2.6/site-packages/MySQLdb/cursors.py", line
> > 173, in execute
> >     self.errorhandler(self, exc, value)
> >   File "/usr/lib/python2.6/site-packages/MySQLdb/connections.py", line
> > 36, in defaulterrorhandler
> >     raise errorclass, errorvalue
> > OperationalError: (1071, 'Specifiedkeywastoolong; maxkeylength
> > is 767 bytes')
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



[web2py:32349] Re: Error message when uploading a photo... Using postgresSQL DB

2009-10-06 Thread Yannick


### Here is the model

db.define_table('photo',
  db.Field('photoname', type='string',length=20),
  db.Field('photodesc', type='string',length=250),
  db.Field('photoviewprv', type='boolean',default=False),
  db.Field('photocreattime', type='datetime',default=now),
  db.Field('photomodtime', type='datetime',default=now),
  db.Field('photoactif', type='boolean',default=True),
  db.Field('physicallink', type='string',length=200,
requires = IS_NOT_EMPTY()), #2 b review#
  db.Field('fileupload', type='upload', requires =
IS_NOT_EMPTY()),
  db.Field('albphotoref_fk',db.album, requires = IS_IN_DB
(db,db.album.id), ondelete = 'CASCADE'),
  migrate=True))


### Here is the controller

from gluon.sqlhtml import form_factory

albumNameList = [y.id for y in db(db.album.buacct_fk ==
session.auth.user.id).select(db.album.id)]

list =db(db.album.buacct_fk == session.auth.user.id).select
(db.album.id)

db.photo.photoname.label='Photo'
db.photo.fileupload.label='Upload'
db.photo.albphotoref_fk.label='Album Name'

db.photo.albphotoref_fk.requires = IS_IN_SET(albumNameList)

db.photo.albphotoref_fk.requires = IS_IN_DB(db(db.album.buacct_fk
== auth.user.id), "album.id", "%(albumname)s")

formPic = form_factory(db.photo, fields=
['photoname','fileupload','albphotoref_fk'])

if formPic.accepts( request.vars, session,
   formname='formPic',keepvalues=True):

   feedback = db.photo.insert(fileupload=request.vars.fileupload,
photoname= request.vars.photoname, albphotoref_fk=
request.vars.albphotoref_fk)

elif formPic.errors: response.flash = 'Problem Uploading please
try again'

return dict(formUploadPic = formPic)



Thanks,
Yannick P.

On Oct 6, 9:40 pm, mdipierro  wrote:
> Can you show us the model and the action that does the upload?
>
> On Oct 6, 7:03 pm, Yannick  wrote:
>
> > Hello mate,
> > When uploading a JPG photo from my application I have an error message
> > referring to the encoding... here is the error coming from sql.py:
>
> > "
> > DataError: invalid byte sequence for encoding "UTF8": 0xff
> > HINT:  This error can also happen if the byte sequence does not match
> > the encoding expected by the server, which is controlled by
> > "client_encoding".
> > "
>
> > I'm migrating from MySQL to PostgreSQL... I never had that issue with
> > MySQL before...
>
> > Any hints ?
>
> > Thanks,
> > Yannick P.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~--~~~~--~~--~--~---



  1   2   3   >