[web2py:29137] Re: Web2py.com down
It used to be mostly people trying to put porn in Django related AlterEgo pages (that is why comments are now disabled). Now it is less targeted, mostly standrad scans for known php vulnerabilities. Massimo On Aug 21, 12:52 pm, "omar.webs...@gmail.com" wrote: > No problem, and if you invest in the new server please take DDOS > protection :$, just a tip... But who guys are doing this? Django > fanboys? > > On 21 aug, 18:47, mdipierro wrote: > > > This is virtual machine running on my office desktop. It has only > > 256MB Ram. > > I will move to a better machine by the end of september. > > > massimo > > > On Aug 21, 4:01 am, Pynthon wrote: > > > > Indeed, do you mean the server is being DDosed? > > > > I hope we can persuade Massimo to change servers. This one is a > > > tinker-toy > > > and it seems to be down as much as it is up. It does not live up to the > > > reputation we want for web2py. > > > > I agree with you! > > > 2009/8/21 mdipierro > > > > > I do not know. I am away from the server, I am on vacation with > > > > limited connection capabilities and the server is constantly being > > > > attacked. I will investigate in september. > > > > > Massimo > > > > > On Aug 20, 9:22 pm, waTR wrote: > > > > > Could we know the reason for the outages? Is it the hardware? Is it > > > > > the OS? Is it the webserver? Is it web2py? --~--~-~--~~~---~--~~ 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:29138] Re: Routes in GAE
routes_in = (('/cc/$a','/ccweb/default/$a'),) routes_out = (('/ccweb/default/$a', '/cc/$a'),) the '.*:' is not necessary. The key missing ingredient is the ',' Massimo On Aug 22, 1:54 am, Prabhu wrote: > Thanks Victor and Yarko. > > It works if I specify routes_in = (('.*:/cc/$a','/ccweb/default/$a')) > or > routes_out = (('/ccweb/default/$a', '/cc/$a')) > > If I say > > routes_in = (('.*:/cc/$a','/ccweb/default/$a')) > routes_out = (('/ccweb/default/$a', '/cc/$a')) > > in routes.py, I still get the syntax error. Why am I not able to > specify both? This looks like a very dumb mistake I am making. Any > ideas? > > Prabhu > > On Aug 22, 9:02 am, Yarko Tymciurak wrote: > > > you might find this discussiont helpful: > > >http://groups.google.com/group/web2py/msg/abb56704cda162a0 > > > On Fri, Aug 21, 2009 at 5:17 PM, Victor wrote: > > > > your line should be routes_in = (('.*:/testme','/myapp/default/ > > > index')) dont forget to add an $ at the end if all you want is / > > > testme > > > > On Aug 21, 10:41 pm, Prabhu wrote: > > > > Hi, > > > > > Newbie to web2py here. My routes.py reads, > > > > > #!/usr/bin/env python > > > > # -*- coding: utf-8 -*- > > > > > routes_in = (('/testme','/myapp/default/index'),) > > > > > routes_out = (('/myapp/default/index', '/test'),) > > > > >http://127.0.0.1:8000/testmeworks. When I upload web2py to GAE, I get > > > > the following error > > > > > Your routes.py has a syntax error. Please fix it before you restart > > > > web2py > > > > : invalid syntax (, line 3) > > > > Traceback (most recent call last): > > > > File "/base/data/home/apps/myapp/1.335783148456469963/ > > > > gaehandler.py", line 26, in > > > > import gluon.main > > > > File "/base/data/home/apps/myapp/1.335783148456469963/gluon/ > > > > main.py", line 39, in > > > > from globals import Request, Response, Session > > > > File "/base/data/home/apps/myapp/1.335783148456469963/gluon/ > > > > globals.py", line 18, in > > > > from compileapp import run_view_in > > > > File "/base/data/home/apps/myapp/1.335783148456469963/gluon/ > > > > compileapp.py", line 43, in > > > > from rewrite import error_message_custom > > > > File "/base/data/home/apps/myapp/1.335783148456469963/gluon/ > > > > rewrite.py", line 31, in > > > > raise e > > > > : invalid syntax (, line 3) > > > > > This happens when there is a routes.py file (even if all the lines are > > > > commented). > > > > > Is this the correct way to do URL Rewrite? The Reddish application > > > > (web2py.appspot.com) does this correctly. How? The source code (of > > > > Reddish) has the application only. > > > > > Can someone please clarify this? > > > > > Thanks. --~--~-~--~~~---~--~~ 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:29139] Re: Password 2 field - Using Custom on Registration.
auch! I just realized password_two is implamented without a widget therefore this syntax does not work. Until this gets firxed this you can do: > {{=regform.custom.begin}} {{=regform.custom.widget.first_name}} {{=regform.custom.widget.last_name}} {{=regform.custom.widget.email}} {{=regform.custom.widget.password}} {{if regform.errors.password_two:}} {{=regform.errors.password_two}}{{pass}} {{=regform.custom.end}} Let us know if it works or not. Massimo On Aug 22, 10:31 pm, Yannick wrote: > Hello mate, > quick question... I'm trying to customize the Registration form using > Auth. > I was wondering about the Password_two field ??? > here is what I'm doing but not working: > > > > {{=regform.custom.begin}} > {{=regform.custom.widget.first_name}} > {{=regform.custom.widget.last_name}} > {{=regform.custom.widget.email}} > {{=regform.custom.widget.password}} > {{=regform.custom.widget.password_two}} ### <--- here is my > problem ??? what to i have to put here? > {{=regform.custom.submit}} > {{=regform.custom.end}} > > ## > > with this " {{=regform.custom.widget.password_two}}" the textfield > doesn't show... What do I have to put there ? > > Can anyone already had the same issue ? > > Thanks for your help --~--~-~--~~~---~--~~ 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:29140] Re: Almost working on the dreamhost server... $50 to the person that can make this a script!
It works with 2.6. The issue is that the cgi module of 2.6 behaves differently than the cgi module in 2.5. In particular is the same variable appears in both GET and POST vars, 2.5 ignores the former and returns a string, 2.6 assumes a multiple submission and returns a list. This incompatibility is not something we can build a way around because it is a fundamental one. If your app never mixes GET and POST vars than you have no problems. If it does we have to make a choice and choose to support 2.5. Massimo On Aug 23, 1:54 am, Alexei Vinidiktov wrote: > What about 2.6. I read some time ago that web2py had issues with this > version. Have they been resolved? > > > > On Sat, Aug 22, 2009 at 12:46 AM, mdipierro wrote: > > > web2y should work with 2.4. Some apps that use specific 2.5 syntax may > > need tweaking. > > > On Aug 21, 3:53 am, Alexei Vinidiktov > > wrote: > >> I've checked and unfortunately on my dreamhost server they have Python > >> 2.4, so no luck with the stock install of Python. I'll have to > >> continue with the custom version. If only I could figure out how to > >> compile the custom version of Python with ssl support... > > >> On Thu, Aug 20, 2009 at 10:57 PM, mr.freeze wrote: > > >> > It works for me using smtp.gmail.com:587. Also, I have the web2py > >> > examples running athttp://safeasmilk.com/examples/default/indexif > >> > you want to take a look. > > >> > On Aug 20, 9:32 am, Alexei Vinidiktov > >> > wrote: > >> >> Does the Mail module work fine? > > >> >> I also have a working web2py installation on Dreamhost, but I'm using > >> >> a custom Python install and I have problems with the Mail module, > >> >> namely with the ssl used by smtp. > > >> >> On Thu, Aug 20, 2009 at 11:37 AM, mr.freeze wrote: > > >> >> > All of the solutions looked a bit hackish to me so I chose the easiest > >> >> > one :) By the way, I'm running it off of Dreamhost's python2.5 binary, > >> >> > not a custom install. I haven't run into any problems yet. > > >> >> > On Aug 19, 10:29 pm, Jason Brower wrote: > >> >> >> I will be setting up another account soon. Perhaps I can try it... > >> >> >> it > >> >> >> looks like quite the hack to me. > > >> >> >> On Wed, 2009-08-19 at 20:12 -0700, mr.freeze wrote: > >> >> >> > Have you considered Passenger WSGI? I am using it on my Dreamhost > >> >> >> > account and it seems fast/stable. The setup took about 2 minutes > >> >> >> > (seriously). > >> >> >> > I can put together a step by step if you're interested (for free :) > > >> >> >> > On Aug 19, 12:11 pm, Jason Brower wrote: > >> >> >> > > I almost have this settup working on a dreamhost server. > >> >> >> > > Here is the tutorial I am > >> >> >> > > following...http://wiki.dreamhost.com/Web2py > >> >> >> > > Everything seems to work ok... Except when I try to go to the > >> >> >> > > directory > >> >> >> > > I get this in my browser...http://www.trimaxsafety.com.tw/web2py/ > >> >> >> > > This is not the ussual 404 error. > >> >> >> > > Here is my setup > >> >> >> > > [redwings]$ python -V > >> >> >> > > Python 2.5 > >> >> >> > > [redwings]$ pwd > >> >> >> > > /home/interestid/trimaxsafety.com.tw/web2py > >> >> >> > > [redwings]$ ls -l > >> >> >> > > total 2676 > >> >> >> > > -rw-r--r-- 1 interestid pg2250868 225 2009-02-07 15:23 ABOUT > >> >> >> > > -rw-r--r-- 1 interestid pg2250868 6006 2009-02-07 15:23 > >> >> >> > > LICENSE > >> >> >> > > -rw-r--r-- 1 interestid pg2250868 5040 2009-08-17 22:07 > >> >> >> > > Makefile > >> >> >> > > -rw-r--r-- 1 interestid pg2250868 15964 2009-08-11 04:56 README > >> >> >> > > -rw-r--r-- 1 interestid pg2250868 37 2009-08-17 22:07 > >> >> >> > > VERSION > >> >> >> > > -rw-r--r-- 1 interestid pg2250868 0 2009-07-17 19:33 > >> >> >> > > __init__.py > >> >> >> > > -rw-r--r-- 1 interestid pg2250868 392896 2009-08-17 22:08 > >> >> >> > > admin.w2p > >> >> >> > > -rw-r--r-- 1 interestid pg2250868 601 2009-05-21 21:58 > >> >> >> > > app.yaml > >> >> >> > > drwxrwxr-x 5 interestid pg2250868 4096 2009-08-19 08:27 > >> >> >> > > applications > >> >> >> > > -rwxr-xr-x 1 interestid pg2250868 334 2009-05-15 09:45 > >> >> >> > > cgihandler.py > >> >> >> > > drwxrwxr-x 2 interestid pg2250868 4096 2009-08-19 08:27 > >> >> >> > > deposit > >> >> >> > > -rwxrwxr-x 1 interestid pg2250868 226 2009-08-19 08:08 > >> >> >> > > dispatch.fcgi > >> >> >> > > -rwxr-xr-x 1 interestid pg2250868 4753 2009-07-12 14:02 > >> >> >> > > epydoc.conf > >> >> >> > > -rw-r--r-- 1 interestid pg2250868 20993 2009-07-12 14:01 > >> >> >> > > epydoc.css > >> >> >> > > -rw-r--r-- 1 interestid pg2250868 2115361 2009-08-17 22:08 > >> >> >> > > examples.w2p > >> >> >> > > -rw-r--r-- 1 interestid pg2250868 1242 2009-05-15 09:45 > >> >> >> > > fcgihandler.py > >> >> >> > > -rw-r--r-- 1 interestid pg2250868 1606 2009-07-17 19:33 > >> >> >> > > gaehandler.py > >> >> >> > > drwxrwxr-x 3 interestid pg2250868 4096 2009-08-19 08:27 gluon > >> >> >
[web2py:29141] Fwd: PyCon Argentina 2009
FYI Begin forwarded message: > From: Gabriel Genellina > Date: August 21, 2009 1:39:21 AM CDT > To: "python-annou...@python.org" > Subject: PyCon Argentina 2009 > Reply-To: "python-l...@python.org" > > PyCon Argentina 2009 - Buenos Aires - September 4-5th. > > The first national Python conference in Argentina "PyCon Argentina > 2009", > also the first PyCon at a Spanish-speaking country, will be held on > Buenos > Aires next month. > > There are more than 30 programmed talks covering many different > subjects, > short lightning talks, and two special speakers: Collin Winter > (Unladen > Swallow) and Jacob Kaplan-Moss (Django). > > Attendance is free of charge but advance registration is required. For > more information, see http://ar.pycon.org/ > > > Original press release, in Spanish (official PyCon Argentina > language): > > Durante los días 4 y 5 de Septiembre de 2009 tendrá lugar en la > Ciudad de > Buenos Aires el primer evento a nivel nacional dedicado al lenguaje de > programación Python, PyCon Argentina 2009. La conferencia PyCon se > viene > realizando en otros países del mundo (Estados Unidos desde 2003, > Inglaterra, Brasil, Italia, etc.), siendo ésta la primera vez que se > realiza en un país de habla hispana. Contará con la presencia de Jacob > Kaplan-Moss y Collin Winter, entre otras personalidades del mundo > Python. > > La temática de las charlas es variada, pensando tanto en programadores > novatos que apenas conocen Python (o nunca tuvieron contacto con el > lenguaje hasta ahora), como en desarrolladores avanzados que buscan lo > último de esta tecnología. Es de interés también para bloggers, > autores y > diseñadores web; gerentes, administradores y emprendedores; > científicos, > ingenieros, curiosos y todo aquel que tenga ganas de acercarse a la > comunidad Python en Argentina, PyAr. > > El evento será en la sede de la Universidad de Belgrano, Zabala > 1837. La > organización corre por cuenta de voluntarios de la comunidad local de > usuarios. La asistencia a la conferencia es gratuita pero se requiere > inscripción previa. Para más información, visitar http://ar.pycon.org/ > > Acerca de Python > > Python es un lenguaje de programación dinámico y orientado a objetos > que > puede ser usado para desarrollar aplicaciones de múltiples tipos. > Permite > integrar fácilmente otros lenguajes y herramientas, incluye una amplia > biblioteca de funciones y es sencillo de aprender. Muchos > programadores > Python reconocen un sustancial aumento en su productividad y sienten > que > el lenguaje mismo los incentiva al desarrollo de código de mayor > calidad y > más fácil de mantener. Está disponible en múltiples plataformas, > desde una > PC con Windows o Linux hasta teléfonos celulares, y muchos sitios de > Internet utilizan Python como soporte de sus servicios. Para más > información, visitar http://www.python.org/ > > Acerca de PyAr > > PyAr es la comunidad local de usuarios de Python que nuclea a todos > los > interesados en este lenguaje en la Argentina. Pretende llegar a > usuarios y > empresas, promover el uso del lenguaje, intercambiar información, > compartir experiencias y, en general, ser el marco de referencia > local en > el uso y difusión de esta tecnología. Para más información, visitar > http://python.org.ar/pyar/ > > -- > Gabriel Genellina > -- > http://mail.python.org/mailman/listinfo/python-announce-list > >Support the Python Software Foundation: >http://www.python.org/psf/donations/ --~--~-~--~~~---~--~~ 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:29142] Fwd: PyCon Argentina 2009
FYI Begin forwarded message: > From: Gabriel Genellina > Date: August 21, 2009 1:39:21 AM CDT > To: "python-annou...@python.org" > Subject: PyCon Argentina 2009 > Reply-To: "python-l...@python.org" > > PyCon Argentina 2009 - Buenos Aires - September 4-5th. > > The first national Python conference in Argentina "PyCon Argentina > 2009", > also the first PyCon at a Spanish-speaking country, will be held on > Buenos > Aires next month. > > There are more than 30 programmed talks covering many different > subjects, > short lightning talks, and two special speakers: Collin Winter > (Unladen > Swallow) and Jacob Kaplan-Moss (Django). > > Attendance is free of charge but advance registration is required. For > more information, see http://ar.pycon.org/ > > > Original press release, in Spanish (official PyCon Argentina > language): > > Durante los días 4 y 5 de Septiembre de 2009 tendrá lugar en la > Ciudad de > Buenos Aires el primer evento a nivel nacional dedicado al lenguaje de > programación Python, PyCon Argentina 2009. La conferencia PyCon se > viene > realizando en otros países del mundo (Estados Unidos desde 2003, > Inglaterra, Brasil, Italia, etc.), siendo ésta la primera vez que se > realiza en un país de habla hispana. Contará con la presencia de Jacob > Kaplan-Moss y Collin Winter, entre otras personalidades del mundo > Python. > > La temática de las charlas es variada, pensando tanto en programadores > novatos que apenas conocen Python (o nunca tuvieron contacto con el > lenguaje hasta ahora), como en desarrolladores avanzados que buscan lo > último de esta tecnología. Es de interés también para bloggers, > autores y > diseñadores web; gerentes, administradores y emprendedores; > científicos, > ingenieros, curiosos y todo aquel que tenga ganas de acercarse a la > comunidad Python en Argentina, PyAr. > > El evento será en la sede de la Universidad de Belgrano, Zabala > 1837. La > organización corre por cuenta de voluntarios de la comunidad local de > usuarios. La asistencia a la conferencia es gratuita pero se requiere > inscripción previa. Para más información, visitar http://ar.pycon.org/ > > Acerca de Python > > Python es un lenguaje de programación dinámico y orientado a objetos > que > puede ser usado para desarrollar aplicaciones de múltiples tipos. > Permite > integrar fácilmente otros lenguajes y herramientas, incluye una amplia > biblioteca de funciones y es sencillo de aprender. Muchos > programadores > Python reconocen un sustancial aumento en su productividad y sienten > que > el lenguaje mismo los incentiva al desarrollo de código de mayor > calidad y > más fácil de mantener. Está disponible en múltiples plataformas, > desde una > PC con Windows o Linux hasta teléfonos celulares, y muchos sitios de > Internet utilizan Python como soporte de sus servicios. Para más > información, visitar http://www.python.org/ > > Acerca de PyAr > > PyAr es la comunidad local de usuarios de Python que nuclea a todos > los > interesados en este lenguaje en la Argentina. Pretende llegar a > usuarios y > empresas, promover el uso del lenguaje, intercambiar información, > compartir experiencias y, en general, ser el marco de referencia > local en > el uso y difusión de esta tecnología. Para más información, visitar > http://python.org.ar/pyar/ > > -- > Gabriel Genellina > -- > http://mail.python.org/mailman/listinfo/python-announce-list > >Support the Python Software Foundation: >http://www.python.org/psf/donations/ --~--~-~--~~~---~--~~ 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:29143] Re: Can changes in modules reload automatically?
> The "call it twice" might cause by the "caveat" mentioned in python > document of reload(), quoted below. But honestly speaking, it sounds > complicated, I don't quite understand it, and not gonna understand it > either as long as I do not feel the need for using reload(). :-) In a highly non-scientific way (aka just try and see what happens...) I found this works: DEVELOPMENT = True utilsmodule = 'applications.%s.modules.utils' % request.application exec('from %s import doit' % utilsmodule) if DEVELOPMENT: import sys reload(sys.modules[utilsmodule]) exec('from %s import doit' % utilsmodule) Weird side effect: it shows an empty flash. I'm only using functions in this module, not classes as you do (which apparently give problems). Conclusion: It's all very iffy. I just tried your modules workaround, and that works just fine. It doesn't feel right to abuse models for this, but it definitely makes development life easier. --~--~-~--~~~---~--~~ 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:29144] Re: Routes in GAE
Massimo, Thanks for the reply. Even after adding the commas, I get the same error. If I say, routes_out = (('/ccweb/default/$a', '/cc/$a'),) routes_in = (('.*:/cc/$a','/ccweb/default/$a'),) It throws an exception. If I say, routes_out = (('/ccweb/default/$a', '/cc/$a'),) or routes_in = (('.*:/cc/$a','/ccweb/default/$a'),) It works as expected. The weird part is, routes_out = (('/ccweb/default/$a', '/cc/$a'),) #routes_in = (('.*:/cc/$a','/ccweb/default/$a'),) throws an exception. The exception, no file locking no sqlite3 or pysqlite2.dbapi2 driver no MySQLdb driver no psycopg2 driver no cx_Oracle driver no MSSQL/DB2 driver no kinterbasdb driver no informixdb driver no zxJDBC driver unable to import dbhash Your routes.py has a syntax error. Please fix it before you restart web2py : invalid syntax (, line 1) Traceback (most recent call last): File "/base/data/home/apps/myapp/1.335820055527865939/ gaehandler.py", line 26, in import gluon.main File "/base/data/home/apps/myapp/1.335820055527865939/gluon/ main.py", line 39, in from globals import Request, Response, Session File "/base/data/home/apps/myapp/1.335820055527865939/gluon/ globals.py", line 18, in from compileapp import run_view_in File "/base/data/home/apps/myapp/1.335820055527865939/gluon/ compileapp.py", line 43, in from rewrite import error_message_custom File "/base/data/home/apps/myapp/1.335820055527865939/gluon/ rewrite.py", line 31, in raise e : invalid syntax (, line 1) Any help is appreciated. Thanks. Prabhu On Aug 23, 6:46 pm, mdipierro wrote: > routes_in = (('/cc/$a','/ccweb/default/$a'),) > routes_out = (('/ccweb/default/$a', '/cc/$a'),) > > the '.*:' is not necessary. The key missing ingredient is the ',' > > Massimo > > On Aug 22, 1:54 am, Prabhu wrote: > > > Thanks Victor and Yarko. > > > It works if I specify routes_in = (('.*:/cc/$a','/ccweb/default/$a')) > > or > > routes_out = (('/ccweb/default/$a', '/cc/$a')) > > > If I say > > > routes_in = (('.*:/cc/$a','/ccweb/default/$a')) > > routes_out = (('/ccweb/default/$a', '/cc/$a')) > > > in routes.py, I still get the syntax error. Why am I not able to > > specify both? This looks like a very dumb mistake I am making. Any > > ideas? > > > Prabhu > > > On Aug 22, 9:02 am, Yarko Tymciurak wrote: > > > > you might find this discussiont helpful: > > > >http://groups.google.com/group/web2py/msg/abb56704cda162a0 > > > > On Fri, Aug 21, 2009 at 5:17 PM, Victor wrote: > > > > > your line should be routes_in = (('.*:/testme','/myapp/default/ > > > > index')) dont forget to add an $ at the end if all you want is / > > > > testme > > > > > On Aug 21, 10:41 pm, Prabhu wrote: > > > > > Hi, > > > > > > Newbie to web2py here. My routes.py reads, > > > > > > #!/usr/bin/env python > > > > > # -*- coding: utf-8 -*- > > > > > > routes_in = (('/testme','/myapp/default/index'),) > > > > > > routes_out = (('/myapp/default/index', '/test'),) > > > > > >http://127.0.0.1:8000/testmeworks. When I upload web2py to GAE, I get > > > > > the following error > > > > > > Your routes.py has a syntax error. Please fix it before you restart > > > > > web2py > > > > > : invalid syntax (, line 3) > > > > > Traceback (most recent call last): > > > > > File "/base/data/home/apps/myapp/1.335783148456469963/ > > > > > gaehandler.py", line 26, in > > > > > import gluon.main > > > > > File "/base/data/home/apps/myapp/1.335783148456469963/gluon/ > > > > > main.py", line 39, in > > > > > from globals import Request, Response, Session > > > > > File "/base/data/home/apps/myapp/1.335783148456469963/gluon/ > > > > > globals.py", line 18, in > > > > > from compileapp import run_view_in > > > > > File "/base/data/home/apps/myapp/1.335783148456469963/gluon/ > > > > > compileapp.py", line 43, in > > > > > from rewrite import error_message_custom > > > > > File "/base/data/home/apps/myapp/1.335783148456469963/gluon/ > > > > > rewrite.py", line 31, in > > > > > raise e > > > > > : invalid syntax (, line 3) > > > > > > This happens when there is a routes.py file (even if all the lines are > > > > > commented). > > > > > > Is this the correct way to do URL Rewrite? The Reddish application > > > > > (web2py.appspot.com) does this correctly. How? The source code (of > > > > > Reddish) has the application only. > > > > > > Can someone please clarify this? > > > > > > Thanks. --~--~-~--~~~---~--~~ 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:29145] Re: Fwd: PyCon Argentina 2009
Massimo, I will go to the evnt as guest for a talk about Python and Science and Technology development... and mostly of the interfases for admin work is done with web2py, which also speak, also i will ask for another space to speak about web2py. Saludos, Alfonso de la Guarda Centro Open Source(COS) alfonsodg.blogspot.com alfonsodg.wordpress.com Agenda:http://tinyurl.com/djmjol Telef. 991935157 1024D/B23B24A4 5469 ED92 75A3 BBDB FD6B 58A5 54A1 851D B23B 24A4 2009/8/23 Massimo Di Pierro : > FYI > Begin forwarded message: > > From: Gabriel Genellina > Date: August 21, 2009 1:39:21 AM CDT > To: "python-annou...@python.org" > Subject: PyCon Argentina 2009 > Reply-To: "python-l...@python.org" > PyCon Argentina 2009 - Buenos Aires - September 4-5th. > > The first national Python conference in Argentina "PyCon Argentina 2009", > also the first PyCon at a Spanish-speaking country, will be held on Buenos > Aires next month. > > There are more than 30 programmed talks covering many different subjects, > short lightning talks, and two special speakers: Collin Winter (Unladen > Swallow) and Jacob Kaplan-Moss (Django). > > Attendance is free of charge but advance registration is required. For > more information, see http://ar.pycon.org/ > > > Original press release, in Spanish (official PyCon Argentina language): > > Durante los días 4 y 5 de Septiembre de 2009 tendrá lugar en la Ciudad de > Buenos Aires el primer evento a nivel nacional dedicado al lenguaje de > programación Python, PyCon Argentina 2009. La conferencia PyCon se viene > realizando en otros países del mundo (Estados Unidos desde 2003, > Inglaterra, Brasil, Italia, etc.), siendo ésta la primera vez que se > realiza en un país de habla hispana. Contará con la presencia de Jacob > Kaplan-Moss y Collin Winter, entre otras personalidades del mundo Python. > > La temática de las charlas es variada, pensando tanto en programadores > novatos que apenas conocen Python (o nunca tuvieron contacto con el > lenguaje hasta ahora), como en desarrolladores avanzados que buscan lo > último de esta tecnología. Es de interés también para bloggers, autores y > diseñadores web; gerentes, administradores y emprendedores; científicos, > ingenieros, curiosos y todo aquel que tenga ganas de acercarse a la > comunidad Python en Argentina, PyAr. > > El evento será en la sede de la Universidad de Belgrano, Zabala 1837. La > organización corre por cuenta de voluntarios de la comunidad local de > usuarios. La asistencia a la conferencia es gratuita pero se requiere > inscripción previa. Para más información, visitar http://ar.pycon.org/ > > Acerca de Python > > Python es un lenguaje de programación dinámico y orientado a objetos que > puede ser usado para desarrollar aplicaciones de múltiples tipos. Permite > integrar fácilmente otros lenguajes y herramientas, incluye una amplia > biblioteca de funciones y es sencillo de aprender. Muchos programadores > Python reconocen un sustancial aumento en su productividad y sienten que > el lenguaje mismo los incentiva al desarrollo de código de mayor calidad y > más fácil de mantener. Está disponible en múltiples plataformas, desde una > PC con Windows o Linux hasta teléfonos celulares, y muchos sitios de > Internet utilizan Python como soporte de sus servicios. Para más > información, visitar http://www.python.org/ > > Acerca de PyAr > > PyAr es la comunidad local de usuarios de Python que nuclea a todos los > interesados en este lenguaje en la Argentina. Pretende llegar a usuarios y > empresas, promover el uso del lenguaje, intercambiar información, > compartir experiencias y, en general, ser el marco de referencia local en > el uso y difusión de esta tecnología. Para más información, visitar > http://python.org.ar/pyar/ > > -- > Gabriel Genellina > -- > http://mail.python.org/mailman/listinfo/python-announce-list > > Support the Python Software Foundation: > http://www.python.org/psf/donations/ > > > > > --~--~-~--~~~---~--~~ 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:29146] Re: Fwd: PyCon Argentina 2009
By the way, i have translated the cookbook and the pyworks pres to the spanish, is usefull to the web2py site? Saludos, Alfonso de la Guarda Centro Open Source(COS) alfonsodg.blogspot.com alfonsodg.wordpress.com Agenda:http://tinyurl.com/djmjol Telef. 991935157 1024D/B23B24A4 5469 ED92 75A3 BBDB FD6B 58A5 54A1 851D B23B 24A4 2009/8/23 Massimo Di Pierro : > FYI > Begin forwarded message: > > From: Gabriel Genellina > Date: August 21, 2009 1:39:21 AM CDT > To: "python-annou...@python.org" > Subject: PyCon Argentina 2009 > Reply-To: "python-l...@python.org" > PyCon Argentina 2009 - Buenos Aires - September 4-5th. > > The first national Python conference in Argentina "PyCon Argentina 2009", > also the first PyCon at a Spanish-speaking country, will be held on Buenos > Aires next month. > > There are more than 30 programmed talks covering many different subjects, > short lightning talks, and two special speakers: Collin Winter (Unladen > Swallow) and Jacob Kaplan-Moss (Django). > > Attendance is free of charge but advance registration is required. For > more information, see http://ar.pycon.org/ > > > Original press release, in Spanish (official PyCon Argentina language): > > Durante los días 4 y 5 de Septiembre de 2009 tendrá lugar en la Ciudad de > Buenos Aires el primer evento a nivel nacional dedicado al lenguaje de > programación Python, PyCon Argentina 2009. La conferencia PyCon se viene > realizando en otros países del mundo (Estados Unidos desde 2003, > Inglaterra, Brasil, Italia, etc.), siendo ésta la primera vez que se > realiza en un país de habla hispana. Contará con la presencia de Jacob > Kaplan-Moss y Collin Winter, entre otras personalidades del mundo Python. > > La temática de las charlas es variada, pensando tanto en programadores > novatos que apenas conocen Python (o nunca tuvieron contacto con el > lenguaje hasta ahora), como en desarrolladores avanzados que buscan lo > último de esta tecnología. Es de interés también para bloggers, autores y > diseñadores web; gerentes, administradores y emprendedores; científicos, > ingenieros, curiosos y todo aquel que tenga ganas de acercarse a la > comunidad Python en Argentina, PyAr. > > El evento será en la sede de la Universidad de Belgrano, Zabala 1837. La > organización corre por cuenta de voluntarios de la comunidad local de > usuarios. La asistencia a la conferencia es gratuita pero se requiere > inscripción previa. Para más información, visitar http://ar.pycon.org/ > > Acerca de Python > > Python es un lenguaje de programación dinámico y orientado a objetos que > puede ser usado para desarrollar aplicaciones de múltiples tipos. Permite > integrar fácilmente otros lenguajes y herramientas, incluye una amplia > biblioteca de funciones y es sencillo de aprender. Muchos programadores > Python reconocen un sustancial aumento en su productividad y sienten que > el lenguaje mismo los incentiva al desarrollo de código de mayor calidad y > más fácil de mantener. Está disponible en múltiples plataformas, desde una > PC con Windows o Linux hasta teléfonos celulares, y muchos sitios de > Internet utilizan Python como soporte de sus servicios. Para más > información, visitar http://www.python.org/ > > Acerca de PyAr > > PyAr es la comunidad local de usuarios de Python que nuclea a todos los > interesados en este lenguaje en la Argentina. Pretende llegar a usuarios y > empresas, promover el uso del lenguaje, intercambiar información, > compartir experiencias y, en general, ser el marco de referencia local en > el uso y difusión de esta tecnología. Para más información, visitar > http://python.org.ar/pyar/ > > -- > Gabriel Genellina > -- > http://mail.python.org/mailman/listinfo/python-announce-list > > Support the Python Software Foundation: > http://www.python.org/psf/donations/ > > > > > --~--~-~--~~~---~--~~ 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:29147] Re: Fwd: PyCon Argentina 2009
this is great. Send us some pictures if you can. On Aug 23, 6:42 am, Alfonso de la Guarda wrote: > Massimo, > > I will go to the evnt as guest for a talk about Python and Science and > Technology development... and mostly of the interfases for admin work > is done with web2py, which also speak, also i will ask for another > space to speak about web2py. > > Saludos, > > > Alfonso de la Guarda > Centro Open Source(COS) > alfonsodg.blogspot.com > alfonsodg.wordpress.com > Agenda:http://tinyurl.com/djmjol > Telef. 991935157 > 1024D/B23B24A4 > 5469 ED92 75A3 BBDB FD6B 58A5 54A1 851D B23B 24A4 > > 2009/8/23 Massimo Di Pierro : > > > FYI > > Begin forwarded message: > > > From: Gabriel Genellina > > Date: August 21, 2009 1:39:21 AM CDT > > To: "python-annou...@python.org" > > Subject: PyCon Argentina 2009 > > Reply-To: "python-l...@python.org" > > PyCon Argentina 2009 - Buenos Aires - September 4-5th. > > > The first national Python conference in Argentina "PyCon Argentina 2009", > > also the first PyCon at a Spanish-speaking country, will be held on Buenos > > Aires next month. > > > There are more than 30 programmed talks covering many different subjects, > > short lightning talks, and two special speakers: Collin Winter (Unladen > > Swallow) and Jacob Kaplan-Moss (Django). > > > Attendance is free of charge but advance registration is required. For > > more information, seehttp://ar.pycon.org/ > > > Original press release, in Spanish (official PyCon Argentina language): > > > Durante los días 4 y 5 de Septiembre de 2009 tendrá lugar en la Ciudad de > > Buenos Aires el primer evento a nivel nacional dedicado al lenguaje de > > programación Python, PyCon Argentina 2009. La conferencia PyCon se viene > > realizando en otros países del mundo (Estados Unidos desde 2003, > > Inglaterra, Brasil, Italia, etc.), siendo ésta la primera vez que se > > realiza en un país de habla hispana. Contará con la presencia de Jacob > > Kaplan-Moss y Collin Winter, entre otras personalidades del mundo Python. > > > La temática de las charlas es variada, pensando tanto en programadores > > novatos que apenas conocen Python (o nunca tuvieron contacto con el > > lenguaje hasta ahora), como en desarrolladores avanzados que buscan lo > > último de esta tecnología. Es de interés también para bloggers, autores y > > diseñadores web; gerentes, administradores y emprendedores; científicos, > > ingenieros, curiosos y todo aquel que tenga ganas de acercarse a la > > comunidad Python en Argentina, PyAr. > > > El evento será en la sede de la Universidad de Belgrano, Zabala 1837. La > > organización corre por cuenta de voluntarios de la comunidad local de > > usuarios. La asistencia a la conferencia es gratuita pero se requiere > > inscripción previa. Para más información, visitarhttp://ar.pycon.org/ > > > Acerca de Python > > > Python es un lenguaje de programación dinámico y orientado a objetos que > > puede ser usado para desarrollar aplicaciones de múltiples tipos. Permite > > integrar fácilmente otros lenguajes y herramientas, incluye una amplia > > biblioteca de funciones y es sencillo de aprender. Muchos programadores > > Python reconocen un sustancial aumento en su productividad y sienten que > > el lenguaje mismo los incentiva al desarrollo de código de mayor calidad y > > más fácil de mantener. Está disponible en múltiples plataformas, desde una > > PC con Windows o Linux hasta teléfonos celulares, y muchos sitios de > > Internet utilizan Python como soporte de sus servicios. Para más > > información, visitarhttp://www.python.org/ > > > Acerca de PyAr > > > PyAr es la comunidad local de usuarios de Python que nuclea a todos los > > interesados en este lenguaje en la Argentina. Pretende llegar a usuarios y > > empresas, promover el uso del lenguaje, intercambiar información, > > compartir experiencias y, en general, ser el marco de referencia local en > > el uso y difusión de esta tecnología. Para más información, visitar > >http://python.org.ar/pyar/ > > > -- > > Gabriel Genellina > > -- > >http://mail.python.org/mailman/listinfo/python-announce-list > > > Support the Python Software Foundation: > > http://www.python.org/psf/donations/ --~--~-~--~~~---~--~~ 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:29148] Re: Fwd: PyCon Argentina 2009
If you send them to me I will post them. Make sure they mention your name as author. Enentually we should have a better site where to post transalated docs. Massimo On Aug 23, 6:43 am, Alfonso de la Guarda wrote: > By the way, i have translated the cookbook and the pyworks pres to > the spanish, is usefull to the web2py site? > > Saludos, > > > Alfonso de la Guarda > Centro Open Source(COS) > alfonsodg.blogspot.com > alfonsodg.wordpress.com > Agenda:http://tinyurl.com/djmjol > Telef. 991935157 > 1024D/B23B24A4 > 5469 ED92 75A3 BBDB FD6B 58A5 54A1 851D B23B 24A4 > > 2009/8/23 Massimo Di Pierro : > > > FYI > > Begin forwarded message: > > > From: Gabriel Genellina > > Date: August 21, 2009 1:39:21 AM CDT > > To: "python-annou...@python.org" > > Subject: PyCon Argentina 2009 > > Reply-To: "python-l...@python.org" > > PyCon Argentina 2009 - Buenos Aires - September 4-5th. > > > The first national Python conference in Argentina "PyCon Argentina 2009", > > also the first PyCon at a Spanish-speaking country, will be held on Buenos > > Aires next month. > > > There are more than 30 programmed talks covering many different subjects, > > short lightning talks, and two special speakers: Collin Winter (Unladen > > Swallow) and Jacob Kaplan-Moss (Django). > > > Attendance is free of charge but advance registration is required. For > > more information, seehttp://ar.pycon.org/ > > > Original press release, in Spanish (official PyCon Argentina language): > > > Durante los días 4 y 5 de Septiembre de 2009 tendrá lugar en la Ciudad de > > Buenos Aires el primer evento a nivel nacional dedicado al lenguaje de > > programación Python, PyCon Argentina 2009. La conferencia PyCon se viene > > realizando en otros países del mundo (Estados Unidos desde 2003, > > Inglaterra, Brasil, Italia, etc.), siendo ésta la primera vez que se > > realiza en un país de habla hispana. Contará con la presencia de Jacob > > Kaplan-Moss y Collin Winter, entre otras personalidades del mundo Python. > > > La temática de las charlas es variada, pensando tanto en programadores > > novatos que apenas conocen Python (o nunca tuvieron contacto con el > > lenguaje hasta ahora), como en desarrolladores avanzados que buscan lo > > último de esta tecnología. Es de interés también para bloggers, autores y > > diseñadores web; gerentes, administradores y emprendedores; científicos, > > ingenieros, curiosos y todo aquel que tenga ganas de acercarse a la > > comunidad Python en Argentina, PyAr. > > > El evento será en la sede de la Universidad de Belgrano, Zabala 1837. La > > organización corre por cuenta de voluntarios de la comunidad local de > > usuarios. La asistencia a la conferencia es gratuita pero se requiere > > inscripción previa. Para más información, visitarhttp://ar.pycon.org/ > > > Acerca de Python > > > Python es un lenguaje de programación dinámico y orientado a objetos que > > puede ser usado para desarrollar aplicaciones de múltiples tipos. Permite > > integrar fácilmente otros lenguajes y herramientas, incluye una amplia > > biblioteca de funciones y es sencillo de aprender. Muchos programadores > > Python reconocen un sustancial aumento en su productividad y sienten que > > el lenguaje mismo los incentiva al desarrollo de código de mayor calidad y > > más fácil de mantener. Está disponible en múltiples plataformas, desde una > > PC con Windows o Linux hasta teléfonos celulares, y muchos sitios de > > Internet utilizan Python como soporte de sus servicios. Para más > > información, visitarhttp://www.python.org/ > > > Acerca de PyAr > > > PyAr es la comunidad local de usuarios de Python que nuclea a todos los > > interesados en este lenguaje en la Argentina. Pretende llegar a usuarios y > > empresas, promover el uso del lenguaje, intercambiar información, > > compartir experiencias y, en general, ser el marco de referencia local en > > el uso y difusión de esta tecnología. Para más información, visitar > >http://python.org.ar/pyar/ > > > -- > > Gabriel Genellina > > -- > >http://mail.python.org/mailman/listinfo/python-announce-list > > > Support the Python Software Foundation: > > http://www.python.org/psf/donations/ --~--~-~--~~~---~--~~ 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:29149] Re: Password 2 field - Using Custom on Registration.
Thanks for the note Massimo, I tried it but no the validation is not going through... It's not working. Thanks for your help and please let us know if you have any other idea. Cheers, Yannick P. On Aug 23, 6:54 am, mdipierro wrote: > auch! I just realized password_two is implamented without a widget > therefore this syntax does not work. > Until this gets firxed this you can do: > > > {{=regform.custom.begin}} > > {{=regform.custom.widget.first_name}} > {{=regform.custom.widget.last_name}} > {{=regform.custom.widget.email}} > {{=regform.custom.widget.password}} > > {{if regform.errors.password_two:}} > {{=regform.errors.password_two}}{{pass}} > {{=regform.custom.end}} > > Let us know if it works or not. > > Massimo > > On Aug 22, 10:31 pm, Yannick wrote: > > > Hello mate, > > quick question... I'm trying to customize the Registration form using > > Auth. > > I was wondering about the Password_two field ??? > > here is what I'm doing but not working: > > > > > > {{=regform.custom.begin}} > > {{=regform.custom.widget.first_name}} > > {{=regform.custom.widget.last_name}} > > {{=regform.custom.widget.email}} > > {{=regform.custom.widget.password}} > > {{=regform.custom.widget.password_two}} ### <--- here is my > > problem ??? what to i have to put here? > > {{=regform.custom.submit}} > > {{=regform.custom.end}} > > > ## > > > with this " {{=regform.custom.widget.password_two}}" the textfield > > doesn't show... What do I have to put there ? > > > Can anyone already had the same issue ? > > > Thanks for your help --~--~-~--~~~---~--~~ 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:29150] SSL database connections
Is it possible to define a secure database connection? Ex: db = DAL(‘postgres://user:passw...@hostname/db’, pools=10, secure=True) My production DB and web servers are running on a different machines. --~--~-~--~~~---~--~~ 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:29151] Re: SSL database connections
Yes but not this way. You have to open an ssh tunner outside web2py and then instruct web2py to connect to the database using the port used by the tunnel. Massimo On Aug 23, 7:47 am, Don wrote: > Is it possible to define a secure database connection? > > Ex: db = DAL(‘postgres://user:passw...@hostname/db’, pools=10, > secure=True) > > My production DB and web servers are running on a different machines. --~--~-~--~~~---~--~~ 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:29152] Re: Password 2 field - Using Custom on Registration.
Even the customization of the Login Form doesn't work using this : {{=loginform.custom.begin}} Email: {{=loginform.custom.widget.email}} Password: {{=loginform.custom.widget.password}} {{=loginform.custom.submit}} {{=loginform.custom.end}} So basically this is how i customize the login page: Email Address: Password: {{=loginform.hidden_fields()}} Thanks for your help! Yannick P. On Aug 23, 8:44 am, Yannick wrote: > Thanks for the note Massimo, > I tried it but no the validation is not going through... It's not > working. > > Thanks for your help and please let us know if you have any other > idea. > > Cheers, > Yannick P. > > On Aug 23, 6:54 am, mdipierro wrote: > > > auch! I just realized password_two is implamented without a widget > > therefore this syntax does not work. > > Until this gets firxed this you can do: > > > > {{=regform.custom.begin}} > > > {{=regform.custom.widget.first_name}} > > {{=regform.custom.widget.last_name}} > > {{=regform.custom.widget.email}} > > {{=regform.custom.widget.password}} > > > > {{if regform.errors.password_two:}} > > {{=regform.errors.password_two}}{{pass}} > > {{=regform.custom.end}} > > > Let us know if it works or not. > > > Massimo > > > On Aug 22, 10:31 pm, Yannick wrote: > > > > Hello mate, > > > quick question... I'm trying to customize the Registration form using > > > Auth. > > > I was wondering about the Password_two field ??? > > > here is what I'm doing but not working: > > > > > > > > {{=regform.custom.begin}} > > > {{=regform.custom.widget.first_name}} > > > {{=regform.custom.widget.last_name}} > > > {{=regform.custom.widget.email}} > > > {{=regform.custom.widget.password}} > > > {{=regform.custom.widget.password_two}} ### <--- here is my > > > problem ??? what to i have to put here? > > > {{=regform.custom.submit}} > > > {{=regform.custom.end}} > > > > ## > > > > with this " {{=regform.custom.widget.password_two}}" the textfield > > > doesn't show... What do I have to put there ? > > > > Can anyone already had the same issue ? > > > > Thanks for your help --~--~-~--~~~---~--~~ 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:29153] Re: SSL database connections
I do not have SSH access to the DB server. Can I use psycopg2 directly to create the connection? On Aug 23, 8:59 am, mdipierro wrote: > Yes but not this way. > You have to open an ssh tunner outside web2py and then instruct web2py > to connect to the database using the port used by the tunnel. > > Massimo > > On Aug 23, 7:47 am, Don wrote: > > > Is it possible to define a secure database connection? > > > Ex: db = DAL(‘postgres://user:passw...@hostname/db’, pools=10, > > secure=True) > > > My production DB and web servers are running on a different machines. --~--~-~--~~~---~--~~ 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:29154] Re: SSL database connections
Then I do not understand what you mean by "secure connection". Is there a secure connection function provided by postgresql and psycopg2 that web2py is not using and should be using? Massimo On Aug 23, 8:14 am, Don wrote: > I do not have SSH access to the DB server. Can I use psycopg2 > directly to create the connection? > > On Aug 23, 8:59 am, mdipierro wrote: > > > Yes but not this way. > > You have to open an ssh tunner outside web2py and then instruct web2py > > to connect to the database using the port used by the tunnel. > > > Massimo > > > On Aug 23, 7:47 am, Don wrote: > > > > Is it possible to define a secure database connection? > > > > Ex: db = DAL(‘postgres://user:passw...@hostname/db’, pools=10, > > > secure=True) > > > > My production DB and web servers are running on a different machines. --~--~-~--~~~---~--~~ 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:29155] Re: Welcome login does not work with mysql
I believe that the password field that web2py generates for MySQL is a varchar 32 which causes truncation of hashed passwords and prevents login. I was able to manually alter the field to varchar 128, reset my password and then it worked. On Aug 18, 3:05 am, ed wrote: > I can now login but the password is not encrypted in auth_user. Is it > possible the password field in login, edit profile and change password > are not encrypted so that when comparison is made to the > auth_user.password it is not equal and issues error "Invalid login"? > > On Aug 18, 3:50 pm, mdipierro wrote: > > > Yes, after auth.define_tables() > > > db.auth_user.password.requires=[] > > > On Aug 18, 2:30 am, ed wrote: > > > > How can I override password encryption. I want to check if the content > > > of password is the same as what I inputted. Is this possible? > > > > On Aug 18, 3:26 pm, mdipierro wrote: > > > > > This is odd. You should be able to login. I do not see how this can > > > > fail. > > > > > Have you changed anything else? > > > > Has anybody else tried Ath withmysql? > > > > > Massimo > > > > > On Aug 18, 2:13 am, ed wrote: > > > > > > auth_user.registration_key is blank. > > > > > > On Aug 18, 3:00 pm, mdipierro wrote: > > > > > > > All I meant is visithttp:///yourapp/appadmin > > > > > > and check what is in the registration_key field of those records. > > > > > > > On Aug 18, 1:56 am, ed wrote: > > > > > > > > I registered 2 users and both were inmysqldatabase tables > > > > > > > auth_user, > > > > > > > auth_group, auth_event and auth_memebership. I remembered their > > > > > > > passwords and logged out. When I login, message "Invalid login" > > > > > > > was > > > > > > > displayed. You suggested trying appamdin, but didn't know how to > > > > > > > execute this. Sorry. > > > > > > > > On Aug 18, 1:00 pm, mdipierro wrote: > > > > > > > > > Can you tell us more? What is in the database after > > > > > > > > registration? Try > > > > > > > > appamdin. > > > > > > > > > On Aug 17, 11:01 pm, ed wrote: > > > > > > > > > > In sqlite I was able to register and login. However, inmysqlI > > > > > > > > > was > > > > > > > > > able to register only and was not able to login. > > > > > > > > > > On Aug 18, 11:49 am, ed wrote: > > > > > > > > > > > Hi, > > > > > > > > > > I recently downloaded web2py 1.66 and tried Welcome app out > > > > > > > > > > of the box > > > > > > > > > > using sqlite, it worked. I changed tomysqland "Invalid > > > > > > > > > > login" is > > > > > > > > > > displayed. I only changed a line in db.py db= DAL("mysql:// > > > > > > > > > > root:xxx...@localhost:3306/alumnidb") so that i can > > > > > > > > > > usemysql. > > > > > > > > > > Thank you in advance. > > > > > > > > > > Cheers, > > > > > > > > > > ed --~--~-~--~~~---~--~~ 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:29156] Re: Welcome login does not work with mysql
True. That is a problem. I guess password fields should be changed to 128 bits by default. This should automatically migrate existing apps. Any objections? Massimo On Aug 23, 9:13 am, "mr.freeze" wrote: > I believe that the password field that web2py generates for MySQL is a > varchar 32 which causes truncation of hashed passwords and prevents > login. I was able to manually alter the field to varchar 128, reset > my password and then it worked. > > On Aug 18, 3:05 am, ed wrote: > > > I can now login but the password is not encrypted in auth_user. Is it > > possible the password field in login, edit profile and change password > > are not encrypted so that when comparison is made to the > > auth_user.password it is not equal and issues error "Invalid login"? > > > On Aug 18, 3:50 pm, mdipierro wrote: > > > > Yes, after auth.define_tables() > > > > db.auth_user.password.requires=[] > > > > On Aug 18, 2:30 am, ed wrote: > > > > > How can I override password encryption. I want to check if the content > > > > of password is the same as what I inputted. Is this possible? > > > > > On Aug 18, 3:26 pm, mdipierro wrote: > > > > > > This is odd. You should be able to login. I do not see how this can > > > > > fail. > > > > > > Have you changed anything else? > > > > > Has anybody else tried Ath withmysql? > > > > > > Massimo > > > > > > On Aug 18, 2:13 am, ed wrote: > > > > > > > auth_user.registration_key is blank. > > > > > > > On Aug 18, 3:00 pm, mdipierro wrote: > > > > > > > > All I meant is visithttp:///yourapp/appadmin > > > > > > > and check what is in the registration_key field of those records. > > > > > > > > On Aug 18, 1:56 am, ed wrote: > > > > > > > > > I registered 2 users and both were inmysqldatabase tables > > > > > > > > auth_user, > > > > > > > > auth_group, auth_event and auth_memebership. I remembered their > > > > > > > > passwords and logged out. When I login, message "Invalid login" > > > > > > > > was > > > > > > > > displayed. You suggested trying appamdin, but didn't know how to > > > > > > > > execute this. Sorry. > > > > > > > > > On Aug 18, 1:00 pm, mdipierro wrote: > > > > > > > > > > Can you tell us more? What is in the database after > > > > > > > > > registration? Try > > > > > > > > > appamdin. > > > > > > > > > > On Aug 17, 11:01 pm, ed wrote: > > > > > > > > > > > In sqlite I was able to register and login. However, > > > > > > > > > > inmysqlI was > > > > > > > > > > able to register only and was not able to login. > > > > > > > > > > > On Aug 18, 11:49 am, ed wrote: > > > > > > > > > > > > Hi, > > > > > > > > > > > I recently downloaded web2py 1.66 and tried Welcome app > > > > > > > > > > > out of the box > > > > > > > > > > > using sqlite, it worked. I changed tomysqland "Invalid > > > > > > > > > > > login" is > > > > > > > > > > > displayed. I only changed a line in db.py db= > > > > > > > > > > > DAL("mysql:// > > > > > > > > > > > root:xxx...@localhost:3306/alumnidb") so that i can > > > > > > > > > > > usemysql. > > > > > > > > > > > Thank you in advance. > > > > > > > > > > > Cheers, > > > > > > > > > > > ed --~--~-~--~~~---~--~~ 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:29157] Re: Password 2 field - Using Custom on Registration.
Please email me personally. Can you show me the generated html when you do: {{=regform.custom.begin}} {{=regform.custom.widget.first_name}} {{=regform.custom.widget.last_name}} {{=regform.custom.widget.email}} {{=regform.custom.widget.password}} {{=regform.custom.widget.password_two}} {{=regform.custom.end}} and what do you mean by "does not work" do you get a ticket? If so, can you send me the ticket? On Aug 23, 8:04 am, Yannick wrote: > Even the customization of the Login Form doesn't work using this : > > {{=loginform.custom.begin}} > > > Email: > {{=loginform.custom.widget.email}} > > > Password: > {{=loginform.custom.widget.password}} > > > {{=loginform.custom.submit}} > > > > {{=loginform.custom.end}} > > So basically this is how i customize the login page: > > > > > Email Address: > value="{{=loginform.latest.email}}" > > > Password: > > > > > > > > {{=loginform.hidden_fields()}} > > > Thanks for your help! > > Yannick P. > > On Aug 23, 8:44 am, Yannick wrote: > > > Thanks for the note Massimo, > > I tried it but no the validation is not going through... It's not > > working. > > > Thanks for your help and please let us know if you have any other > > idea. > > > Cheers, > > Yannick P. > > > On Aug 23, 6:54 am, mdipierro wrote: > > > > auch! I just realized password_two is implamented without a widget > > > therefore this syntax does not work. > > > Until this gets firxed this you can do: > > > > > {{=regform.custom.begin}} > > > > {{=regform.custom.widget.first_name}} > > > {{=regform.custom.widget.last_name}} > > > {{=regform.custom.widget.email}} > > > {{=regform.custom.widget.password}} > > > > > > {{if regform.errors.password_two:}} > > > {{=regform.errors.password_two}}{{pass}} > > > {{=regform.custom.end}} > > > > Let us know if it works or not. > > > > Massimo > > > > On Aug 22, 10:31 pm, Yannick wrote: > > > > > Hello mate, > > > > quick question... I'm trying to customize the Registration form using > > > > Auth. > > > > I was wondering about the Password_two field ??? > > > > here is what I'm doing but not working: > > > > > > > > > > {{=regform.custom.begin}} > > > > {{=regform.custom.widget.first_name}} > > > > {{=regform.custom.widget.last_name}} > > > > {{=regform.custom.widget.email}} > > > > {{=regform.custom.widget.password}} > > > > {{=regform.custom.widget.password_two}} ### <--- here is my > > > > problem ??? what to i have to put here? > > > > {{=regform.custom.submit}} > > > > {{=regform.custom.end}} > > > > > ## > > > > > with this " {{=regform.custom.widget.password_two}}" the textfield > > > > doesn't show... What do I have to put there ? > > > > > Can anyone already had the same issue ? > > > > > Thanks for your help --~--~-~--~~~---~--~~ 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:29158] Re: Password 2 field - Using Custom on Registration.
same for login.. On Aug 23, 10:08 am, mdipierro wrote: > Please email me personally. Can you show me the generated html when > you do: > > {{=regform.custom.begin}} > {{=regform.custom.widget.first_name}} > {{=regform.custom.widget.last_name}} > {{=regform.custom.widget.email}} > {{=regform.custom.widget.password}} > {{=regform.custom.widget.password_two}} > {{=regform.custom.end}} > > and what do you mean by "does not work" do you get a ticket? If so, > can you send me the ticket? > > On Aug 23, 8:04 am, Yannick wrote: > > > Even the customization of the Login Form doesn't work using this : > > > {{=loginform.custom.begin}} > > > > > > Email: > > {{=loginform.custom.widget.email}} > > > > > > Password: > > {{=loginform.custom.widget.password}} > > > > > > {{=loginform.custom.submit}} > > > > > > > > {{=loginform.custom.end}} > > > So basically this is how i customize the login page: > > > > > > > > > Email Address: > > > value="{{=loginform.latest.email}}" > > > > > > Password: > > > > > > > > > > > > > > > > {{=loginform.hidden_fields()}} > > > > > Thanks for your help! > > > Yannick P. > > > On Aug 23, 8:44 am, Yannick wrote: > > > > Thanks for the note Massimo, > > > I tried it but no the validation is not going through... It's not > > > working. > > > > Thanks for your help and please let us know if you have any other > > > idea. > > > > Cheers, > > > Yannick P. > > > > On Aug 23, 6:54 am, mdipierro wrote: > > > > > auch! I just realized password_two is implamented without a widget > > > > therefore this syntax does not work. > > > > Until this gets firxed this you can do: > > > > > > {{=regform.custom.begin}} > > > > > {{=regform.custom.widget.first_name}} > > > > {{=regform.custom.widget.last_name}} > > > > {{=regform.custom.widget.email}} > > > > {{=regform.custom.widget.password}} > > > > > > > > {{if regform.errors.password_two:}} > > > > {{=regform.errors.password_two}}{{pass}} > > > > {{=regform.custom.end}} > > > > > Let us know if it works or not. > > > > > Massimo > > > > > On Aug 22, 10:31 pm, Yannick wrote: > > > > > > Hello mate, > > > > > quick question... I'm trying to customize the Registration form using > > > > > Auth. > > > > > I was wondering about the Password_two field ??? > > > > > here is what I'm doing but not working: > > > > > > > > > > > > {{=regform.custom.begin}} > > > > > {{=regform.custom.widget.first_name}} > > > > > {{=regform.custom.widget.last_name}} > > > > > {{=regform.custom.widget.email}} > > > > > {{=regform.custom.widget.password}} > > > > > {{=regform.custom.widget.password_two}} ### <--- here is my > > > > > problem ??? what to i have to put here? > > > > > {{=regform.custom.submit}} > > > > > {{=regform.custom.end}} > > > > > > ## > > > > > > with this " {{=regform.custom.widget.password_two}}" the textfield > > > > > doesn't show... What do I have to put there ? > > > > > > Can anyone already had the same issue ? > > > > > > Thanks for your help --~--~-~--~~~---~--~~ 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:29159] Stumped on MySQL error
I'm getting a strange error when copying my application from my dev box to production. Both machines are running the latest trunk. The MySQL server is on a separate machine than both. The app works on my dev box but generates this error when copied to production: Traceback (most recent call last): File "gluon/restricted.py", line 178, in restricted exec ccode in environment File "/home/myhome/mydomain.com/applications/main/models/db.py", line 19, in db = SQLDB(\'mysql://myuser:myp...@mysql.mydomain.com:3306/mydb\') File "gluon/sql.py", line 730, in __init__ self._pool_connection(lambda : MySQLdb.Connection( File "gluon/sql.py", line 642, in _pool_connection self._connection = f() File "gluon/sql.py", line 730, in self._pool_connection(lambda : MySQLdb.Connection( NameError: global name \'MySQLdb\' is not defined' Any help is appreciated. --~--~-~--~~~---~--~~ 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:29160] Re: Stumped on MySQL error
You do not have the mysqldb module in the production machine. You need to install it separately. Massimo On Aug 23, 10:15 am, "mr.freeze" wrote: > I'm getting a strange error when copying my application from my dev > box to production. Both machines are running the latest trunk. The > MySQL server is on a separate machine than both. The app works on my > dev box but generates this error when copied to production: > > Traceback (most recent call last): > File "gluon/restricted.py", line 178, in restricted > exec ccode in environment > File "/home/myhome/mydomain.com/applications/main/models/db.py", > line 19, in > db = SQLDB(\'mysql://myuser:myp...@mysql.mydomain.com:3306/mydb\') > File "gluon/sql.py", line 730, in __init__ > self._pool_connection(lambda : MySQLdb.Connection( > File "gluon/sql.py", line 642, in _pool_connection > self._connection = f() > File "gluon/sql.py", line 730, in > self._pool_connection(lambda : MySQLdb.Connection( > NameError: global name \'MySQLdb\' is not defined' > > Any help is appreciated. --~--~-~--~~~---~--~~ 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:29161] Re: SSL database connections
Yes. PostgreSQL allows for an SSL connection between the client and the server. This can be done with psycopg2, for example: import psycopg2 as database db = database.connect (host="db.host.com", sslmode="require", database="dbname", user="dbuser", password="dbpass") On Sun, Aug 23, 2009 at 10:04 AM, mdipierro wrote: > > Then I do not understand what you mean by "secure connection". Is > there a secure connection function provided by postgresql and psycopg2 > that web2py is not using and should be using? > > Massimo > > On Aug 23, 8:14 am, Don wrote: > > I do not have SSH access to the DB server. Can I use psycopg2 > > directly to create the connection? > > > > On Aug 23, 8:59 am, mdipierro wrote: > > > > > Yes but not this way. > > > You have to open an ssh tunner outside web2py and then instruct web2py > > > to connect to the database using the port used by the tunnel. > > > > > Massimo > > > > > On Aug 23, 7:47 am, Don wrote: > > > > > > Is it possible to define a secure database connection? > > > > > > Ex: db = DAL(‘postgres://user:passw...@hostname/db’, pools=10, > > > > secure=True) > > > > > > My production DB and web servers are running on a different machines. > > > --~--~-~--~~~---~--~~ 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:29162] Re: SSL database connections
We do not support that but now that I know it should be easy to add. We will add it in the next version. Please help us test it. Edit gluon.sql.py and change msg = \ "dbname='%s' user='%s' host='%s' port=%s password='%s'"\ % (db, user, host, port, passwd) self._pool_connection(lambda : psycopg2.connect(msg)) with msg = \ "dbname='%s' user='%s' host='%s' port=%s password='%s' sslmode='require'"\ % (db, user, host, port, passwd) self._pool_connection(lambda : psycopg2.connect(msg)) does it work? Massimo On Aug 23, 10:57 am, Don Lee wrote: > Yes. PostgreSQL allows for an SSL connection between the client and the > server. This can be done with psycopg2, for example: > > import psycopg2 as database > db = database.connect (host="db.host.com", > sslmode="require", > database="dbname", > user="dbuser", > password="dbpass") > > On Sun, Aug 23, 2009 at 10:04 AM, mdipierro wrote: > > > Then I do not understand what you mean by "secure connection". Is > > there a secure connection function provided by postgresql and psycopg2 > > that web2py is not using and should be using? > > > Massimo > > > On Aug 23, 8:14 am, Don wrote: > > > I do not have SSH access to the DB server. Can I use psycopg2 > > > directly to create the connection? > > > > On Aug 23, 8:59 am, mdipierro wrote: > > > > > Yes but not this way. > > > > You have to open an ssh tunner outside web2py and then instruct web2py > > > > to connect to the database using the port used by the tunnel. > > > > > Massimo > > > > > On Aug 23, 7:47 am, Don wrote: > > > > > > Is it possible to define a secure database connection? > > > > > > Ex: db = DAL(‘postgres://user:passw...@hostname/db’, pools=10, > > > > > secure=True) > > > > > > My production DB and web servers are running on a different machines. --~--~-~--~~~---~--~~ 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:29163] Re: Stumped on MySQL error
Doh! I forgot that I switched python versions and didn't install MySQLdb for the new version. Thanks! On Aug 23, 10:56 am, mdipierro wrote: > You do not have the mysqldb module in the production machine. > You need to install it separately. > > Massimo > > On Aug 23, 10:15 am, "mr.freeze" wrote: > > > I'm getting a strange error when copying my application from my dev > > box to production. Both machines are running the latest trunk. The > > MySQL server is on a separate machine than both. The app works on my > > dev box but generates this error when copied to production: > > > Traceback (most recent call last): > > File "gluon/restricted.py", line 178, in restricted > > exec ccode in environment > > File "/home/myhome/mydomain.com/applications/main/models/db.py", > > line 19, in > > db = SQLDB(\'mysql://myuser:myp...@mysql.mydomain.com:3306/mydb\') > > File "gluon/sql.py", line 730, in __init__ > > self._pool_connection(lambda : MySQLdb.Connection( > > File "gluon/sql.py", line 642, in _pool_connection > > self._connection = f() > > File "gluon/sql.py", line 730, in > > self._pool_connection(lambda : MySQLdb.Connection( > > NameError: global name \'MySQLdb\' is not defined' > > > Any help is appreciated. --~--~-~--~~~---~--~~ 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:29164] Re: Password 2 field - Using Custom on Registration.
I just sent the both Html page by email > > > and what do you mean by "does not work" do you get a ticket? If so, > > can you send me the ticket? > No ticket is generate, it just don't generate any feedback. When I fill up the form and click on "Submit" nothing happen from the user point of view and from the back-end I put a break point on the register in Tools.py and the form validation is not going through. Thanks for your help. Cheers, Yannick P. On Aug 23, 11:08 am, mdipierro wrote: > same for login.. > > On Aug 23, 10:08 am, mdipierro wrote: > > > Please email me personally. Can you show me the generated html when > > you do: > > > {{=regform.custom.begin}} > > {{=regform.custom.widget.first_name}} > > {{=regform.custom.widget.last_name}} > > {{=regform.custom.widget.email}} > > {{=regform.custom.widget.password}} > > {{=regform.custom.widget.password_two}} > > {{=regform.custom.end}} > > > and what do you mean by "does not work" do you get a ticket? If so, > > can you send me the ticket? > > > On Aug 23, 8:04 am, Yannick wrote: > > > > Even the customization of the Login Form doesn't work using this : > > > > {{=loginform.custom.begin}} > > > > > > > > > Email: > > > {{=loginform.custom.widget.email}} > > > > > > > > > Password: > > > {{=loginform.custom.widget.password}} > > > > > > > > > {{=loginform.custom.submit}} > > > > > > > > > > > > {{=loginform.custom.end}} > > > > So basically this is how i customize the login page: > > > > > > > > > > > > > Email Address: > > > > > value="{{=loginform.latest.email}}" > > > > > > > > > Password: > > > > > > > > > > > > > > > > > > > > > > > > {{=loginform.hidden_fields()}} > > > > > > > Thanks for your help! > > > > Yannick P. > > > > On Aug 23, 8:44 am, Yannick wrote: > > > > > Thanks for the note Massimo, > > > > I tried it but no the validation is not going through... It's not > > > > working. > > > > > Thanks for your help and please let us know if you have any other > > > > idea. > > > > > Cheers, > > > > Yannick P. > > > > > On Aug 23, 6:54 am, mdipierro wrote: > > > > > > auch! I just realized password_two is implamented without a widget > > > > > therefore this syntax does not work. > > > > > Until this gets firxed this you can do: > > > > > > > {{=regform.custom.begin}} > > > > > > {{=regform.custom.widget.first_name}} > > > > > {{=regform.custom.widget.last_name}} > > > > > {{=regform.custom.widget.email}} > > > > > {{=regform.custom.widget.password}} > > > > > > > > > > {{if regform.errors.password_two:}} > > > > > {{=regform.errors.password_two}}{{pass}} > > > > > {{=regform.custom.end}} > > > > > > Let us know if it works or not. > > > > > > Massimo > > > > > > On Aug 22, 10:31 pm, Yannick wrote: > > > > > > > Hello mate, > > > > > > quick question... I'm trying to customize the Registration form > > > > > > using > > > > > > Auth. > > > > > > I was wondering about the Password_two field ??? > > > > > > here is what I'm doing but not working: > > > > > > > > > > > > > > {{=regform.custom.begin}} > > > > > > {{=regform.custom.widget.first_name}} > > > > > > {{=regform.custom.widget.last_name}} > > > > > > {{=regform.custom.widget.email}} > > > > > > {{=regform.custom.widget.password}} > > > > > > {{=regform.custom.widget.password_two}} ### <--- here is my > > > > > > problem ??? what to i have to put here? > > > > > > {{=regform.custom.submit}} > > > > > > {{=regform.custom.end}} > > > > > > > ## > > > > > > > with this " {{=regform.custom.widget.password_two}}" the textfield > > > > > > doesn't show... What do I have to put there ? > > > > > > > Can anyone already had the same issue ? > > > > > > > Thanks for your help --~--~-~--~~~---~--~~ 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:29166] Re: Help query
Thanks, Mladen, that worked, I think I tried that earlier but gave me an error. On Aug 22, 8:20 pm, Mladen Milankovic wrote: > Hi. > > When you use multiple tables in a query, it return DALStorage object in > DALStorage object for each table you requested. Simpler every row object is a > dict which contains dict object for each table. > > try: > {{for review in reviews:}} > {{=review.reviews.headline}}: {{=review.users.username}} > {{pass}} > > regards > mmlado > > On Saturday 22 August 2009 12:09:18 tititi wrote: > > > > > Hi, I'm testing a similiar join query but not getting success in > > extracting the dictionary > > > r = db.reviews > > u = db.users > > query = ((db.reviews.id==request.args[0]) & (db.users.id==1)) > > left= (r.on(u.id==r.user_id)) > > reviews=db(query).select > > (r.headline,r.article,u.username,left=left, orderby=r.date_added) > > return(reviews=reviews) > > > On the view.html > > > {{for review in reviews:}} > > {{=review.headline}}: {{=review.username}} > > {{pass}} > > > I'm getting this error: KeyError: 'headline' > > > Am I missing something? --~--~-~--~~~---~--~~ 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:29165] When does form.accepts fail?
I have a strange behavior going on. I have a form that adds a wiki page, which works all the time -- except for this one page. It seems to fail the form.accepts point when I add a certain content page to the wiki. I don't know why the content would matter unless I'm tripping over a size limitation. Here is the controller: def add(): pageName=request.args[0] source=session.source rendered=render_html(source) response.view='default/edit.html' form=FORM( TEXTAREA(_name="source", _id='src', _rows="18",_cols="80", value=source), BR(), INPUT(_name='show',_type='submit',_value='Show formatting'), INPUT(_name='save',_type='submit',_value='Save page')) if form.accepts(request.vars,session,keepvalues=True): if request.vars.show: session.source=request.vars.source rendered=render_html(request.vars.source) elif request.vars.save: pgid=db.page.insert(name=pageName,ns=None,status=0) page=db.page[pgid] srcid=db.source.insert(page_uuid=page.uuid, content=request.vars.source) page.update_record(source_uuid=db.source[srcid].uuid) db.rendered.insert(page_uuid=page.uuid, content=render_html (request.vars.source)) response.flash='Wiki page accepted' redirect(URL(r=request,f='page',args=request.args)) else: response.flash='Form not accepted' return dict (wikiName=pageName,source=source,rendered=rendered,form=form) Coming in to this controller, the edited text has already been set in the session variable session.source. The page name is passed in request.args[0]. This form has two buttons, one causes the text to be processed by the reStructuredText module and displayed on the page, the otherr commits the change to the database and redirects back to the normal page view. When the content is this certain page (the reStructuredText cheatsheet at http://docutils.sourceforge.net/docs/user/rst/cheatsheet.txt) hitting the "save" button has no effect. The database never gets the transaction. If I modify the text and hit the "show" button my changes are immediately reverted (keepvalues=True). I can see from "print" statements that the controller is being executed when I press either button, but never reaches inside the "form.accepts" clause. (But I never get the response.flash message in the else clause either.) It almost acts like I have a global "try:except:" block somewhere but i don't see it. Any ideas? --~--~-~--~~~---~--~~ 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:29167] Re: Questions for large deployment
Intrigued by the recommendation to put code in modules instead of models if possible. At present I have db.define_table .. method calls in a model file. The database structure will stay the same between releases, so it does not feel optimal at present to have such definitions run on every page request. Same for the auth and mail objects in my model file, these are created each page request at present. Would it be possible to define db, auth and mail just the once at a module level and then refer to these shared objects between page requests? If per-request copies are required, would a .copy operation on a template mail/auth/db object run faster than just defining these in the model? I am going to have a play with this. Very impressed with web2py so far, it is great how code changes I make are picked up on the fly by default. But going for the nth degree of performance (just for the hell of it) I'm interested to see if it is possible to restrict things like running db.define_tables to a startup task or manual admin operation instead of on each page request, and in general pull logic out of the models for anything that is static or changes infrequently. If anyone else has experience with puting their models on a diet and shifting code to modules, would be interested to hear. Cheers. On Jul 22, 9:03 am, mdipierro wrote: > This is a complex issues that spans different topics: speed, > efficiency, scalability. > > I am not aware of any major bottle neck in web2py, execpt of the > database (not the DAL , the actual database) so it is efficiently. > There are many little tricks you can use to speed applications more: > - use connection pooling > - run your app bytecode compiled (press the button) > - move as much code as you can modules instead of models. > - discard sessions unless you they have modified > - store sessions in a memory mapped file > > How fast is it (with or without optimizations) depends on the > architecture. Is there a machine that can give you 1000 request/ > seconds. I do know. It is possible. On my virtual machine I get about > 100. > > There are some things that definitively will NOT help: > - a multicore machine. because the python interpreter cannot use > multiple cores efficiently > - a key/value database. This helps with scalability (i.e. run lots of > concurrent servers) but not necessarily speeds up a single server. I > will actually argue most of the map/reduce DB out there are slower > then postresql. > > Massimo > > On Jul 21, 8:40 pm, Alex Fanjul wrote: > > > Hello Massimo (all) this days I'm reading about horizontal scale > > architectures, key/value and graphs db's, etc. and the awakening in > > cloud computing enviroment > > In the last reading, I saw "Redit" benchmark of about 50 to 100 > > thousands req/sec with standard linux box. > > > I know those values are due to DB architecture of key/value (and they > > are really incredible), but: > > -what thing is really limiting 1000 req/sec in web2py? > > cherrypy/apache? mysql/postgres? wscgi/fastcgi? web2pyframework? python? > > -what do you think would the upper limit (req/sec) be in the better > > production enviroment case (great linux server/s, apache/cherokee?, best > > connection) > > -As a matter of curiosity, have you ever though in implementing the > > API for any of such databases? Redit? Tokyo? couchDB? > > > regards, > > alex f > > > P.S as always i'm sorry for my poor english > > > El 21/07/2009 15:52, mdipierro escribió: > > > > - Are there any large web2py installations that I can quote as an > > > example > > > > Not that I know and handle>1000 requests/second. > > > > - How are the issues of caching (say rendered pages) handled? I have > > > done a few Drupal sites and can see theperformanceeffects of caching > > > very clearly. IIRC only Django has caching in the python world? > > > > If you use multiple installations behind a load balancer I suggest you > > > use the "pound" load balancer to keep sessions sticky. In that case > > > the different processes do not need to share any data. > > > > - Has anyone done any work with web2py in a cluster (similar to a > > > Tomcat cluster behind mod_jk)? (multiple machines running web2py, the > > > session data sync'd etc. I can put the session info in a shared FS > > > though) > > > > If you need sessions and you need sessions synced, I suggest you share > > > the sessions folder. > > > > Massimo > > > > On Jul 21, 12:20 am, Bottiger wrote: > > > >> If it is truly not computationally intensive, and does not even use a > > >> database, it should not be a problem. > > > >> I have benchmarked Web2Py on the static welcome page to 700 requests/ > > >> second with a concurrency level of 50. > > > >> To increase the level of concurrency (if you have additional CPU > > >> cores), you should increase the number of Web2Py processes. > > > >> "~ 8000 users, and atleast 1000-2000 simultaneous users." > > > >> This is not really a large installation if it doesn't us
[web2py:29168] Re: Questions for large deployment
On Sun, Aug 23, 2009 at 1:55 PM, what_ho wrote: > > Intrigued by the recommendation to put code in modules instead of > models if possible. > > At present I have db.define_table .. method calls in a model file. The > database structure will stay the same between releases, so it does not > feel optimal at present to have such definitions run on every page > request. Same for the auth and mail objects in my model file, these > are created each page request at present. This defines the structure of the interface to the tables in question (it does not define the tables); If you will have rare or no access to the database, or perhaps many tables, of which you usually only access a very small percentage, then you could put this in modules and import only the tables you need to reference (e.g. read, write, create a query, login, add a user, add ... etc., etc.). If you will have ONLY ONE application running in your web installation, then your other alternative is to put your data table definitions file in gluon, and import it from main.py. This way, it will be defined upon server startup and be available to all request threads. In fact, you could do this kind of "quick hack" to compare performance. I think in most cases, the performance difference will not be significant, but I look forward to what you find. - Yarko > > > Would it be possible to define db, auth and mail just the once at a > module level and then refer to these shared objects between page > requests? If per-request copies are required, would a .copy operation > on a template mail/auth/db object run faster than just defining these > in the model? > > I am going to have a play with this. Very impressed with web2py so > far, it is great how code changes I make are picked up on the fly by > default. But going for the nth degree of performance (just for the > hell of it) I'm interested to see if it is possible to restrict things > like running db.define_tables to a startup task or manual admin > operation instead of on each page request, and in general pull logic > out of the models for anything that is static or changes infrequently. > > If anyone else has experience with puting their models on a diet and > shifting code to modules, would be interested to hear. Cheers. > > On Jul 22, 9:03 am, mdipierro wrote: > > This is a complex issues that spans different topics: speed, > > efficiency, scalability. > > > > I am not aware of any major bottle neck in web2py, execpt of the > > database (not the DAL , the actual database) so it is efficiently. > > There are many little tricks you can use to speed applications more: > > - use connection pooling > > - run your app bytecode compiled (press the button) > > - move as much code as you can modules instead of models. > > - discard sessions unless you they have modified > > - store sessions in a memory mapped file > > > > How fast is it (with or without optimizations) depends on the > > architecture. Is there a machine that can give you 1000 request/ > > seconds. I do know. It is possible. On my virtual machine I get about > > 100. > > > > There are some things that definitively will NOT help: > > - a multicore machine. because the python interpreter cannot use > > multiple cores efficiently > > - a key/value database. This helps with scalability (i.e. run lots of > > concurrent servers) but not necessarily speeds up a single server. I > > will actually argue most of the map/reduce DB out there are slower > > then postresql. > > > > Massimo > > > > On Jul 21, 8:40 pm, Alex Fanjul wrote: > > > > > Hello Massimo (all) this days I'm reading about horizontal scale > > > architectures, key/value and graphs db's, etc. and the awakening in > > > cloud computing enviroment > > > In the last reading, I saw "Redit" benchmark of about 50 to 100 > > > thousands req/sec with standard linux box. > > > > > I know those values are due to DB architecture of key/value (and they > > > are really incredible), but: > > > -what thing is really limiting 1000 req/sec in web2py? > > > cherrypy/apache? mysql/postgres? wscgi/fastcgi? web2pyframework? > python? > > > -what do you think would the upper limit (req/sec) be in the better > > > production enviroment case (great linux server/s, apache/cherokee?, > best > > > connection) > > > -As a matter of curiosity, have you ever though in implementing the > > > API for any of such databases? Redit? Tokyo? couchDB? > > > > > regards, > > > alex f > > > > > P.S as always i'm sorry for my poor english > > > > > El 21/07/2009 15:52, mdipierro escribió: > > > > > > - Are there any large web2py installations that I can quote as an > > > > example > > > > > > Not that I know and handle>1000 requests/second. > > > > > > - How are the issues of caching (say rendered pages) handled? I have > > > > done a few Drupal sites and can see theperformanceeffects of caching > > > > very clearly. IIRC only Django has caching in the python world? > > > > > > If you use multiple installatio
[web2py:29169] Re: When does form.accepts fail?
Are you sure accept is failing and not insert? 'text' fields in MySQL have a size limit. Do you use MySQL? On Aug 23, 1:33 pm, Joe Barnhart wrote: > I have a strange behavior going on. I have a form that adds a wiki > page, which works all the time -- except for this one page. It seems > to fail the form.accepts point when I add a certain content page to > the wiki. I don't know why the content would matter unless I'm > tripping over a size limitation. Here is the controller: > > def add(): > pageName=request.args[0] > source=session.source > rendered=render_html(source) > response.view='default/edit.html' > form=FORM( > TEXTAREA(_name="source", _id='src', _rows="18",_cols="80", > value=source), BR(), > INPUT(_name='show',_type='submit',_value='Show formatting'), > INPUT(_name='save',_type='submit',_value='Save page')) > if form.accepts(request.vars,session,keepvalues=True): > if request.vars.show: > session.source=request.vars.source > rendered=render_html(request.vars.source) > elif request.vars.save: > pgid=db.page.insert(name=pageName,ns=None,status=0) > page=db.page[pgid] > srcid=db.source.insert(page_uuid=page.uuid, > content=request.vars.source) > page.update_record(source_uuid=db.source[srcid].uuid) > db.rendered.insert(page_uuid=page.uuid, content=render_html > (request.vars.source)) > response.flash='Wiki page accepted' > redirect(URL(r=request,f='page',args=request.args)) > else: > response.flash='Form not accepted' > return dict > (wikiName=pageName,source=source,rendered=rendered,form=form) > > Coming in to this controller, the edited text has already been set in > the session variable session.source. The page name is passed in > request.args[0]. This form has two buttons, one causes the text to be > processed by the reStructuredText module and displayed on the page, > the otherr commits the change to the database and redirects back to > the normal page view. > > When the content is this certain page (the reStructuredText cheatsheet > athttp://docutils.sourceforge.net/docs/user/rst/cheatsheet.txt) > hitting the "save" button has no effect. The database never gets the > transaction. If I modify the text and hit the "show" button my > changes are immediately reverted (keepvalues=True). > > I can see from "print" statements that the controller is being > executed when I press either button, but never reaches inside the > "form.accepts" clause. (But I never get the response.flash message in > the else clause either.) It almost acts like I have a global > "try:except:" block somewhere but i don't see it. > > Any ideas? --~--~-~--~~~---~--~~ 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:29171] Re: Troubles fwith SQLFORM returned from ajax call
I haven't been able to find anything on google about submitting forms that have been brought it by ajax. I did notice deep in mailing list archives a mention about jDivs, which may help me with refreshing just a portion of the page. Has anyone used Jdivs before? The mention of it was so old and there's no documentation of it other than in the post itself. Is there any way to refresh a portion of the page without using jdivs? On Aug 22, 11:28 am, Alastair Medford wrote: > Wel, I figured out how to make the calendar widget work on the form at > least. I re-called the web2py_init jquery function in the call back of > the ajax function I was using. Still no luck making the actual form > submission work though. > > On Aug 22, 10:33 am, Alastair Medford > wrote: > > > No change. Like I said before, everything works as it should when > > calling the controller function directly. It's when it's brought into > > another page via ajax that neither the jquery nor the form submission > > work. Has anyone else brought in anSQLFORMvia ajax and had it work? > > > On Aug 20, 12:37 pm, DenesL wrote: > > > > In layout.html the {{include 'web2py_ajax.html'}} (which has the > > > calendar and other JS script links) happens inside the head section on > > > the page, try doing something similar in yours. --~--~-~--~~~---~--~~ 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:29170] Re: Routes in GAE
I cannot reproduce this error. Perhaps there is some strange character in there. Try delete the file and rewrite it. If it still does not work, email me your routes.py On Aug 23, 6:35 am, Prabhu wrote: > Massimo, Thanks for the reply. > > Even after adding the commas, I get the same error. > > If I say, > > routes_out = (('/ccweb/default/$a', '/cc/$a'),) > routes_in = (('.*:/cc/$a','/ccweb/default/$a'),) > > It throws an exception. > > If I say, > > routes_out = (('/ccweb/default/$a', '/cc/$a'),) > or > routes_in = (('.*:/cc/$a','/ccweb/default/$a'),) > > It works as expected. > > The weird part is, > > routes_out = (('/ccweb/default/$a', '/cc/$a'),) > #routes_in = (('.*:/cc/$a','/ccweb/default/$a'),) > > throws an exception. > > The exception, > > no file locking > no sqlite3 or pysqlite2.dbapi2 driver > no MySQLdb driver > no psycopg2 driver > no cx_Oracle driver > no MSSQL/DB2 driver > no kinterbasdb driver > no informixdb driver > no zxJDBC driver > unable to import dbhash > Your routes.py has a syntax error. Please fix it before you restart > web2py > : invalid syntax (, line 1) > Traceback (most recent call last): > File "/base/data/home/apps/myapp/1.335820055527865939/ > gaehandler.py", line 26, in > import gluon.main > File "/base/data/home/apps/myapp/1.335820055527865939/gluon/ > main.py", line 39, in > from globals import Request, Response, Session > File "/base/data/home/apps/myapp/1.335820055527865939/gluon/ > globals.py", line 18, in > from compileapp import run_view_in > File "/base/data/home/apps/myapp/1.335820055527865939/gluon/ > compileapp.py", line 43, in > from rewrite import error_message_custom > File "/base/data/home/apps/myapp/1.335820055527865939/gluon/ > rewrite.py", line 31, in > raise e > : invalid syntax (, line 1) > > Any help is appreciated. > > Thanks. > > Prabhu > > On Aug 23, 6:46 pm, mdipierro wrote: > > > routes_in = (('/cc/$a','/ccweb/default/$a'),) > > routes_out = (('/ccweb/default/$a', '/cc/$a'),) > > > the '.*:' is not necessary. The key missing ingredient is the ',' > > > Massimo > > > On Aug 22, 1:54 am, Prabhu wrote: > > > > Thanks Victor and Yarko. > > > > It works if I specify routes_in = (('.*:/cc/$a','/ccweb/default/$a')) > > > or > > > routes_out = (('/ccweb/default/$a', '/cc/$a')) > > > > If I say > > > > routes_in = (('.*:/cc/$a','/ccweb/default/$a')) > > > routes_out = (('/ccweb/default/$a', '/cc/$a')) > > > > in routes.py, I still get the syntax error. Why am I not able to > > > specify both? This looks like a very dumb mistake I am making. Any > > > ideas? > > > > Prabhu > > > > On Aug 22, 9:02 am, Yarko Tymciurak wrote: > > > > > you might find this discussiont helpful: > > > > >http://groups.google.com/group/web2py/msg/abb56704cda162a0 > > > > > On Fri, Aug 21, 2009 at 5:17 PM, Victor > > > > wrote: > > > > > > your line should be routes_in = (('.*:/testme','/myapp/default/ > > > > > index')) dont forget to add an $ at the end if all you want is / > > > > > testme > > > > > > On Aug 21, 10:41 pm, Prabhu wrote: > > > > > > Hi, > > > > > > > Newbie to web2py here. My routes.py reads, > > > > > > > #!/usr/bin/env python > > > > > > # -*- coding: utf-8 -*- > > > > > > > routes_in = (('/testme','/myapp/default/index'),) > > > > > > > routes_out = (('/myapp/default/index', '/test'),) > > > > > > >http://127.0.0.1:8000/testmeworks. When I upload web2py to GAE, I get > > > > > > the following error > > > > > > > Your routes.py has a syntax error. Please fix it before you restart > > > > > > web2py > > > > > > : invalid syntax (, line 3) > > > > > > Traceback (most recent call last): > > > > > > File "/base/data/home/apps/myapp/1.335783148456469963/ > > > > > > gaehandler.py", line 26, in > > > > > > import gluon.main > > > > > > File "/base/data/home/apps/myapp/1.335783148456469963/gluon/ > > > > > > main.py", line 39, in > > > > > > from globals import Request, Response, Session > > > > > > File "/base/data/home/apps/myapp/1.335783148456469963/gluon/ > > > > > > globals.py", line 18, in > > > > > > from compileapp import run_view_in > > > > > > File "/base/data/home/apps/myapp/1.335783148456469963/gluon/ > > > > > > compileapp.py", line 43, in > > > > > > from rewrite import error_message_custom > > > > > > File "/base/data/home/apps/myapp/1.335783148456469963/gluon/ > > > > > > rewrite.py", line 31, in > > > > > > raise e > > > > > > : invalid syntax (, line 3) > > > > > > > This happens when there is a routes.py file (even if all the lines > > > > > > are > > > > > > commented). > > > > > > > Is this the correct way to do URL Rewrite? The Reddish application > > > > > > (web2py.appspot.com) does this correctly. How? The source code (of > > > > > > Reddish) has the application only. > > > > > > > Can someone please clarify this? > > > > > > > Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups
[web2py:29172] Re: Troubles fwith SQLFORM returned from ajax call
this might help: http://www.sitepoint.com/article/ajax-jquery/ On Sun, Aug 23, 2009 at 5:06 PM, Alastair Medford wrote: > > I haven't been able to find anything on google about submitting forms > that have been brought it by ajax. I did notice deep in mailing list > archives a mention about jDivs, which may help me with refreshing just > a portion of the page. Has anyone used Jdivs before? The mention of it > was so old and there's no documentation of it other than in the post > itself. Is there any way to refresh a portion of the page without > using jdivs? > > On Aug 22, 11:28 am, Alastair Medford > wrote: > > Wel, I figured out how to make the calendar widget work on the form at > > least. I re-called the web2py_init jquery function in the call back of > > the ajax function I was using. Still no luck making the actual form > > submission work though. > > > > On Aug 22, 10:33 am, Alastair Medford > > wrote: > > > > > No change. Like I said before, everything works as it should when > > > calling the controller function directly. It's when it's brought into > > > another page via ajax that neither the jquery nor the form submission > > > work. Has anyone else brought in anSQLFORMvia ajax and had it work? > > > > > On Aug 20, 12:37 pm, DenesL wrote: > > > > > > In layout.html the {{include 'web2py_ajax.html'}} (which has the > > > > calendar and other JS script links) happens inside the head section > on > > > > the page, try doing something similar in yours. > > > --~--~-~--~~~---~--~~ 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:29173] Re: Password 2 field - Using Custom on Registration.
I found the problem and it is a major bug. If one does form=SQLFORM(...) FORM.accepts(form,...) form.custom.end will not contain the hidden fields (_formkey and _formname) and custom form will not work. This is used in tools hence you cannot custom forms with current Auth. In my opinion this cannot be fixed. Hence I suggest the solution already posted in trunk lp1181/gc1086: 1) deprecate FORM.accepts(form,...) 2) introduce a new syntax form.accepts(...dbio=False) instead. Notice that this is backward compatible since the existing code will work as it did or didn't. If you want to process a SQLFORM with dbio=False you will be suggested to use the new syntax and if you do, there will be no problem with custom forms. The new way is also more powerful because it will deal with file renaming and uploads even without database IO (SQLFORM.factory for example). Any objection? Thanks to Yannick for discovering this problem. Massimo On Aug 23, 12:25 pm, Yannick wrote: > I just sent the both Html page by email > > > > > > and what do you mean by "does not work" do you get a ticket? If so, > > > can you send me the ticket? > > No ticket is generate, it just don't generate any feedback. When I > fill up the form and click on "Submit" nothing happen from the user > point of view and from the back-end I put a break point on the > register in Tools.py and the form validation is not going through. > > Thanks for your help. > > Cheers, > Yannick P. > > On Aug 23, 11:08 am, mdipierro wrote: > > > same for login.. > > > On Aug 23, 10:08 am, mdipierro wrote: > > > > Please email me personally. Can you show me the generated html when > > > you do: > > > > {{=regform.custom.begin}} > > > {{=regform.custom.widget.first_name}} > > > {{=regform.custom.widget.last_name}} > > > {{=regform.custom.widget.email}} > > > {{=regform.custom.widget.password}} > > > {{=regform.custom.widget.password_two}} > > > {{=regform.custom.end}} > > > > and what do you mean by "does not work" do you get a ticket? If so, > > > can you send me the ticket? > > > > On Aug 23, 8:04 am, Yannick wrote: > > > > > Even the customization of the Login Form doesn't work using this : > > > > > {{=loginform.custom.begin}} > > > > > > > > > > > > Email: > > > > {{=loginform.custom.widget.email}} > > > > > > > > > > > > Password: > > > > {{=loginform.custom.widget.password}} > > > > > > > > > > > > {{=loginform.custom.submit}} > > > > > > > > > > > > > > > > {{=loginform.custom.end}} > > > > > So basically this is how i customize the login page: > > > > > > > > > > > > > > > > > Email Address: > > > > > > > value="{{=loginform.latest.email}}" > > > > > > > > > > > > Password: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > {{=loginform.hidden_fields()}} > > > > > > > > > Thanks for your help! > > > > > Yannick P. > > > > > On Aug 23, 8:44 am, Yannick wrote: > > > > > > Thanks for the note Massimo, > > > > > I tried it but no the validation is not going through... It's not > > > > > working. > > > > > > Thanks for your help and please let us know if you have any other > > > > > idea. > > > > > > Cheers, > > > > > Yannick P. > > > > > > On Aug 23, 6:54 am, mdipierro wrote: > > > > > > > auch! I just realized password_two is implamented without a widget > > > > > > therefore this syntax does not work. > > > > > > Until this gets firxed this you can do: > > > > > > > > {{=regform.custom.begin}} > > > > > > > {{=regform.custom.widget.first_name}} > > > > > > {{=regform.custom.widget.last_name}} > > > > > > {{=regform.custom.widget.email}} > > > > > > {{=regform.custom.widget.password}} > > > > > > > > > > > > {{if regform.errors.password_two:}} > > > > > > {{=regform.errors.password_two}}{{pass}} > > > > > > {{=regform.custom.end}} > > > > > > > Let us know if it works or not. > > > > > > > Massimo > > > > > > > On Aug 22, 10:31 pm, Yannick wrote: > > > > > > > > Hello mate, > > > > > > > quick question... I'm trying to customize the Registration form > > > > > > > using > > > > > > > Auth. > > > > > > > I was wondering about the Password_two field ??? > > > > > > > here is what I'm doing but not working: > > > > > > > > > > > > > > > > {{=regform.custom.begin}} > > > > > > > {{=regform.custom.widget.first_name}} > > > > > > > {{=regform.custom.widget.last_name}} > > > > > > > {{=regform.custom.widget.email}} > > > > > > > {{=regform.custom.widget.password}} > > > > > > > {{=regform.custom.widget.password_two}} ### <--- here is my > > > > > > > problem ??? what to i have to put here? > > > > > > > {{=regform.custom.submit}} > > > > > > > {{=r
[web2py:29174] Is HMAC bound to a particular machine?
I have a strange situation and I know virtually nothing about cryptography. I am passing a key to my auth password requires statement after the recent discussion on security strength like so: if "login" in request.args: t.password.requires = [CRYPT(key='mykey')] else: t.password.requires = [IS_STRONG(upper=1,number=1,special=1),CRYPT (key='mykey')] Here's the weird part: I have a dev server and a production server that are both running web2py and pointed to the same MySQL database. If I reset a user password from the dev server (retrieve_password), I can only log in from the dev server after that. The same is true for the production machine. Resetting from the production server reverses the situation. I have stepped through the code and verified that at line 779 in tools.py user[passfield] is indeed different than form.vars.get (passfield, '') (both look like valid password hashes) so user = None, and thus login fails. All I can figure is that the encryption is bound to the machine that generated the password hash. I'm using the same version of Python and web2py. Can someone verify or explain? As always, thanks for your help. --~--~-~--~~~---~--~~ 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:29175] Re: Troubles fwith SQLFORM returned from ajax call
So it's looking like using an SQLFORM in the regular fashion just isn't going to cut for what I would like to do. If I override the normal submission method and use jquery + ajax to submit the form, I have full control of what the page does after submission. The problem then is that I would loose validation, auto insertion, and any point of using SQLFORM in the first place. Any suggestions? This still doesn't explain my main problem of why the form only refreshes the page, but it's given me some ideas. On Aug 23, 4:12 pm, Yarko Tymciurak wrote: > this might help:http://www.sitepoint.com/article/ajax-jquery/ > > On Sun, Aug 23, 2009 at 5:06 PM, Alastair Medford > > > > wrote: > > > I haven't been able to find anything on google about submitting forms > > that have been brought it by ajax. I did notice deep in mailing list > > archives a mention about jDivs, which may help me with refreshing just > > a portion of the page. Has anyone used Jdivs before? The mention of it > > was so old and there's no documentation of it other than in the post > > itself. Is there any way to refresh a portion of the page without > > using jdivs? > > > On Aug 22, 11:28 am, Alastair Medford > > wrote: > > > Wel, I figured out how to make the calendar widget work on the form at > > > least. I re-called the web2py_init jquery function in the call back of > > > the ajax function I was using. Still no luck making the actual form > > > submission work though. > > > > On Aug 22, 10:33 am, Alastair Medford > > > wrote: > > > > > No change. Like I said before, everything works as it should when > > > > calling the controller function directly. It's when it's brought into > > > > another page via ajax that neither the jquery nor the form submission > > > > work. Has anyone else brought in anSQLFORMvia ajax and had it work? > > > > > On Aug 20, 12:37 pm, DenesL wrote: > > > > > > In layout.html the {{include 'web2py_ajax.html'}} (which has the > > > > > calendar and other JS script links) happens inside the head section > > on > > > > > the page, try doing something similar in yours. --~--~-~--~~~---~--~~ 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:29176] Re: Is HMAC bound to a particular machine?
If this is the case it is a bug with the hmac implementation in Python. I will double check. Massimo On Aug 23, 5:57 pm, "mr.freeze" wrote: > I have a strange situation and I know virtually nothing about > cryptography. I am passing a key to my auth password requires > statement after the recent discussion on security strength like so: > > if "login" in request.args: > t.password.requires = [CRYPT(key='mykey')] > else: > t.password.requires = [IS_STRONG(upper=1,number=1,special=1),CRYPT > (key='mykey')] > > Here's the weird part: I have a dev server and a production server > that are both running web2py and pointed to the same MySQL database. > If I reset a user password from the dev server (retrieve_password), I > can only log in from the dev server after that. The same is true for > the production machine. Resetting from the production server reverses > the situation. > > I have stepped through the code and verified that at line 779 in > tools.py user[passfield] is indeed different than form.vars.get > (passfield, '') (both look like valid password hashes) so user = None, > and thus login fails. > > All I can figure is that the encryption is bound to the machine that > generated the password hash. I'm using the same version of Python and > web2py. Can someone verify or explain? > > As always, thanks for your help. --~--~-~--~~~---~--~~ 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:29177] Re: Is HMAC bound to a particular machine?
I cannot reproduce any machine dependence. I tried: hmac.new('mykey','something',hashlib.sha512).hexdigest() How long is your password field. Is it 128 bytes? Massimo On Aug 23, 5:57 pm, "mr.freeze" wrote: > I have a strange situation and I know virtually nothing about > cryptography. I am passing a key to my auth password requires > statement after the recent discussion on security strength like so: > > if "login" in request.args: > t.password.requires = [CRYPT(key='mykey')] > else: > t.password.requires = [IS_STRONG(upper=1,number=1,special=1),CRYPT > (key='mykey')] > > Here's the weird part: I have a dev server and a production server > that are both running web2py and pointed to the same MySQL database. > If I reset a user password from the dev server (retrieve_password), I > can only log in from the dev server after that. The same is true for > the production machine. Resetting from the production server reverses > the situation. > > I have stepped through the code and verified that at line 779 in > tools.py user[passfield] is indeed different than form.vars.get > (passfield, '') (both look like valid password hashes) so user = None, > and thus login fails. > > All I can figure is that the encryption is bound to the machine that > generated the password hash. I'm using the same version of Python and > web2py. Can someone verify or explain? > > As always, thanks for your help. --~--~-~--~~~---~--~~ 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:29178] Re: Left Join Failures
hi Massimo, you mentioned that the initial query was invalid (http:// code.google.com/p/web2py/issues/detail?id=52). Could you clarify what was invalid and the proper way to do multiple joins? Richard On Aug 17, 4:37 am, howesc wrote: > Thanks for the tip! A little tweaking to your suggestion makes it > work: > > c=db.concert > cp=db.concert_purchases > a=db.artist > v=db.venue > af=db.audiofile > test = db(cp.auth_user==3)(c.id==cp.concert)(cp.expires>'2009-08-08 > 09:46:23'). > select(c.name, c.id, cp.date, a.name, v.name, c.date, > af.file,left=(c.on((c.venue==v.id) & (v.name != None)), > cp.on((cp.concert==c.id) & (cp.concert != > None)), > a.on((a.id==c.artist) & (a.name != None)), > af.on(af.concert==c.id)), orderby=~cp.date) > > I put in where clause restrictions to make some of the left joins not > really left joins, I probably don't need to do that for this > particular query. > > thanks again for the suggestion to help me re-craft the query! > > christian > > On Aug 14, 12:38 am, mdipierro wrote: > > > Are you sure this does not work? > > > c=db.concert > > cp=db.concert_purchases > > a=db.artist > > db(cp.auth_user==3)(c.id==cp.concert)(cp.expires>'2009-08-08 > > 09:46:23').select(c.name, c.id, cp.date, a.name, v.name, c.date, > > af.file,left=(c.on(c.value==v.id),cp.on(cp.concert==c.id),a.on > > (a.id==c.artist)), orderby=~cp.date) > > > Massimo > > > On Aug 12, 9:09 pm, Richard wrote: > > > > hi Christian, > > > I also just got this error message when testing a migration from > > > sqlite to postgres. Thanks for the diagnosis of the problem. > > > Have you found a work around yet using the DAL? > > > Richard > > > > On Aug 10, 4:56 pm, howesc wrote: > > > > > This is in Postgres. > > > > > I did a little digging, and apparently mixing the JOIN syntax is a > > > > problem. So if i re-write thequeryin this fashion it works: > > > > > SELECT c.name, c.id, cp.date, a.name, v.name, c.date, af.file > > > > FROM venue v > > > > JOIN concert c ON c.venue=v.id > > > > JOIN concert_purchases cp ON cp.concert=c.id > > > > JOIN artist a ON a.id=c.artist > > > > LEFT JOIN audiofile af ON af.concert=c.id > > > > WHERE cp.auth_user=3 > > > > AND c.id=cp.concert > > > > AND cp.expires>'2009-08-08 09:46:23' > > > > ORDER BY cp.date DESC; > > > > > some others have suggested that mixing the join syntax has operator > > > > precedence issues, and that Postgres follows the standard while other > > > > databases let you get away with the "incorrect" > > > > syntax:http://archives.postgresql.org/pgsql-general/2006-09/msg01046.phphttp.. > > > > > based on their analysis a standard compliant SQL parser will interpret > > > > the web2py generatedquerylike this: > > > > SELECT concert.name, concert.id, concert_purchases.date, artist.name, > > > > venue.name, concert.date, audiofile.file FROM venue, concert, > > > > concert_purchases, (artist LEFT JOIN audiofile ON > > > > audiofile.concert=concert.id) WHERE concert_purchases.auth_user=3 > > > > AND concert.id=concert_purchases.concert) AND > > > > concert_purchases.expires>'2009-08-08 09:46:23') AND > > > > artist.id=concert.artist) AND venue.id=concert.venue) ORDER BY > > > > concert_purchases.date DESC; > > > > > note the added parens around the last item in the from clause and the > > > > LEFT JOIN item - hence concert is not visible. if i re-write it > > > > knowing the operator precedence like this: > > > > > SELECT concert.name, concert.id, concert_purchases.date, artist.name, > > > > venue.name, concert.date, audiofile.file > > > > FROM venue, artist, > > > > concert_purchases, concert LEFT JOIN audiofile ON > > > > audiofile.concert=concert.id WHERE concert_purchases.auth_user=3 > > > > AND concert.id=concert_purchases.concert) AND > > > > concert_purchases.expires>'2009-08-08 09:46:23') AND > > > > artist.id=concert.artist) AND venue.id=concert.venue) ORDER BY > > > > concert_purchases.date DESC; > > > > > it also works...which explains to me why some of my left joins work > > > > and some don't - if i'm lucky and the lasttablein the from clause is > > > > what i am left joining on it works. > > > > > that being said, it looks like i'm the only one with that problem so i > > > > don't expect you to try and fix that right away. > > > > > thanks, > > > > > Christian > > > > > On Aug 8, 4:17 pm, mdipierro wrote: > > > > > > Is this sqlite? The generated SQL looks right to me. Do you see > > > > > anything wrong with it? > > > > > > On Aug 8, 11:48 am, howesc wrote: > > > > > > > Massimo, > > > > > > > I downloaded the latest released version today: Version 1.65.11 > > > > > > (2009-08-04 16:42:46), and it still fails. here is the generated > > > > > > SQL: > > > > > > > SELECT concert.name, concert.id, concert_purchases.date, > > > > > > artist.name, > > > > > > venue.name, concert.date, audiofile.file FROM venue, concert, > > > > > > concert_
[web2py:29181] Re: Is HMAC bound to a particular machine?
Yes, varchar(128). Here's the output of that command on both servers from the terminal: Production: >>> import hmac >>> import hashlib >>> d= hmac.new('mykey','mypass',hashlib.sha512) >>> d.hexdigest() '485c79d8330897e613847f64333a0ccebd705b1902c4c4872cb1b7cc9ad856eb00e70dd11474b39282699a453dead6d86d6f482992778bb9166d9c920f9fa694' Development: >>> import hmac >>> import hashlib >>> d = hmac.new('mykey','mypass',hashlib.sha512) >>> d.hexdigest() '46fb33cd6220b470d7fecb3dfb547fb2501517ca9695f8527895d1a4a1e515c0a05c8c1f15bd6f0439848717af00bdde902b50be454dd81878a9fce362b2e501' They're supposed to be the same, right? Or am I misunderstanding how this works. On Aug 23, 6:34 pm, mdipierro wrote: > I cannot reproduce any machine dependence. I tried: > > hmac.new('mykey','something',hashlib.sha512).hexdigest() > > How long is your password field. Is it 128 bytes? > > Massimo > > On Aug 23, 5:57 pm, "mr.freeze" wrote: > > > I have a strange situation and I know virtually nothing about > > cryptography. I am passing a key to my auth password requires > > statement after the recent discussion on security strength like so: > > > if "login" in request.args: > > t.password.requires = [CRYPT(key='mykey')] > > else: > > t.password.requires = [IS_STRONG(upper=1,number=1,special=1),CRYPT > > (key='mykey')] > > > Here's the weird part: I have a dev server and a production server > > that are both running web2py and pointed to the same MySQL database. > > If I reset a user password from the dev server (retrieve_password), I > > can only log in from the dev server after that. The same is true for > > the production machine. Resetting from the production server reverses > > the situation. > > > I have stepped through the code and verified that at line 779 in > > tools.py user[passfield] is indeed different than form.vars.get > > (passfield, '') (both look like valid password hashes) so user = None, > > and thus login fails. > > > All I can figure is that the encryption is bound to the machine that > > generated the password hash. I'm using the same version of Python and > > web2py. Can someone verify or explain? > > > As always, thanks for your help. --~--~-~--~~~---~--~~ 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:29180] Re: Routes in GAE
It works! I am using Windows XP. I converted the routes.py to UNIX format (notepad++) and it works. Thanks to everyone that replied. And of course, web2py rocks. On Aug 24, 6:04 am, mdipierro wrote: > I cannot reproduce this error. Perhaps there is some strange character > in there. Try delete the file and rewrite it. If it still does not > work, email me your routes.py > > On Aug 23, 6:35 am, Prabhu wrote: > > > Massimo, Thanks for the reply. > > > Even after adding the commas, I get the same error. > > > If I say, > > > routes_out = (('/ccweb/default/$a', '/cc/$a'),) > > routes_in = (('.*:/cc/$a','/ccweb/default/$a'),) > > > It throws an exception. > > > If I say, > > > routes_out = (('/ccweb/default/$a', '/cc/$a'),) > > or > > routes_in = (('.*:/cc/$a','/ccweb/default/$a'),) > > > It works as expected. > > > The weird part is, > > > routes_out = (('/ccweb/default/$a', '/cc/$a'),) > > #routes_in = (('.*:/cc/$a','/ccweb/default/$a'),) > > > throws an exception. > > > The exception, > > > no file locking > > no sqlite3 or pysqlite2.dbapi2 driver > > no MySQLdb driver > > no psycopg2 driver > > no cx_Oracle driver > > no MSSQL/DB2 driver > > no kinterbasdb driver > > no informixdb driver > > no zxJDBC driver > > unable to import dbhash > > Your routes.py has a syntax error. Please fix it before you restart > > web2py > > : invalid syntax (, line 1) > > Traceback (most recent call last): > > File "/base/data/home/apps/myapp/1.335820055527865939/ > > gaehandler.py", line 26, in > > import gluon.main > > File "/base/data/home/apps/myapp/1.335820055527865939/gluon/ > > main.py", line 39, in > > from globals import Request, Response, Session > > File "/base/data/home/apps/myapp/1.335820055527865939/gluon/ > > globals.py", line 18, in > > from compileapp import run_view_in > > File "/base/data/home/apps/myapp/1.335820055527865939/gluon/ > > compileapp.py", line 43, in > > from rewrite import error_message_custom > > File "/base/data/home/apps/myapp/1.335820055527865939/gluon/ > > rewrite.py", line 31, in > > raise e > > : invalid syntax (, line 1) > > > Any help is appreciated. > > > Thanks. > > > Prabhu > > > On Aug 23, 6:46 pm, mdipierro wrote: > > > > routes_in = (('/cc/$a','/ccweb/default/$a'),) > > > routes_out = (('/ccweb/default/$a', '/cc/$a'),) > > > > the '.*:' is not necessary. The key missing ingredient is the ',' > > > > Massimo > > > > On Aug 22, 1:54 am, Prabhu wrote: > > > > > Thanks Victor and Yarko. > > > > > It works if I specify routes_in = (('.*:/cc/$a','/ccweb/default/$a')) > > > > or > > > > routes_out = (('/ccweb/default/$a', '/cc/$a')) > > > > > If I say > > > > > routes_in = (('.*:/cc/$a','/ccweb/default/$a')) > > > > routes_out = (('/ccweb/default/$a', '/cc/$a')) > > > > > in routes.py, I still get the syntax error. Why am I not able to > > > > specify both? This looks like a very dumb mistake I am making. Any > > > > ideas? > > > > > Prabhu > > > > > On Aug 22, 9:02 am, Yarko Tymciurak wrote: > > > > > > you might find this discussiont helpful: > > > > > >http://groups.google.com/group/web2py/msg/abb56704cda162a0 > > > > > > On Fri, Aug 21, 2009 at 5:17 PM, Victor > > > > > wrote: > > > > > > > your line should be routes_in = (('.*:/testme','/myapp/default/ > > > > > > index')) dont forget to add an $ at the end if all you want is / > > > > > > testme > > > > > > > On Aug 21, 10:41 pm, Prabhu wrote: > > > > > > > Hi, > > > > > > > > Newbie to web2py here. My routes.py reads, > > > > > > > > #!/usr/bin/env python > > > > > > > # -*- coding: utf-8 -*- > > > > > > > > routes_in = (('/testme','/myapp/default/index'),) > > > > > > > > routes_out = (('/myapp/default/index', '/test'),) > > > > > > > >http://127.0.0.1:8000/testmeworks. When I upload web2py to GAE, I > > > > > > >get > > > > > > > the following error > > > > > > > > Your routes.py has a syntax error. Please fix it before you > > > > > > > restart > > > > > > > web2py > > > > > > > : invalid syntax (, line 3) > > > > > > > Traceback (most recent call last): > > > > > > > File "/base/data/home/apps/myapp/1.335783148456469963/ > > > > > > > gaehandler.py", line 26, in > > > > > > > import gluon.main > > > > > > > File "/base/data/home/apps/myapp/1.335783148456469963/gluon/ > > > > > > > main.py", line 39, in > > > > > > > from globals import Request, Response, Session > > > > > > > File "/base/data/home/apps/myapp/1.335783148456469963/gluon/ > > > > > > > globals.py", line 18, in > > > > > > > from compileapp import run_view_in > > > > > > > File "/base/data/home/apps/myapp/1.335783148456469963/gluon/ > > > > > > > compileapp.py", line 43, in > > > > > > > from rewrite import error_message_custom > > > > > > > File "/base/data/home/apps/myapp/1.335783148456469963/gluon/ > > > > > > > rewrite.py", line 31, in > > > > > > > raise e > > > > > > > : invalid syntax (, line 3) > > > > > > > > This happens when there is a routes.py file (even if all the
[web2py:29179] Re: upload filename inconsistency
I would like to upgrade my web2py when this is fixed, so is it worth creating an issue on Google Code to track it? Or has it already been fixed? Richard On Aug 20, 4:26 pm, Richard wrote: > great! > Apparently some old versions of IE include the full path. > > Richard > > On Aug 19, 5:39 pm, mdipierro wrote: > > > Yes, this may be a bug on windows. I will fix it. > > > On Aug 18, 9:04 pm, Richard wrote: > > > > hello, > > > > From an upload form should request.vars..filename contain > > > the original file basename, full path, or the raw string of whatever > > > was in content-disposition? > > > I had assumed it was the basename but from some error tickets found it > > > must be the raw string. > > > > Would it be worth parsing this variable into something consistent? > > > On my Linux box I am occasionally getting filenames like "C:\ > > > \Documents and Settings\\user\\Desktop\\file.txt", which can't be > > > parsed with os.path.basename(). > > > > Richard --~--~-~--~~~---~--~~ 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:29185] Re: Is HMAC bound to a particular machine?
Interesting...A third machine produces the same value as my development machine. It looks like Dreamhost has something whacky with their python install. Oh well, it's my problem now! Thanks for helping me track it down. On Aug 23, 6:59 pm, "mr.freeze" wrote: > Yes, varchar(128). Here's the output of that command on both servers > from the terminal: > > Production:>>> import hmac > >>> import hashlib > >>> d= hmac.new('mykey','mypass',hashlib.sha512) > >>> d.hexdigest() > > '485c79d8330897e613847f64333a0ccebd705b1902c4c4872cb1b7cc9ad856eb00e70dd11474b39282699a453dead6d86d6f482992778bb9166d9c920f9fa694' > > Development:>>> import hmac > >>> import hashlib > >>> d = hmac.new('mykey','mypass',hashlib.sha512) > >>> d.hexdigest() > > '46fb33cd6220b470d7fecb3dfb547fb2501517ca9695f8527895d1a4a1e515c0a05c8c1f15bd6f0439848717af00bdde902b50be454dd81878a9fce362b2e501' > > They're supposed to be the same, right? Or am I misunderstanding how > this works. > > On Aug 23, 6:34 pm, mdipierro wrote: > > > I cannot reproduce any machine dependence. I tried: > > > hmac.new('mykey','something',hashlib.sha512).hexdigest() > > > How long is your password field. Is it 128 bytes? > > > Massimo > > > On Aug 23, 5:57 pm, "mr.freeze" wrote: > > > > I have a strange situation and I know virtually nothing about > > > cryptography. I am passing a key to my auth password requires > > > statement after the recent discussion on security strength like so: > > > > if "login" in request.args: > > > t.password.requires = [CRYPT(key='mykey')] > > > else: > > > t.password.requires = [IS_STRONG(upper=1,number=1,special=1),CRYPT > > > (key='mykey')] > > > > Here's the weird part: I have a dev server and a production server > > > that are both running web2py and pointed to the same MySQL database. > > > If I reset a user password from the dev server (retrieve_password), I > > > can only log in from the dev server after that. The same is true for > > > the production machine. Resetting from the production server reverses > > > the situation. > > > > I have stepped through the code and verified that at line 779 in > > > tools.py user[passfield] is indeed different than form.vars.get > > > (passfield, '') (both look like valid password hashes) so user = None, > > > and thus login fails. > > > > All I can figure is that the encryption is bound to the machine that > > > generated the password hash. I'm using the same version of Python and > > > web2py. Can someone verify or explain? > > > > As always, thanks for your help. --~--~-~--~~~---~--~~ 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:29182] Re: Left Join Failures
howesc explained it in his posts: "that mixing the join syntax has operator precedence issues, and that Postgres follows the standard while other databases let you get away with the "incorrect" syntax: http://archives.postgresql.org/pgsql-general/2006-09/msg01046.php " Massimo On Aug 23, 6:47 pm, Richard wrote: > hi Massimo, > > you mentioned that the initial query was invalid (http:// > code.google.com/p/web2py/issues/detail?id=52). > Could you clarify what was invalid and the proper way to do multiple > joins? > > Richard > > On Aug 17, 4:37 am, howesc wrote: > > > Thanks for the tip! A little tweaking to your suggestion makes it > > work: > > > c=db.concert > > cp=db.concert_purchases > > a=db.artist > > v=db.venue > > af=db.audiofile > > test = db(cp.auth_user==3)(c.id==cp.concert)(cp.expires>'2009-08-08 > > 09:46:23'). > > select(c.name, c.id, cp.date, a.name, v.name, c.date, > > af.file,left=(c.on((c.venue==v.id) & (v.name != None)), > > cp.on((cp.concert==c.id) & (cp.concert != > > None)), > > a.on((a.id==c.artist) & (a.name != None)), > > af.on(af.concert==c.id)), orderby=~cp.date) > > > I put in where clause restrictions to make some of the left joins not > > really left joins, I probably don't need to do that for this > > particular query. > > > thanks again for the suggestion to help me re-craft the query! > > > christian > > > On Aug 14, 12:38 am, mdipierro wrote: > > > > Are you sure this does not work? > > > > c=db.concert > > > cp=db.concert_purchases > > > a=db.artist > > > db(cp.auth_user==3)(c.id==cp.concert)(cp.expires>'2009-08-08 > > > 09:46:23').select(c.name, c.id, cp.date, a.name, v.name, c.date, > > > af.file,left=(c.on(c.value==v.id),cp.on(cp.concert==c.id),a.on > > > (a.id==c.artist)), orderby=~cp.date) > > > > Massimo > > > > On Aug 12, 9:09 pm, Richard wrote: > > > > > hi Christian, > > > > I also just got this error message when testing a migration from > > > > sqlite to postgres. Thanks for the diagnosis of the problem. > > > > Have you found a work around yet using the DAL? > > > > Richard > > > > > On Aug 10, 4:56 pm, howesc wrote: > > > > > > This is in Postgres. > > > > > > I did a little digging, and apparently mixing the JOIN syntax is a > > > > > problem. So if i re-write thequeryin this fashion it works: > > > > > > SELECT c.name, c.id, cp.date, a.name, v.name, c.date, af.file > > > > > FROM venue v > > > > > JOIN concert c ON c.venue=v.id > > > > > JOIN concert_purchases cp ON cp.concert=c.id > > > > > JOIN artist a ON a.id=c.artist > > > > > LEFT JOIN audiofile af ON af.concert=c.id > > > > > WHERE cp.auth_user=3 > > > > > AND c.id=cp.concert > > > > > AND cp.expires>'2009-08-08 09:46:23' > > > > > ORDER BY cp.date DESC; > > > > > > some others have suggested that mixing the join syntax has operator > > > > > precedence issues, and that Postgres follows the standard while other > > > > > databases let you get away with the "incorrect" > > > > > syntax:http://archives.postgresql.org/pgsql-general/2006-09/msg01046.phphttp.. > > > > > > based on their analysis a standard compliant SQL parser will interpret > > > > > the web2py generatedquerylike this: > > > > > SELECT concert.name, concert.id, concert_purchases.date, artist.name, > > > > > venue.name, concert.date, audiofile.file FROM venue, concert, > > > > > concert_purchases, (artist LEFT JOIN audiofile ON > > > > > audiofile.concert=concert.id) WHERE concert_purchases.auth_user=3 > > > > > AND concert.id=concert_purchases.concert) AND > > > > > concert_purchases.expires>'2009-08-08 09:46:23') AND > > > > > artist.id=concert.artist) AND venue.id=concert.venue) ORDER BY > > > > > concert_purchases.date DESC; > > > > > > note the added parens around the last item in the from clause and the > > > > > LEFT JOIN item - hence concert is not visible. if i re-write it > > > > > knowing the operator precedence like this: > > > > > > SELECT concert.name, concert.id, concert_purchases.date, artist.name, > > > > > venue.name, concert.date, audiofile.file > > > > > FROM venue, artist, > > > > > concert_purchases, concert LEFT JOIN audiofile ON > > > > > audiofile.concert=concert.id WHERE concert_purchases.auth_user=3 > > > > > AND concert.id=concert_purchases.concert) AND > > > > > concert_purchases.expires>'2009-08-08 09:46:23') AND > > > > > artist.id=concert.artist) AND venue.id=concert.venue) ORDER BY > > > > > concert_purchases.date DESC; > > > > > > it also works...which explains to me why some of my left joins work > > > > > and some don't - if i'm lucky and the lasttablein the from clause is > > > > > what i am left joining on it works. > > > > > > that being said, it looks like i'm the only one with that problem so i > > > > > don't expect you to try and fix that right away. > > > > > > thanks, > > > > > > Christian > > > > > > On Aug 8, 4:17 pm, mdipierro wrote: > > > > > > > Is this sqlite? The generat
[web2py:29183] Re: upload filename inconsistency
I have double checked and it seems to me this has been fixed about a couple of months ago (before your post). The problem is that data stored before this was fixed may contain the full path. Can you verify the problem is fixed in 1.66.2? Massimo On Aug 23, 6:58 pm, Richard wrote: > I would like to upgrade my web2py when this is fixed, so is it worth > creating an issue on Google Code to track it? > Or has it already been fixed? > > Richard > > On Aug 20, 4:26 pm, Richard wrote: > > > great! > > Apparently some old versions of IE include the full path. > > > Richard > > > On Aug 19, 5:39 pm, mdipierro wrote: > > > > Yes, this may be a bug on windows. I will fix it. > > > > On Aug 18, 9:04 pm, Richard wrote: > > > > > hello, > > > > > From an upload form should request.vars..filename contain > > > > the original file basename, full path, or the raw string of whatever > > > > was in content-disposition? > > > > I had assumed it was the basename but from some error tickets found it > > > > must be the raw string. > > > > > Would it be worth parsing this variable into something consistent? > > > > On my Linux box I am occasionally getting filenames like "C:\ > > > > \Documents and Settings\\user\\Desktop\\file.txt", which can't be > > > > parsed with os.path.basename(). > > > > > Richard --~--~-~--~~~---~--~~ 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:29186] Re: Is HMAC bound to a particular machine?
Still. Let us know more about the python version (build), processor and OS so we can warn other users. Massimo On Aug 23, 7:10 pm, "mr.freeze" wrote: > Interesting...A third machine produces the same value as my > development machine. It looks like Dreamhost has something whacky > with their python install. Oh well, it's my problem now! Thanks for > helping me track it down. > > On Aug 23, 6:59 pm, "mr.freeze" wrote: > > > Yes, varchar(128). Here's the output of that command on both servers > > from the terminal: > > > Production:>>> import hmac > > >>> import hashlib > > >>> d= hmac.new('mykey','mypass',hashlib.sha512) > > >>> d.hexdigest() > > > '485c79d8330897e613847f64333a0ccebd705b1902c4c4872cb1b7cc9ad856eb00e70dd11474b39282699a453dead6d86d6f482992778bb9166d9c920f9fa694' > > > Development:>>> import hmac > > >>> import hashlib > > >>> d = hmac.new('mykey','mypass',hashlib.sha512) > > >>> d.hexdigest() > > > '46fb33cd6220b470d7fecb3dfb547fb2501517ca9695f8527895d1a4a1e515c0a05c8c1f15bd6f0439848717af00bdde902b50be454dd81878a9fce362b2e501' > > > They're supposed to be the same, right? Or am I misunderstanding how > > this works. > > > On Aug 23, 6:34 pm, mdipierro wrote: > > > > I cannot reproduce any machine dependence. I tried: > > > > hmac.new('mykey','something',hashlib.sha512).hexdigest() > > > > How long is your password field. Is it 128 bytes? > > > > Massimo > > > > On Aug 23, 5:57 pm, "mr.freeze" wrote: > > > > > I have a strange situation and I know virtually nothing about > > > > cryptography. I am passing a key to my auth password requires > > > > statement after the recent discussion on security strength like so: > > > > > if "login" in request.args: > > > > t.password.requires = [CRYPT(key='mykey')] > > > > else: > > > > t.password.requires = [IS_STRONG(upper=1,number=1,special=1),CRYPT > > > > (key='mykey')] > > > > > Here's the weird part: I have a dev server and a production server > > > > that are both running web2py and pointed to the same MySQL database. > > > > If I reset a user password from the dev server (retrieve_password), I > > > > can only log in from the dev server after that. The same is true for > > > > the production machine. Resetting from the production server reverses > > > > the situation. > > > > > I have stepped through the code and verified that at line 779 in > > > > tools.py user[passfield] is indeed different than form.vars.get > > > > (passfield, '') (both look like valid password hashes) so user = None, > > > > and thus login fails. > > > > > All I can figure is that the encryption is bound to the machine that > > > > generated the password hash. I'm using the same version of Python and > > > > web2py. Can someone verify or explain? > > > > > As always, thanks for your help. --~--~-~--~~~---~--~~ 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:29188] Re: Is HMAC bound to a particular machine?
Dreamhost machine is a 64 bits machine (xeon) and probably the algorithm was coded assuming a 32 bits machine. The result on dreamhost is wrong. On Aug 23, 7:24 pm, "mr.freeze" wrote: > Development: > Windows 7 RTM 64bit > Intel Core 2 Quad processor > Python 2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32 bit > (Intel)] on win32 > Python 2.6.2 (r262:71605, Apr 14 2009, 22:40:02) [MSC v.1500 32 bit > (Intel)] on win32 > output: > 46fb33cd6220b470d7fecb3dfb547fb2501517ca9695f8527895d1a4a1e515c0a05c8c1f15bd6f0439848717af00bdde902b50be454dd81878a9fce362b2e501 > > Production: > Dreamhost server > 2.6.29-xeon-aufs2.29-ipv6-qos-grsec kernel > Python 2.5 (release25-maint, Jul 23 2008, 18:15:29) > [GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] on linux2 > output: > 485c79d8330897e613847f64333a0ccebd705b1902c4c4872cb1b7cc9ad856eb00e70dd11474b39282699a453dead6d86d6f482992778bb9166d9c920f9fa694 > > I tried it on two more systems and they both produce the same hash as > my development machine. Definitely a Dreamhost issue. I think that's > the third time they've hosed me today. > > On Aug 23, 7:08 pm, mdipierro wrote: > > > They are supposed to be the same. This is a hash algorithm and cannot > > depend on the machine. There is a bug somewhere (like the compiled a > > 32 bits code on a 64 bits machine and the bit shifting operator works > > differently). > > > Can you give us details about the two python versions and machine > > architectures? This is a major bug with hashlib or hmac. > > > Massimo > > > On Aug 23, 6:59 pm, "mr.freeze" wrote: > > > > Yes, varchar(128). Here's the output of that command on both servers > > > from the terminal: > > > > Production:>>> import hmac > > > >>> import hashlib > > > >>> d= hmac.new('mykey','mypass',hashlib.sha512) > > > >>> d.hexdigest() > > > > '485c79d8330897e613847f64333a0ccebd705b1902c4c4872cb1b7cc9ad856eb00e70dd11474b39282699a453dead6d86d6f482992778bb9166d9c920f9fa694' > > > > Development:>>> import hmac > > > >>> import hashlib > > > >>> d = hmac.new('mykey','mypass',hashlib.sha512) > > > >>> d.hexdigest() > > > > '46fb33cd6220b470d7fecb3dfb547fb2501517ca9695f8527895d1a4a1e515c0a05c8c1f15bd6f0439848717af00bdde902b50be454dd81878a9fce362b2e501' > > > > They're supposed to be the same, right? Or am I misunderstanding how > > > this works. > > > > On Aug 23, 6:34 pm, mdipierro wrote: > > > > > I cannot reproduce any machine dependence. I tried: > > > > > hmac.new('mykey','something',hashlib.sha512).hexdigest() > > > > > How long is your password field. Is it 128 bytes? > > > > > Massimo > > > > > On Aug 23, 5:57 pm, "mr.freeze" wrote: > > > > > > I have a strange situation and I know virtually nothing about > > > > > cryptography. I am passing a key to my auth password requires > > > > > statement after the recent discussion on security strength like so: > > > > > > if "login" in request.args: > > > > > t.password.requires = [CRYPT(key='mykey')] > > > > > else: > > > > > t.password.requires = [IS_STRONG(upper=1,number=1,special=1),CRYPT > > > > > (key='mykey')] > > > > > > Here's the weird part: I have a dev server and a production server > > > > > that are both running web2py and pointed to the same MySQL database. > > > > > If I reset a user password from the dev server (retrieve_password), I > > > > > can only log in from the dev server after that. The same is true for > > > > > the production machine. Resetting from the production server reverses > > > > > the situation. > > > > > > I have stepped through the code and verified that at line 779 in > > > > > tools.py user[passfield] is indeed different than form.vars.get > > > > > (passfield, '') (both look like valid password hashes) so user = None, > > > > > and thus login fails. > > > > > > All I can figure is that the encryption is bound to the machine that > > > > > generated the password hash. I'm using the same version of Python and > > > > > web2py. Can someone verify or explain? > > > > > > As always, thanks for your help. --~--~-~--~~~---~--~~ 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:29187] Re: Is HMAC bound to a particular machine?
Development: Windows 7 RTM 64bit Intel Core 2 Quad processor Python 2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32 bit (Intel)] on win32 Python 2.6.2 (r262:71605, Apr 14 2009, 22:40:02) [MSC v.1500 32 bit (Intel)] on win32 output: 46fb33cd6220b470d7fecb3dfb547fb2501517ca9695f8527895d1a4a1e515c0a05c8c1f15bd6f0439848717af00bdde902b50be454dd81878a9fce362b2e501 Production: Dreamhost server 2.6.29-xeon-aufs2.29-ipv6-qos-grsec kernel Python 2.5 (release25-maint, Jul 23 2008, 18:15:29) [GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] on linux2 output: 485c79d8330897e613847f64333a0ccebd705b1902c4c4872cb1b7cc9ad856eb00e70dd11474b39282699a453dead6d86d6f482992778bb9166d9c920f9fa694 I tried it on two more systems and they both produce the same hash as my development machine. Definitely a Dreamhost issue. I think that's the third time they've hosed me today. On Aug 23, 7:08 pm, mdipierro wrote: > They are supposed to be the same. This is a hash algorithm and cannot > depend on the machine. There is a bug somewhere (like the compiled a > 32 bits code on a 64 bits machine and the bit shifting operator works > differently). > > Can you give us details about the two python versions and machine > architectures? This is a major bug with hashlib or hmac. > > Massimo > > On Aug 23, 6:59 pm, "mr.freeze" wrote: > > > Yes, varchar(128). Here's the output of that command on both servers > > from the terminal: > > > Production:>>> import hmac > > >>> import hashlib > > >>> d= hmac.new('mykey','mypass',hashlib.sha512) > > >>> d.hexdigest() > > > '485c79d8330897e613847f64333a0ccebd705b1902c4c4872cb1b7cc9ad856eb00e70dd11474b39282699a453dead6d86d6f482992778bb9166d9c920f9fa694' > > > Development:>>> import hmac > > >>> import hashlib > > >>> d = hmac.new('mykey','mypass',hashlib.sha512) > > >>> d.hexdigest() > > > '46fb33cd6220b470d7fecb3dfb547fb2501517ca9695f8527895d1a4a1e515c0a05c8c1f15bd6f0439848717af00bdde902b50be454dd81878a9fce362b2e501' > > > They're supposed to be the same, right? Or am I misunderstanding how > > this works. > > > On Aug 23, 6:34 pm, mdipierro wrote: > > > > I cannot reproduce any machine dependence. I tried: > > > > hmac.new('mykey','something',hashlib.sha512).hexdigest() > > > > How long is your password field. Is it 128 bytes? > > > > Massimo > > > > On Aug 23, 5:57 pm, "mr.freeze" wrote: > > > > > I have a strange situation and I know virtually nothing about > > > > cryptography. I am passing a key to my auth password requires > > > > statement after the recent discussion on security strength like so: > > > > > if "login" in request.args: > > > > t.password.requires = [CRYPT(key='mykey')] > > > > else: > > > > t.password.requires = [IS_STRONG(upper=1,number=1,special=1),CRYPT > > > > (key='mykey')] > > > > > Here's the weird part: I have a dev server and a production server > > > > that are both running web2py and pointed to the same MySQL database. > > > > If I reset a user password from the dev server (retrieve_password), I > > > > can only log in from the dev server after that. The same is true for > > > > the production machine. Resetting from the production server reverses > > > > the situation. > > > > > I have stepped through the code and verified that at line 779 in > > > > tools.py user[passfield] is indeed different than form.vars.get > > > > (passfield, '') (both look like valid password hashes) so user = None, > > > > and thus login fails. > > > > > All I can figure is that the encryption is bound to the machine that > > > > generated the password hash. I'm using the same version of Python and > > > > web2py. Can someone verify or explain? > > > > > As always, thanks for your help. --~--~-~--~~~---~--~~ 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:29184] Re: Is HMAC bound to a particular machine?
They are supposed to be the same. This is a hash algorithm and cannot depend on the machine. There is a bug somewhere (like the compiled a 32 bits code on a 64 bits machine and the bit shifting operator works differently). Can you give us details about the two python versions and machine architectures? This is a major bug with hashlib or hmac. Massimo On Aug 23, 6:59 pm, "mr.freeze" wrote: > Yes, varchar(128). Here's the output of that command on both servers > from the terminal: > > Production:>>> import hmac > >>> import hashlib > >>> d= hmac.new('mykey','mypass',hashlib.sha512) > >>> d.hexdigest() > > '485c79d8330897e613847f64333a0ccebd705b1902c4c4872cb1b7cc9ad856eb00e70dd11474b39282699a453dead6d86d6f482992778bb9166d9c920f9fa694' > > Development:>>> import hmac > >>> import hashlib > >>> d = hmac.new('mykey','mypass',hashlib.sha512) > >>> d.hexdigest() > > '46fb33cd6220b470d7fecb3dfb547fb2501517ca9695f8527895d1a4a1e515c0a05c8c1f15bd6f0439848717af00bdde902b50be454dd81878a9fce362b2e501' > > They're supposed to be the same, right? Or am I misunderstanding how > this works. > > On Aug 23, 6:34 pm, mdipierro wrote: > > > I cannot reproduce any machine dependence. I tried: > > > hmac.new('mykey','something',hashlib.sha512).hexdigest() > > > How long is your password field. Is it 128 bytes? > > > Massimo > > > On Aug 23, 5:57 pm, "mr.freeze" wrote: > > > > I have a strange situation and I know virtually nothing about > > > cryptography. I am passing a key to my auth password requires > > > statement after the recent discussion on security strength like so: > > > > if "login" in request.args: > > > t.password.requires = [CRYPT(key='mykey')] > > > else: > > > t.password.requires = [IS_STRONG(upper=1,number=1,special=1),CRYPT > > > (key='mykey')] > > > > Here's the weird part: I have a dev server and a production server > > > that are both running web2py and pointed to the same MySQL database. > > > If I reset a user password from the dev server (retrieve_password), I > > > can only log in from the dev server after that. The same is true for > > > the production machine. Resetting from the production server reverses > > > the situation. > > > > I have stepped through the code and verified that at line 779 in > > > tools.py user[passfield] is indeed different than form.vars.get > > > (passfield, '') (both look like valid password hashes) so user = None, > > > and thus login fails. > > > > All I can figure is that the encryption is bound to the machine that > > > generated the password hash. I'm using the same version of Python and > > > web2py. Can someone verify or explain? > > > > As always, thanks for your help. --~--~-~--~~~---~--~~ 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:29189] Re: Is HMAC bound to a particular machine?
I will email Guido. Massimo On Aug 23, 7:24 pm, "mr.freeze" wrote: > Development: > Windows 7 RTM 64bit > Intel Core 2 Quad processor > Python 2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32 bit > (Intel)] on win32 > Python 2.6.2 (r262:71605, Apr 14 2009, 22:40:02) [MSC v.1500 32 bit > (Intel)] on win32 > output: > 46fb33cd6220b470d7fecb3dfb547fb2501517ca9695f8527895d1a4a1e515c0a05c8c1f15bd6f0439848717af00bdde902b50be454dd81878a9fce362b2e501 > > Production: > Dreamhost server > 2.6.29-xeon-aufs2.29-ipv6-qos-grsec kernel > Python 2.5 (release25-maint, Jul 23 2008, 18:15:29) > [GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] on linux2 > output: > 485c79d8330897e613847f64333a0ccebd705b1902c4c4872cb1b7cc9ad856eb00e70dd11474b39282699a453dead6d86d6f482992778bb9166d9c920f9fa694 > > I tried it on two more systems and they both produce the same hash as > my development machine. Definitely a Dreamhost issue. I think that's > the third time they've hosed me today. > > On Aug 23, 7:08 pm, mdipierro wrote: > > > They are supposed to be the same. This is a hash algorithm and cannot > > depend on the machine. There is a bug somewhere (like the compiled a > > 32 bits code on a 64 bits machine and the bit shifting operator works > > differently). > > > Can you give us details about the two python versions and machine > > architectures? This is a major bug with hashlib or hmac. > > > Massimo > > > On Aug 23, 6:59 pm, "mr.freeze" wrote: > > > > Yes, varchar(128). Here's the output of that command on both servers > > > from the terminal: > > > > Production:>>> import hmac > > > >>> import hashlib > > > >>> d= hmac.new('mykey','mypass',hashlib.sha512) > > > >>> d.hexdigest() > > > > '485c79d8330897e613847f64333a0ccebd705b1902c4c4872cb1b7cc9ad856eb00e70dd11474b39282699a453dead6d86d6f482992778bb9166d9c920f9fa694' > > > > Development:>>> import hmac > > > >>> import hashlib > > > >>> d = hmac.new('mykey','mypass',hashlib.sha512) > > > >>> d.hexdigest() > > > > '46fb33cd6220b470d7fecb3dfb547fb2501517ca9695f8527895d1a4a1e515c0a05c8c1f15bd6f0439848717af00bdde902b50be454dd81878a9fce362b2e501' > > > > They're supposed to be the same, right? Or am I misunderstanding how > > > this works. > > > > On Aug 23, 6:34 pm, mdipierro wrote: > > > > > I cannot reproduce any machine dependence. I tried: > > > > > hmac.new('mykey','something',hashlib.sha512).hexdigest() > > > > > How long is your password field. Is it 128 bytes? > > > > > Massimo > > > > > On Aug 23, 5:57 pm, "mr.freeze" wrote: > > > > > > I have a strange situation and I know virtually nothing about > > > > > cryptography. I am passing a key to my auth password requires > > > > > statement after the recent discussion on security strength like so: > > > > > > if "login" in request.args: > > > > > t.password.requires = [CRYPT(key='mykey')] > > > > > else: > > > > > t.password.requires = [IS_STRONG(upper=1,number=1,special=1),CRYPT > > > > > (key='mykey')] > > > > > > Here's the weird part: I have a dev server and a production server > > > > > that are both running web2py and pointed to the same MySQL database. > > > > > If I reset a user password from the dev server (retrieve_password), I > > > > > can only log in from the dev server after that. The same is true for > > > > > the production machine. Resetting from the production server reverses > > > > > the situation. > > > > > > I have stepped through the code and verified that at line 779 in > > > > > tools.py user[passfield] is indeed different than form.vars.get > > > > > (passfield, '') (both look like valid password hashes) so user = None, > > > > > and thus login fails. > > > > > > All I can figure is that the encryption is bound to the machine that > > > > > generated the password hash. I'm using the same version of Python and > > > > > web2py. Can someone verify or explain? > > > > > > As always, thanks for your help. --~--~-~--~~~---~--~~ 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:29191] Re: Is HMAC bound to a particular machine?
I have tried 5 other computers with a mix of 32/64 bit Windows/Linux and they all produce the same digest as my dev machine. I have submitted a support request to Dreamhost. Thanks again. On Aug 23, 7:37 pm, mdipierro wrote: > corrections. These are both 64 bits machines. the python version on > Dreamhost is the oldest. This means the bug has been fixed already but > dreamhost does not know. > > Massimo > > On Aug 23, 7:32 pm, mdipierro wrote: > > > I will email Guido. > > > Massimo > > > On Aug 23, 7:24 pm, "mr.freeze" wrote: > > > > Development: > > > Windows 7 RTM 64bit > > > Intel Core 2 Quad processor > > > Python 2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32 bit > > > (Intel)] on win32 > > > Python 2.6.2 (r262:71605, Apr 14 2009, 22:40:02) [MSC v.1500 32 bit > > > (Intel)] on win32 > > > output: > > > 46fb33cd6220b470d7fecb3dfb547fb2501517ca9695f8527895d1a4a1e515c0a05c8c1f15bd6f0439848717af00bdde902b50be454dd81878a9fce362b2e501 > > > > Production: > > > Dreamhost server > > > 2.6.29-xeon-aufs2.29-ipv6-qos-grsec kernel > > > Python 2.5 (release25-maint, Jul 23 2008, 18:15:29) > > > [GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] on linux2 > > > output: > > > 485c79d8330897e613847f64333a0ccebd705b1902c4c4872cb1b7cc9ad856eb00e70dd11474b39282699a453dead6d86d6f482992778bb9166d9c920f9fa694 > > > > I tried it on two more systems and they both produce the same hash as > > > my development machine. Definitely a Dreamhost issue. I think that's > > > the third time they've hosed me today. > > > > On Aug 23, 7:08 pm, mdipierro wrote: > > > > > They are supposed to be the same. This is a hash algorithm and cannot > > > > depend on the machine. There is a bug somewhere (like the compiled a > > > > 32 bits code on a 64 bits machine and the bit shifting operator works > > > > differently). > > > > > Can you give us details about the two python versions and machine > > > > architectures? This is a major bug with hashlib or hmac. > > > > > Massimo > > > > > On Aug 23, 6:59 pm, "mr.freeze" wrote: > > > > > > Yes, varchar(128). Here's the output of that command on both servers > > > > > from the terminal: > > > > > > Production:>>> import hmac > > > > > >>> import hashlib > > > > > >>> d= hmac.new('mykey','mypass',hashlib.sha512) > > > > > >>> d.hexdigest() > > > > > > '485c79d8330897e613847f64333a0ccebd705b1902c4c4872cb1b7cc9ad856eb00e70dd11474b39282699a453dead6d86d6f482992778bb9166d9c920f9fa694' > > > > > > Development:>>> import hmac > > > > > >>> import hashlib > > > > > >>> d = hmac.new('mykey','mypass',hashlib.sha512) > > > > > >>> d.hexdigest() > > > > > > '46fb33cd6220b470d7fecb3dfb547fb2501517ca9695f8527895d1a4a1e515c0a05c8c1f15bd6f0439848717af00bdde902b50be454dd81878a9fce362b2e501' > > > > > > They're supposed to be the same, right? Or am I misunderstanding how > > > > > this works. > > > > > > On Aug 23, 6:34 pm, mdipierro wrote: > > > > > > > I cannot reproduce any machine dependence. I tried: > > > > > > > hmac.new('mykey','something',hashlib.sha512).hexdigest() > > > > > > > How long is your password field. Is it 128 bytes? > > > > > > > Massimo > > > > > > > On Aug 23, 5:57 pm, "mr.freeze" wrote: > > > > > > > > I have a strange situation and I know virtually nothing about > > > > > > > cryptography. I am passing a key to my auth password requires > > > > > > > statement after the recent discussion on security strength like > > > > > > > so: > > > > > > > > if "login" in request.args: > > > > > > > t.password.requires = [CRYPT(key='mykey')] > > > > > > > else: > > > > > > > t.password.requires = > > > > > > > [IS_STRONG(upper=1,number=1,special=1),CRYPT > > > > > > > (key='mykey')] > > > > > > > > Here's the weird part: I have a dev server and a production server > > > > > > > that are both running web2py and pointed to the same MySQL > > > > > > > database. > > > > > > > If I reset a user password from the dev server > > > > > > > (retrieve_password), I > > > > > > > can only log in from the dev server after that. The same is true > > > > > > > for > > > > > > > the production machine. Resetting from the production server > > > > > > > reverses > > > > > > > the situation. > > > > > > > > I have stepped through the code and verified that at line 779 in > > > > > > > tools.py user[passfield] is indeed different than form.vars.get > > > > > > > (passfield, '') (both look like valid password hashes) so user = > > > > > > > None, > > > > > > > and thus login fails. > > > > > > > > All I can figure is that the encryption is bound to the machine > > > > > > > that > > > > > > > generated the password hash. I'm using the same version of > > > > > > > Python and > > > > > > > web2py. Can someone verify or explain? > > > > > > > > As always, thanks for your help. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web2py@googlegr
[web2py:29192] Re: Is HMAC bound to a particular machine?
On Aug 23, 2009, at 5:32 PM, mdipierro wrote: > > I will email Guido. Looks like this was fixed in 2.5.2: http://bugs.python.org/issue1385 > > Massimo > > On Aug 23, 7:24 pm, "mr.freeze" wrote: >> Development: >> Windows 7 RTM 64bit >> Intel Core 2 Quad processor >> Python 2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32 bit >> (Intel)] on win32 >> Python 2.6.2 (r262:71605, Apr 14 2009, 22:40:02) [MSC v.1500 32 bit >> (Intel)] on win32 >> output: >> 46fb33cd6220b470d7fecb3dfb547fb2501517ca9695f8527895d1a4a1e515c0a05c8c1f15bd6f0439848717af00bdde902b50be454dd81878a9fce362b2e501 >> >> Production: >> Dreamhost server >> 2.6.29-xeon-aufs2.29-ipv6-qos-grsec kernel >> Python 2.5 (release25-maint, Jul 23 2008, 18:15:29) >> [GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] on linux2 >> output: >> 485c79d8330897e613847f64333a0ccebd705b1902c4c4872cb1b7cc9ad856eb00e70dd11474b39282699a453dead6d86d6f482992778bb9166d9c920f9fa694 >> >> I tried it on two more systems and they both produce the same hash as >> my development machine. Definitely a Dreamhost issue. I think >> that's >> the third time they've hosed me today. >> >> On Aug 23, 7:08 pm, mdipierro wrote: >> >>> They are supposed to be the same. This is a hash algorithm and >>> cannot >>> depend on the machine. There is a bug somewhere (like the compiled a >>> 32 bits code on a 64 bits machine and the bit shifting operator >>> works >>> differently). >> >>> Can you give us details about the two python versions and machine >>> architectures? This is a major bug with hashlib or hmac. >> >>> Massimo >> >>> On Aug 23, 6:59 pm, "mr.freeze" wrote: >> Yes, varchar(128). Here's the output of that command on both servers from the terminal: >> Production:>>> import hmac >>> import hashlib >>> d= hmac.new('mykey','mypass',hashlib.sha512) >>> d.hexdigest() >> '485c79d8330897e613847f64333a0ccebd705b1902c4c4872cb1b7cc9ad856eb00e70dd11474b39282699a453dead6d86d6f482992778bb9166d9c920f9fa694 ' >> Development:>>> import hmac >>> import hashlib >>> d = hmac.new('mykey','mypass',hashlib.sha512) >>> d.hexdigest() >> '46fb33cd6220b470d7fecb3dfb547fb2501517ca9695f8527895d1a4a1e515c0a05c8c1f15bd6f0439848717af00bdde902b50be454dd81878a9fce362b2e501 ' >> They're supposed to be the same, right? Or am I misunderstanding how this works. >> On Aug 23, 6:34 pm, mdipierro wrote: >> > I cannot reproduce any machine dependence. I tried: >> > hmac.new('mykey','something',hashlib.sha512).hexdigest() >> > How long is your password field. Is it 128 bytes? >> > Massimo >> > On Aug 23, 5:57 pm, "mr.freeze" wrote: >> >> I have a strange situation and I know virtually nothing about >> cryptography. I am passing a key to my auth password requires >> statement after the recent discussion on security strength like >> so: >> >> if "login" in request.args: >> t.password.requires = [CRYPT(key='mykey')] >> else: >> t.password.requires = >> [IS_STRONG(upper=1,number=1,special=1),CRYPT >> (key='mykey')] >> >> Here's the weird part: I have a dev server and a production >> server >> that are both running web2py and pointed to the same MySQL >> database. >> If I reset a user password from the dev server >> (retrieve_password), I >> can only log in from the dev server after that. The same is >> true for >> the production machine. Resetting from the production server >> reverses >> the situation. >> >> I have stepped through the code and verified that at line 779 in >> tools.py user[passfield] is indeed different than form.vars.get >> (passfield, '') (both look like valid password hashes) so user >> = None, >> and thus login fails. >> >> All I can figure is that the encryption is bound to the machine >> that >> generated the password hash. I'm using the same version of >> Python and >> web2py. Can someone verify or explain? >> >> As always, thanks for your help. > > --~--~-~--~~~---~--~~ 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:29193] Re: Is HMAC bound to a particular machine?
Yes, and only affects sha512 apparently. sha256 produces the same value on Dreamhost and my dev machine. On Aug 23, 7:51 pm, Jonathan Lundell wrote: > On Aug 23, 2009, at 5:32 PM, mdipierro wrote: > > > > > I will email Guido. > > Looks like this was fixed in 2.5.2: > > http://bugs.python.org/issue1385 > > > > > Massimo > > > On Aug 23, 7:24 pm, "mr.freeze" wrote: > >> Development: > >> Windows 7 RTM 64bit > >> Intel Core 2 Quad processor > >> Python 2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32 bit > >> (Intel)] on win32 > >> Python 2.6.2 (r262:71605, Apr 14 2009, 22:40:02) [MSC v.1500 32 bit > >> (Intel)] on win32 > >> output: > >> 46fb33cd6220b470d7fecb3dfb547fb2501517ca9695f8527895d1a4a1e515c0a05c8c1f15bd6f0439848717af00bdde902b50be454dd81878a9fce362b2e501 > > >> Production: > >> Dreamhost server > >> 2.6.29-xeon-aufs2.29-ipv6-qos-grsec kernel > >> Python 2.5 (release25-maint, Jul 23 2008, 18:15:29) > >> [GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] on linux2 > >> output: > >> 485c79d8330897e613847f64333a0ccebd705b1902c4c4872cb1b7cc9ad856eb00e70dd11474b39282699a453dead6d86d6f482992778bb9166d9c920f9fa694 > > >> I tried it on two more systems and they both produce the same hash as > >> my development machine. Definitely a Dreamhost issue. I think > >> that's > >> the third time they've hosed me today. > > >> On Aug 23, 7:08 pm, mdipierro wrote: > > >>> They are supposed to be the same. This is a hash algorithm and > >>> cannot > >>> depend on the machine. There is a bug somewhere (like the compiled a > >>> 32 bits code on a 64 bits machine and the bit shifting operator > >>> works > >>> differently). > > >>> Can you give us details about the two python versions and machine > >>> architectures? This is a major bug with hashlib or hmac. > > >>> Massimo > > >>> On Aug 23, 6:59 pm, "mr.freeze" wrote: > > Yes, varchar(128). Here's the output of that command on both > servers > from the terminal: > > Production:>>> import hmac > >>> import hashlib > >>> d= hmac.new('mykey','mypass',hashlib.sha512) > >>> d.hexdigest() > > '485c79d8330897e613847f64333a0ccebd705b1902c4c4872cb1b7cc9ad856eb00e70dd11474b39282699a453dead6d86d6f482992778bb9166d9c920f9fa694 > ' > > Development:>>> import hmac > >>> import hashlib > >>> d = hmac.new('mykey','mypass',hashlib.sha512) > >>> d.hexdigest() > > '46fb33cd6220b470d7fecb3dfb547fb2501517ca9695f8527895d1a4a1e515c0a05c8c1f15bd6f0439848717af00bdde902b50be454dd81878a9fce362b2e501 > ' > > They're supposed to be the same, right? Or am I misunderstanding > how > this works. > > On Aug 23, 6:34 pm, mdipierro wrote: > > > I cannot reproduce any machine dependence. I tried: > > > hmac.new('mykey','something',hashlib.sha512).hexdigest() > > > How long is your password field. Is it 128 bytes? > > > Massimo > > > On Aug 23, 5:57 pm, "mr.freeze" wrote: > > >> I have a strange situation and I know virtually nothing about > >> cryptography. I am passing a key to my auth password requires > >> statement after the recent discussion on security strength like > >> so: > > >> if "login" in request.args: > >> t.password.requires = [CRYPT(key='mykey')] > >> else: > >> t.password.requires = > >> [IS_STRONG(upper=1,number=1,special=1),CRYPT > >> (key='mykey')] > > >> Here's the weird part: I have a dev server and a production > >> server > >> that are both running web2py and pointed to the same MySQL > >> database. > >> If I reset a user password from the dev server > >> (retrieve_password), I > >> can only log in from the dev server after that. The same is > >> true for > >> the production machine. Resetting from the production server > >> reverses > >> the situation. > > >> I have stepped through the code and verified that at line 779 in > >> tools.py user[passfield] is indeed different than form.vars.get > >> (passfield, '') (both look like valid password hashes) so user > >> = None, > >> and thus login fails. > > >> All I can figure is that the encryption is bound to the machine > >> that > >> generated the password hash. I'm using the same version of > >> Python and > >> web2py. Can someone verify or explain? > > >> As always, thanks for your help. --~--~-~--~~~---~--~~ 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:29190] Re: Is HMAC bound to a particular machine?
corrections. These are both 64 bits machines. the python version on Dreamhost is the oldest. This means the bug has been fixed already but dreamhost does not know. Massimo On Aug 23, 7:32 pm, mdipierro wrote: > I will email Guido. > > Massimo > > On Aug 23, 7:24 pm, "mr.freeze" wrote: > > > Development: > > Windows 7 RTM 64bit > > Intel Core 2 Quad processor > > Python 2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32 bit > > (Intel)] on win32 > > Python 2.6.2 (r262:71605, Apr 14 2009, 22:40:02) [MSC v.1500 32 bit > > (Intel)] on win32 > > output: > > 46fb33cd6220b470d7fecb3dfb547fb2501517ca9695f8527895d1a4a1e515c0a05c8c1f15bd6f0439848717af00bdde902b50be454dd81878a9fce362b2e501 > > > Production: > > Dreamhost server > > 2.6.29-xeon-aufs2.29-ipv6-qos-grsec kernel > > Python 2.5 (release25-maint, Jul 23 2008, 18:15:29) > > [GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] on linux2 > > output: > > 485c79d8330897e613847f64333a0ccebd705b1902c4c4872cb1b7cc9ad856eb00e70dd11474b39282699a453dead6d86d6f482992778bb9166d9c920f9fa694 > > > I tried it on two more systems and they both produce the same hash as > > my development machine. Definitely a Dreamhost issue. I think that's > > the third time they've hosed me today. > > > On Aug 23, 7:08 pm, mdipierro wrote: > > > > They are supposed to be the same. This is a hash algorithm and cannot > > > depend on the machine. There is a bug somewhere (like the compiled a > > > 32 bits code on a 64 bits machine and the bit shifting operator works > > > differently). > > > > Can you give us details about the two python versions and machine > > > architectures? This is a major bug with hashlib or hmac. > > > > Massimo > > > > On Aug 23, 6:59 pm, "mr.freeze" wrote: > > > > > Yes, varchar(128). Here's the output of that command on both servers > > > > from the terminal: > > > > > Production:>>> import hmac > > > > >>> import hashlib > > > > >>> d= hmac.new('mykey','mypass',hashlib.sha512) > > > > >>> d.hexdigest() > > > > > '485c79d8330897e613847f64333a0ccebd705b1902c4c4872cb1b7cc9ad856eb00e70dd11474b39282699a453dead6d86d6f482992778bb9166d9c920f9fa694' > > > > > Development:>>> import hmac > > > > >>> import hashlib > > > > >>> d = hmac.new('mykey','mypass',hashlib.sha512) > > > > >>> d.hexdigest() > > > > > '46fb33cd6220b470d7fecb3dfb547fb2501517ca9695f8527895d1a4a1e515c0a05c8c1f15bd6f0439848717af00bdde902b50be454dd81878a9fce362b2e501' > > > > > They're supposed to be the same, right? Or am I misunderstanding how > > > > this works. > > > > > On Aug 23, 6:34 pm, mdipierro wrote: > > > > > > I cannot reproduce any machine dependence. I tried: > > > > > > hmac.new('mykey','something',hashlib.sha512).hexdigest() > > > > > > How long is your password field. Is it 128 bytes? > > > > > > Massimo > > > > > > On Aug 23, 5:57 pm, "mr.freeze" wrote: > > > > > > > I have a strange situation and I know virtually nothing about > > > > > > cryptography. I am passing a key to my auth password requires > > > > > > statement after the recent discussion on security strength like so: > > > > > > > if "login" in request.args: > > > > > > t.password.requires = [CRYPT(key='mykey')] > > > > > > else: > > > > > > t.password.requires = > > > > > > [IS_STRONG(upper=1,number=1,special=1),CRYPT > > > > > > (key='mykey')] > > > > > > > Here's the weird part: I have a dev server and a production server > > > > > > that are both running web2py and pointed to the same MySQL database. > > > > > > If I reset a user password from the dev server (retrieve_password), > > > > > > I > > > > > > can only log in from the dev server after that. The same is true > > > > > > for > > > > > > the production machine. Resetting from the production server > > > > > > reverses > > > > > > the situation. > > > > > > > I have stepped through the code and verified that at line 779 in > > > > > > tools.py user[passfield] is indeed different than form.vars.get > > > > > > (passfield, '') (both look like valid password hashes) so user = > > > > > > None, > > > > > > and thus login fails. > > > > > > > All I can figure is that the encryption is bound to the machine that > > > > > > generated the password hash. I'm using the same version of Python > > > > > > and > > > > > > web2py. Can someone verify or explain? > > > > > > > As always, thanks for your help. --~--~-~--~~~---~--~~ 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:29196] Re: how do I upload data to GAE database tables
I dunno, but this might be what you're looking for. http://code.google.com/appengine/docs/python/tools/uploadingdata.html Cheers Victor On Aug 21, 8:53 am, durga wrote: > how do I upload default data to GAE database tables like we do it in > admin app using CSV file --~--~-~--~~~---~--~~ 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:29197] Re: When does form.accepts fail?
I'm still on Sqllite at this point. The reason I'm a little mystified is because I put a print statement just inside the "if form.accepts (..." clause (just above the if request.vars.show) and it was never executed. On Aug 23, 1:51 pm, mdipierro wrote: > Are you sure accept is failing and not insert? 'text' fields in MySQL > have a size limit. Do you use MySQL? > --~--~-~--~~~---~--~~ 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:29194] Can I use win32com.client under Web2Py?
Hi. I have a Python script that utilizes win32com.client services in order to connect to Quickbooks. Is it possible to run such a script from within Web2Py on a Windows XP machine? The relevant lines of code are: import win32com.client . . . q = win32com.client.Dispatch("QBXMLRP.RequestProcessor") q.OpenConnection("Grab Data", "Grab Data") t = q.BeginSession("",0) . . .Thanks. Elan --~--~-~--~~~---~--~~ 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:29195] Re: Is HMAC bound to a particular machine?
Massimo, would you be opposed to making CRYPTs hash algorithm configurable when hmac is used (line 1713 or validators.py)? On Aug 23, 7:53 pm, "mr.freeze" wrote: > Yes, and only affects sha512 apparently. sha256 produces the same > value on Dreamhost and my dev machine. > > On Aug 23, 7:51 pm, Jonathan Lundell wrote: > > > On Aug 23, 2009, at 5:32 PM, mdipierro wrote: > > > > I will email Guido. > > > Looks like this was fixed in 2.5.2: > > >http://bugs.python.org/issue1385 > > > > Massimo > > > > On Aug 23, 7:24 pm, "mr.freeze" wrote: > > >> Development: > > >> Windows 7 RTM 64bit > > >> Intel Core 2 Quad processor > > >> Python 2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32 bit > > >> (Intel)] on win32 > > >> Python 2.6.2 (r262:71605, Apr 14 2009, 22:40:02) [MSC v.1500 32 bit > > >> (Intel)] on win32 > > >> output: > > >> 46fb33cd6220b470d7fecb3dfb547fb2501517ca9695f8527895d1a4a1e515c0a05c8c1f15bd6f0439848717af00bdde902b50be454dd81878a9fce362b2e501 > > > >> Production: > > >> Dreamhost server > > >> 2.6.29-xeon-aufs2.29-ipv6-qos-grsec kernel > > >> Python 2.5 (release25-maint, Jul 23 2008, 18:15:29) > > >> [GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] on linux2 > > >> output: > > >> 485c79d8330897e613847f64333a0ccebd705b1902c4c4872cb1b7cc9ad856eb00e70dd11474b39282699a453dead6d86d6f482992778bb9166d9c920f9fa694 > > > >> I tried it on two more systems and they both produce the same hash as > > >> my development machine. Definitely a Dreamhost issue. I think > > >> that's > > >> the third time they've hosed me today. > > > >> On Aug 23, 7:08 pm, mdipierro wrote: > > > >>> They are supposed to be the same. This is a hash algorithm and > > >>> cannot > > >>> depend on the machine. There is a bug somewhere (like the compiled a > > >>> 32 bits code on a 64 bits machine and the bit shifting operator > > >>> works > > >>> differently). > > > >>> Can you give us details about the two python versions and machine > > >>> architectures? This is a major bug with hashlib or hmac. > > > >>> Massimo > > > >>> On Aug 23, 6:59 pm, "mr.freeze" wrote: > > > Yes, varchar(128). Here's the output of that command on both > > servers > > from the terminal: > > > Production:>>> import hmac > > >>> import hashlib > > >>> d= hmac.new('mykey','mypass',hashlib.sha512) > > >>> d.hexdigest() > > > '485c79d8330897e613847f64333a0ccebd705b1902c4c4872cb1b7cc9ad856eb00e70dd11474b39282699a453dead6d86d6f482992778bb9166d9c920f9fa694 > > ' > > > Development:>>> import hmac > > >>> import hashlib > > >>> d = hmac.new('mykey','mypass',hashlib.sha512) > > >>> d.hexdigest() > > > '46fb33cd6220b470d7fecb3dfb547fb2501517ca9695f8527895d1a4a1e515c0a05c8c1f15bd6f0439848717af00bdde902b50be454dd81878a9fce362b2e501 > > ' > > > They're supposed to be the same, right? Or am I misunderstanding > > how > > this works. > > > On Aug 23, 6:34 pm, mdipierro wrote: > > > > I cannot reproduce any machine dependence. I tried: > > > > hmac.new('mykey','something',hashlib.sha512).hexdigest() > > > > How long is your password field. Is it 128 bytes? > > > > Massimo > > > > On Aug 23, 5:57 pm, "mr.freeze" wrote: > > > >> I have a strange situation and I know virtually nothing about > > >> cryptography. I am passing a key to my auth password requires > > >> statement after the recent discussion on security strength like > > >> so: > > > >> if "login" in request.args: > > >> t.password.requires = [CRYPT(key='mykey')] > > >> else: > > >> t.password.requires = > > >> [IS_STRONG(upper=1,number=1,special=1),CRYPT > > >> (key='mykey')] > > > >> Here's the weird part: I have a dev server and a production > > >> server > > >> that are both running web2py and pointed to the same MySQL > > >> database. > > >> If I reset a user password from the dev server > > >> (retrieve_password), I > > >> can only log in from the dev server after that. The same is > > >> true for > > >> the production machine. Resetting from the production server > > >> reverses > > >> the situation. > > > >> I have stepped through the code and verified that at line 779 in > > >> tools.py user[passfield] is indeed different than form.vars.get > > >> (passfield, '') (both look like valid password hashes) so user > > >> = None, > > >> and thus login fails. > > > >> All I can figure is that the encryption is bound to the machine > > >> that > > >> generated the password hash. I'm using the same version of > > >> Python and > > >> web2py. Can someone verify or explain? > > > >> As always, thanks for your help. --~--~-~--~~~---~--~~ 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.
[web2py:29198] Re: Can I use win32com.client under Web2Py?
If you can do it in python, you can do it. I have been integrating my gui/gtk applications into web2py. :D Regards, Jason On Sun, 2009-08-23 at 18:01 -0700, poematrix wrote: > Hi. > > I have a Python script that utilizes win32com.client services in order > to connect to Quickbooks. Is it possible to run such a script from > within Web2Py on a Windows XP machine? > > The relevant lines of code are: > > import win32com.client > . > . > . > q = win32com.client.Dispatch("QBXMLRP.RequestProcessor") > q.OpenConnection("Grab Data", "Grab Data") > t = q.BeginSession("",0) > . > . > .Thanks. > Elan > > > --~--~-~--~~~---~--~~ 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:29199] Re: web2py, bigtable and the '09 DAL
Yarko Tymciurak: I have the Proof of Concept DALnr App ready in a 5 meg ZIP file. Please give me your email to send it to, or advise where I can post the zip file. Thanks. --~--~-~--~~~---~--~~ 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:28956] moving database to new server results in 'auth_user' already exists
I want to move a web2py database from one MySQL server to another. I dumped the database on the old server, loaded it into the new server, and created the database user with the necessary privileges. Then I changed the connection string in db.py to refer to the new server. It connects OK but I then get this error: OperationalError: (1050, "Table 'auth_user' already exists") That table does exist since I copied it over. Why does web2py think that it needs to create it? How do I work around this? --~--~-~--~~~---~--~~ 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:29200] Re: upload filename inconsistency
I can confirm it happened with 1.66.1. Is it worth testing with 1.66.2? Richard On Aug 24, 10:05 am, mdipierro wrote: > I have double checked and it seems to me this has been fixed about a > couple of months ago (before your post). > The problem is that data stored before this was fixed may contain the > full path. > > Can you verify the problem is fixed in 1.66.2? > > Massimo > > On Aug 23, 6:58 pm, Richard wrote: > > > I would like to upgrade my web2py when this is fixed, so is it worth > > creating an issue on Google Code to track it? > > Or has it already been fixed? > > > Richard > > > On Aug 20, 4:26 pm, Richard wrote: > > > > great! > > > Apparently some old versions of IE include the full path. > > > > Richard > > > > On Aug 19, 5:39 pm, mdipierro wrote: > > > > > Yes, this may be a bug on windows. I will fix it. > > > > > On Aug 18, 9:04 pm, Richard wrote: > > > > > > hello, > > > > > > From an upload form should request.vars..filename contain > > > > > the original file basename, full path, or the raw string of whatever > > > > > was in content-disposition? > > > > > I had assumed it was the basename but from some error tickets found it > > > > > must be the raw string. > > > > > > Would it be worth parsing this variable into something consistent? > > > > > On my Linux box I am occasionally getting filenames like "C:\ > > > > > \Documents and Settings\\user\\Desktop\\file.txt", which can't be > > > > > parsed with os.path.basename(). > > > > > > Richard --~--~-~--~~~---~--~~ 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:29201] Re: Left Join Failures
yeah I read howesc's diagnosis of the problem (and filed a bug report with that explanation), but howesc was not able to solve the problem until you posted a solution. You said his query was fundamentally wrong. So I was wondering how to do multiple joins properly in web2py, because I am also facing the same problem. Richard On Aug 24, 10:01 am, mdipierro wrote: > howesc explained it in his posts: "that mixing the join syntax has > operator > precedence issues, and that Postgres follows the standard while other > databases let you get away with the "incorrect" > syntax:http://archives.postgresql.org/pgsql-general/2006-09/msg01046.php"; > > Massimo > > On Aug 23, 6:47 pm, Richard wrote: > > > hi Massimo, > > > you mentioned that the initial query was invalid (http:// > > code.google.com/p/web2py/issues/detail?id=52). > > Could you clarify what was invalid and the proper way to do multiple > > joins? > > > Richard > > > On Aug 17, 4:37 am, howesc wrote: > > > > Thanks for the tip! A little tweaking to your suggestion makes it > > > work: > > > > c=db.concert > > > cp=db.concert_purchases > > > a=db.artist > > > v=db.venue > > > af=db.audiofile > > > test = db(cp.auth_user==3)(c.id==cp.concert)(cp.expires>'2009-08-08 > > > 09:46:23'). > > > select(c.name, c.id, cp.date, a.name, v.name, c.date, > > > af.file,left=(c.on((c.venue==v.id) & (v.name != None)), > > > cp.on((cp.concert==c.id) & (cp.concert != > > > None)), > > > a.on((a.id==c.artist) & (a.name != None)), > > > af.on(af.concert==c.id)), orderby=~cp.date) > > > > I put in where clause restrictions to make some of the left joins not > > > really left joins, I probably don't need to do that for this > > > particular query. > > > > thanks again for the suggestion to help me re-craft the query! > > > > christian > > > > On Aug 14, 12:38 am, mdipierro wrote: > > > > > Are you sure this does not work? > > > > > c=db.concert > > > > cp=db.concert_purchases > > > > a=db.artist > > > > db(cp.auth_user==3)(c.id==cp.concert)(cp.expires>'2009-08-08 > > > > 09:46:23').select(c.name, c.id, cp.date, a.name, v.name, c.date, > > > > af.file,left=(c.on(c.value==v.id),cp.on(cp.concert==c.id),a.on > > > > (a.id==c.artist)), orderby=~cp.date) > > > > > Massimo > > > > > On Aug 12, 9:09 pm, Richard wrote: > > > > > > hi Christian, > > > > > I also just got this error message when testing a migration from > > > > > sqlite to postgres. Thanks for the diagnosis of the problem. > > > > > Have you found a work around yet using the DAL? > > > > > Richard > > > > > > On Aug 10, 4:56 pm, howesc wrote: > > > > > > > This is in Postgres. > > > > > > > I did a little digging, and apparently mixing the JOIN syntax is a > > > > > > problem. So if i re-write thequeryin this fashion it works: > > > > > > > SELECT c.name, c.id, cp.date, a.name, v.name, c.date, af.file > > > > > > FROM venue v > > > > > > JOIN concert c ON c.venue=v.id > > > > > > JOIN concert_purchases cp ON cp.concert=c.id > > > > > > JOIN artist a ON a.id=c.artist > > > > > > LEFT JOIN audiofile af ON af.concert=c.id > > > > > > WHERE cp.auth_user=3 > > > > > > AND c.id=cp.concert > > > > > > AND cp.expires>'2009-08-08 09:46:23' > > > > > > ORDER BY cp.date DESC; > > > > > > > some others have suggested that mixing the join syntax has operator > > > > > > precedence issues, and that Postgres follows the standard while > > > > > > other > > > > > > databases let you get away with the "incorrect" > > > > > > syntax:http://archives.postgresql.org/pgsql-general/2006-09/msg01046.phphttp.. > > > > > > > based on their analysis a standard compliant SQL parser will > > > > > > interpret > > > > > > the web2py generatedquerylike this: > > > > > > SELECT concert.name, concert.id, concert_purchases.date, > > > > > > artist.name, > > > > > > venue.name, concert.date, audiofile.file FROM venue, concert, > > > > > > concert_purchases, (artist LEFT JOIN audiofile ON > > > > > > audiofile.concert=concert.id) WHERE > > > > > > concert_purchases.auth_user=3 > > > > > > AND concert.id=concert_purchases.concert) AND > > > > > > concert_purchases.expires>'2009-08-08 09:46:23') AND > > > > > > artist.id=concert.artist) AND venue.id=concert.venue) ORDER BY > > > > > > concert_purchases.date DESC; > > > > > > > note the added parens around the last item in the from clause and > > > > > > the > > > > > > LEFT JOIN item - hence concert is not visible. if i re-write it > > > > > > knowing the operator precedence like this: > > > > > > > SELECT concert.name, concert.id, concert_purchases.date, > > > > > > artist.name, > > > > > > venue.name, concert.date, audiofile.file > > > > > > FROM venue, artist, > > > > > > concert_purchases, concert LEFT JOIN audiofile ON > > > > > > audiofile.concert=concert.id WHERE concert_purchases.auth_user=3 > > > > > > AND concert.id=concert_purchases.concert) AND > > > > > > concert_purchases.e
[web2py:29202] Re: web2py, bigtable and the '09 DAL
5 M?! Clearly this is more than just source! On Sun, Aug 23, 2009 at 10:33 PM, dlypka wrote: > > Yarko Tymciurak: > > I have the Proof of Concept DALnr App ready in a 5 meg ZIP file. > > Please give me your email to send it to, or advise where I can post > the zip file. > > Thanks. > > > > --~--~-~--~~~---~--~~ 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:29203] Re: how do I upload data to GAE database tables
thanks victor, On Mon, Aug 24, 2009 at 7:00 AM, Victor wrote: > > I dunno, but this might be what you're looking for. > http://code.google.com/appengine/docs/python/tools/uploadingdata.html > Cheers > Victor > > On Aug 21, 8:53 am, durga wrote: > > how do I upload default data to GAE database tables like we do it in > > admin app using CSV file > > > --~--~-~--~~~---~--~~ 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:29204] ticket events
hello, I would like to create an RSS feed of error tickets generated by my app. I was planning to create a CRON job with scripts/tickets2db.py to load them into the database, and then generate an RSS feed from the database. But before I start I want to check if there is a better way, or existing code for this. Richard --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---