[web2py:36941] Re: Recaptcha not working in Login
Hi ed I assume you upgraded your web2py to the latest svn version Now you can do : def login(): auth.settings.login_catpcha = Recaptcha (request,public_key,private_key) form = auth.login() see the auth.settings.login_captcha - not auth.settings.captcha- ? may be here's your problem I tested that and it works fine for me On Dec 10, 6:42 am, ed edbi...@rocketmail.com wrote: Hi Massimo, I upgraded my web2py to the latest version and applied your code, the Recaptcha still does not show. Here is the page source. - h2Alumni Log-In/h2 br pNote: Please register first before log-in. To display a new two letter /p pnbsp nbsp nbsp nbsp nbsp word, click 'Get a new challenge' button in Recaptcha box./p br form action= enctype=multipart/form-data method=posttabletr id=auth_user_email__rowtdlabel for=auth_user_email id=auth_user_email__labelEmail Address: /label/td tdinput class=email id=auth_user_email name=email type=text value= //tdtd/td/tr tr id=auth_user_password__row tdlabel for=auth_user_password id=auth_user_password__labelPassword: /label/td tdinput class=password id=auth_user_password name=password type=password value= /td td/td/tr tr id=submit_record__row td/td tdinput type=submit value=Submit /input onclick=window.location='/alumni/default/index'; type=button value=Cancel //td td/td/tr /tablediv class=hiddeninput name=_next type=hidden /input name=_formkey type=hidden value=6cef9bcb-5093-40ff-8526-2dd6de807b4b /input name=_formname type=hidden value=login //div/form img src=/alumni/static/images/space.gif width=20 height=200 // td div class=flash/divbrbr/tr trtd colspan=10 class=footer pCopyright copy; 2009 - Powered by a href=http://www.web2py.com;web2py/a/p/td /tr/table/div/body/html Thank you again. Ed On Dec 4, 2:24 pm, mdipierro mdipie...@cs.depaul.edu wrote: I am puzzled. Does it show or does it not show. What do you see in the page source? On Dec 4, 12:17 am, ed edbi...@rocketmail.com wrote: Hi Massimo, I now understand that it's a special case. I copied your code and restarted the server, but still auth.settings.login_captcha doesn't work. Ed On Dec 4, 1:19 pm, mdipierro mdipie...@cs.depaul.edu wrote: Now I understand better. It does not work because the recaptcha has to be inserted in a form=SQLFORM after it is defined but before it is acceted. Since you are using form=auth.login() this function creates the form and accepts in one step. It cannot be done without modifying gluon tools. I have done it, so please try: def login(): from gluon.tools import Recaptcha auth.settings.login_catpcha = Recaptcha (request,public_key,private_key) form = auth.login() form[0][-1][1].append(INPUT(_type='button', _value='Cancel',_onclick=window.location='%s';\ % URL(r=request,f='index'))) return dict(form=form) On Dec 3, 8:53 pm, ed edbi...@rocketmail.com wrote: Hi Massimo, The code does not display the recaptcha. Inserted code that displayed recaptcha but still failed to validate recaptcha words. I am baffled why the code works perfectly with the Registration and it doesn't with Login. Thanks again. Ed On Dec 3, 12:45 pm, mdipierro mdipie...@cs.depaul.edu wrote: Does it work if you do it this way? deflogin(): from gluon.tools importRecaptcha auth.settings.catpcha =Recaptcha(request,public_key,private_key) form = auth.login() form[0][-1][1].append(INPUT(_type='button', _value='Cancel',_onclick=window.location='%s';\ % URL(r=request,f='index'))) return dict(form=form) Massimo On Dec 2, 9:46 pm, ed edbi...@rocketmail.com wrote: Hi, I implementedRecaptchain my Registration app and works very well. But when I implemented the same inLoginit does not check the two words which Recaptch requires. The following is the code: -- -- Models -- db.py auth.define_tables() auth.settings.login='email:password' from gluon.tools importRecaptcha auth.settings.captcha =Recaptcha(request, '6LcUfwkAACt0m', '6LcUfwkAAcUWLVn') -- Controllers -- default.py public_key = '6LcUfwkAACt0m' private_key = '6LcUfwkAAPcUWLVn' def user(): if request.args(0)=='reg_col': from gluon.tools importRecaptcha match_it = IS_EXPR('value==%s' % repr(request.vars.password), error_message='passwords do not match') form = SQLFORM.factory( Field('emailad', 'emailad',requires=[IS_LENGTH (maxsize=30,error_message='Maximum length 30 chars..'),IS_EMAIL(),
[web2py:36942] Re: Recaptcha not working in Login
what I can't understand actually is that : using latest svn version and removing lines : ''' if self.settings.login_captcha != None: form[0].insert(-1, TR('', self.settings.login_captcha, ''))''' from tools.py I managed to have ed's code running : so something like this : if request.args(0) == 'login': from gluon.tools import Recaptcha form = auth.login() form[0].insert(-1, TR('', Recaptcha(request, 'pub', 'private')) form[0][-1][1].append(INPUT (_type='button',_value='Cancel',_onclick=window.location='%s';%URL (r=request,f='index'))) return dict(form=form) is working , regardless of the fact that I inserted Recaptcha field afteter form = auth.login() did I get it wrong ? -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:36943] Re: e-Store Appliance in GAE
I got the web2py estore app working on Google App Engine here: http://web2py-estore.appspot.com/ And my modded version of the code is here: http://code.google.com/p/web2py-estore/ There is still a lot more I want to do with it (check the wishlist: http://code.google.com/p/web2py-estore/wiki/WishList). I would be keen to collaborate with someone on this. Richard On Dec 9, 2:26 pm, David digitalcry...@gmail.com wrote: Just wanted to make a note that the eStore appliance doesn't work out of the box on my PostgreSQL server. It does work with SQLite however. On Dec 8, 8:04 pm, David digitalcry...@gmail.com wrote: I've been working on a multi-user cart/store front myself but I've not gotten into it too much as I've been sick lately. Hopefully I can make some more progress soon. I started with Massimo's cart appliance as a guide to give me an idea of what needs to be accomplished. On Dec 8, 11:35 am, Thadeus Burgess thade...@thadeusb.com wrote: There are a couple in the works that I know of. -Thadeus On Tue, Dec 8, 2009 at 9:46 AM, Leandro - ProfessionalIT lsever...@gmail.com wrote: This is possible ? Run e-Store Appliance in GAE or exists another e- Commerce application made with Web2Py ? -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/web2py?hl=en. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:36944] Re: Creating a CSV file from data
There is probably nothing wrong with fetch data via SQL, but I have no idea how to write that complicated SQL query where getting data from 7 or 8 tables and as I made the calculations function already for viewing I was looking for a way to just send it to a CSV. I´ll look into the You can use the python csv module directly: It sounds promising. Kenneth On Dec 9, 7:37 pm, Thadeus Burgess thade...@thadeusb.com wrote: Is there something wrong with the following? results = db(db.table.field == searchvar)(db.table.field2 == searchvar2).select() results.export_to_csv(outputfile, delimiter=',', quotechar='', qouting=csv.QOUTE_MINIMAL, represent=False) -Thadeus On Wed, Dec 9, 2009 at 7:24 AM, Hernan Olivera lholiv...@gmail.com wrote: 2009/12/9 GhostRider kenneth.t.lundst...@gmail.com: I think the columns should the separated with a ; and not , to work better i Microsofts world. It depends on the system language settings; both are correct, but you must be carefull about decimal point or comma (i.e.: don't use comma as separator and decimal point :) -- Hernan Olivera -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/web2py?hl=en. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:36945] Re: set web2py application into SVN
How can i commit my code everyday into SVN to and How also can i make synchronize my code with the SVN using web2py. I want to make something like eclipse subversion plugin. Thanks On Dec 9, 7:02 pm, mdipierro mdipie...@cs.depaul.edu wrote: cd applications/myapp svnadmin create /path/to/repositorysvnaddsvncommit -m myapp On Dec 9, 7:45 am, Neveen Adel nevo.a...@gmail.com wrote: How can i commit aweb2pyapplicationintoSVN?? Is that applicable ?? if no, how can i do something like that on web2pyapplication. Thanks Neveen -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:36946] changing ondelete from ='CASCADE' to ='SET NULL' on mysql causes error
Hi, In web2py 1.72.3, when I change db.py from: db.define_table('report_segment' , Field ('acgh_sg_id',db.acgh_segment,ondelete='CASCADE'), Field ('acgh_report_id',db.acgh_report,ondelete='CASCADE') ) to: db.define_table('report_segment' , Field('acgh_sg_id',db.acgh_segment,ondelete='SET NULL'), Field ('acgh_report_id',db.acgh_report,ondelete='CASCADE') ) I get an error: Traceback (most recent call last): File /home/maciek/workspace/imid2py/gluon/restricted.py, line 184, in restricted exec ccode in environment File /home/maciek/workspace/imid2py/applications/welcome/models/ db.py, line 285, in module Field('acgh_report_id',db.acgh_report,ondelete='CASCADE') File /home/maciek/workspace/imid2py/gluon/sql.py, line 1205, in define_table query = t._create(migrate=migrate, fake_migrate=fake_migrate) File /home/maciek/workspace/imid2py/gluon/sql.py, line 1647, in _create fake_migrate=fake_migrate) File /home/maciek/workspace/imid2py/gluon/sql.py, line 1701, in _migrate self._db._execute(sub_query) File /home/maciek/workspace/imid2py/gluon/sql.py, line 879, in lambda self._execute = lambda *a, **b: self._cursor.execute(*a, **b) File /usr/lib/pymodules/python2.6/MySQLdb/cursors.py, line 166, in execute self.errorhandler(self, exc, value) File /usr/lib/pymodules/python2.6/MySQLdb/connections.py, line 35, in defaulterrorhandler raise errorclass, errorvalue OperationalError: (1061, Duplicate key name 'acgh_sg_id__idx') (what's interesting the error is reported in db.py in the line following the actual change) I observed similar errors when adding unique=True to a table definition. Any clues? -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:36947] Re: modified plugin_tagging
fixed a bug that did not allow the deletion of tags http://www.delarue-berlin.de/tmp/web2py.plugin.tagging.1.w2p On Nov 28, 8:24 pm, selecta gr...@delarue-berlin.de wrote: Hey there I just modified thetaggingplugin so multiple users can tag one record, a tag cloud can be displayed for each record, for each table, and for all tags. I did not test it very much, please post improvements!http://www.delarue-berlin.de/tmp/web2py.plugin.tagging.gz -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:36948] Re: validator less than
^bump^ -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:36949] Re: e-Store Appliance in GAE
fantastic! On Dec 10, 5:37 am, Richard richar...@gmail.com wrote: I got the web2py estore app working on Google App Engine here:http://web2py-estore.appspot.com/ And my modded version of the code is here:http://code.google.com/p/web2py-estore/ There is still a lot more I want to do with it (check the wishlist:http://code.google.com/p/web2py-estore/wiki/WishList). I would be keen to collaborate with someone on this. Richard On Dec 9, 2:26 pm, David digitalcry...@gmail.com wrote: Just wanted to make a note that the eStore appliance doesn't work out of the box on my PostgreSQL server. It does work with SQLite however. On Dec 8, 8:04 pm, David digitalcry...@gmail.com wrote: I've been working on a multi-user cart/store front myself but I've not gotten into it too much as I've been sick lately. Hopefully I can make some more progress soon. I started with Massimo's cart appliance as a guide to give me an idea of what needs to be accomplished. On Dec 8, 11:35 am, Thadeus Burgess thade...@thadeusb.com wrote: There are a couple in the works that I know of. -Thadeus On Tue, Dec 8, 2009 at 9:46 AM, Leandro - ProfessionalIT lsever...@gmail.com wrote: This is possible ? Run e-Store Appliance in GAE or exists another e- Commerce application made with Web2Py ? -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/web2py?hl=en. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:36950] Re: changing ondelete from ='CASCADE' to ='SET NULL' on mysql causes error
No but try this: First do a migration in which you remove the field completely. Then do a migration in which you add the field again with the new attributes. Massimo On Dec 10, 7:13 am, Maciek Sykulski macie...@gmail.com wrote: Hi, In web2py 1.72.3, when I change db.py from: db.define_table('report_segment' , Field ('acgh_sg_id',db.acgh_segment,ondelete='CASCADE'), Field ('acgh_report_id',db.acgh_report,ondelete='CASCADE') ) to: db.define_table('report_segment' , Field('acgh_sg_id',db.acgh_segment,ondelete='SET NULL'), Field ('acgh_report_id',db.acgh_report,ondelete='CASCADE') ) I get an error: Traceback (most recent call last): File /home/maciek/workspace/imid2py/gluon/restricted.py, line 184, in restricted exec ccode in environment File /home/maciek/workspace/imid2py/applications/welcome/models/ db.py, line 285, in module Field('acgh_report_id',db.acgh_report,ondelete='CASCADE') File /home/maciek/workspace/imid2py/gluon/sql.py, line 1205, in define_table query = t._create(migrate=migrate, fake_migrate=fake_migrate) File /home/maciek/workspace/imid2py/gluon/sql.py, line 1647, in _create fake_migrate=fake_migrate) File /home/maciek/workspace/imid2py/gluon/sql.py, line 1701, in _migrate self._db._execute(sub_query) File /home/maciek/workspace/imid2py/gluon/sql.py, line 879, in lambda self._execute = lambda *a, **b: self._cursor.execute(*a, **b) File /usr/lib/pymodules/python2.6/MySQLdb/cursors.py, line 166, in execute self.errorhandler(self, exc, value) File /usr/lib/pymodules/python2.6/MySQLdb/connections.py, line 35, in defaulterrorhandler raise errorclass, errorvalue OperationalError: (1061, Duplicate key name 'acgh_sg_id__idx') (what's interesting the error is reported in db.py in the line following the actual change) I observed similar errors when adding unique=True to a table definition. Any clues? -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:36951] Re: validator less than
If there is a new calendar.js with both date and datetime I would take a pacth to replace the existing one. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:36952] Re: Recaptcha not working in Login
If you do it this way it will display but I am not sure it works properly. On Dec 10, 4:50 am, hamdy.a.farag hamdy.a.fa...@inbox.com wrote: what I can't understand actually is that : using latest svn version and removing lines : ''' if self.settings.login_captcha != None: form[0].insert(-1, TR('', self.settings.login_captcha, ''))''' from tools.py I managed to have ed's code running : so something like this : if request.args(0) == 'login': from gluon.tools import Recaptcha form = auth.login() form[0].insert(-1, TR('', Recaptcha(request, 'pub', 'private')) form[0][-1][1].append(INPUT (_type='button',_value='Cancel',_onclick=window.location='%s';%URL (r=request,f='index'))) return dict(form=form) is working , regardless of the fact that I inserted Recaptcha field afteter form = auth.login() did I get it wrong ? -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:36953] form.vars.image_filename set to blank on file delete
on page 198 of the book, when a file is deleted, how does image_filename get set to blank? -wes -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:36954] Re: Recaptcha not working in Login
well, it worked for me and I was able to login as well may be some other guy can test it as well -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:36955] Possible Bug (I think) in count()
In the table this is taken from, activo is either 1 or 0. In the table which is legacy MySQL it is defined as INT(1) These are the results I am getting: In [46]: db(db.direccionesgrupo.activo == 1).count() Out[46]: 58L In [48]: a =db().select(db.direccionesgrupo.activo.sum()) In [49]: print a --- print(a) SUM(direccionesgrupo.activo) 112 In [51]: b = db(db.direccionesgrupo.activo==1).select('count(*)') In [52]: print b --- print(b) count(*) 58 The correct value is the one done with the aggregate sum(). -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:36956] Re: Creating a CSV file from data
What datatype are you using for the data currently? The python CSV module can get its data from any sequence, so if you already have all the info in a list use csv.writer if it's a in a list of dictionary objects, then use csv.DictWriter. Refer to http://docs.python.org/library/csv.html With more info on your current data structure we may be able to provide more guidance. ~Brian On Dec 10, 6:10 am, GhostRider kenneth.t.lundst...@gmail.com wrote: There is probably nothing wrong with fetch data via SQL, but I have no idea how to write that complicated SQL query where getting data from 7 or 8 tables and as I made the calculations function already for viewing I was looking for a way to just send it to a CSV. I´ll look into the You can use the python csv module directly: It sounds promising. Kenneth On Dec 9, 7:37 pm, Thadeus Burgess thade...@thadeusb.com wrote: Is there something wrong with the following? results = db(db.table.field == searchvar)(db.table.field2 == searchvar2).select() results.export_to_csv(outputfile, delimiter=',', quotechar='', qouting=csv.QOUTE_MINIMAL, represent=False) -Thadeus On Wed, Dec 9, 2009 at 7:24 AM, Hernan Olivera lholiv...@gmail.com wrote: 2009/12/9 GhostRider kenneth.t.lundst...@gmail.com: I think the columns should the separated with a ; and not , to work better i Microsofts world. It depends on the system language settings; both are correct, but you must be carefull about decimal point or comma (i.e.: don't use comma as separator and decimal point :) -- Hernan Olivera -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/web2py?hl=en. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:36958] Re: Validation when using crud.create
Massimo, I think you mean db.companyactivity.company.requires=[IS_IN_DB(db,db.company.id,'% (companyname)s'),IS_NOT_IN_DB(db (db.companyactivity.activity==request.vars.activity),db.companyactivity.company,error_message='already in database')] Yes, I am sorry a typo introduced on translation. The problem still exists, in appadmin all the validators of this kind work, in my own cms based on crud functions they do not work. Annet -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:36962] Re: Possible Bug (I think) in count()
web2py for portability reasons defines: 'boolean': 'CHAR(1)', If you are using a legacy database and you are not using a CHAR(1) for boolean, you need to use string instead of boolean when you define the field in web2py. Massimo On Dec 10, 11:28 am, Benigno bca...@albendas.com wrote: Hmmm, it translates on its own 1 to True like this: SELECT count(*) FROM direccionesgrupo WHERE direccionesgrupo.activo='T'; Which results in 58 rows Whereas if it does SELECT count(*) FROM direccionesgrupo WHERE direccionesgrupo.activo=1; Then result is 112 MySQL seems to take anything it doesnt understand as a 0 and returns all the values = 0. (If instead of 'T' I enter any other char value still gets the ceroes as if it was retreiving false values). True or false are like SELECT count(*) FROM direccionesgrupo WHERE activo=TRUE; or SELECT count(*) FROM direccionesgrupo WHERE activo=FALSE; for MySQL. Which are actually just aliases TRUE for 1, FALSE for 0. Probably need to change the SELECT generated to 1 or 0, or not change value from 1 to 'T' on its own. If instead of ==1 I use ==True, same result (though I guess you are aware of that). db(db.direccionesgrupo.activo==True)._select('count(*)') Out[3]: SELECT count(*) FROM direccionesgrupo WHERE direccionesgrupo.activo='T'; On Dec 10, 5:38 pm, mdipierro mdipie...@cs.depaul.edu wrote: print db(db.direccionesgrupo.activo==1)._select('count(*)') do you see anything wrong in the generated sql? On Dec 10, 9:48 am, Benigno bca...@albendas.com wrote: In the table this is taken from, activo is either 1 or 0. In the table which is legacy MySQL it is defined as INT(1) These are the results I am getting: In [46]: db(db.direccionesgrupo.activo == 1).count() Out[46]: 58L In [48]: a =db().select(db.direccionesgrupo.activo.sum()) In [49]: print a --- print(a) SUM(direccionesgrupo.activo) 112 In [51]: b = db(db.direccionesgrupo.activo==1).select('count(*)') In [52]: print b --- print(b) count(*) 58 The correct value is the one done with the aggregate sum(). -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:36963] Re: validator on update
You can change the behavior in appadmin if you like. Just change ignore_rw=True to False in appadmin.py. Massimo On Dec 10, 11:32 am, annet annet.verm...@gmail.com wrote: Massimo, Is the problem when you use appadmin? update would not work in this case because appadmin (by design) ignores writable=False. Yes, it's an appadmin problem, when I update records using my cms application the modified_on fields are update correctly. Thanks. Annet. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:36965] Re: Possible Bug (I think) in count()
On a second thought. If you are summing it perhaps it is not a 'boolean' or a 'string' but an 'integer' that you wish to use as a boolean with 1,0 instead of True/False. Massimo On Dec 10, 11:44 am, mdipierro mdipie...@cs.depaul.edu wrote: web2py for portability reasons defines: 'boolean': 'CHAR(1)', If you are using a legacy database and you are not using a CHAR(1) for boolean, you need to use string instead of boolean when you define the field in web2py. Massimo On Dec 10, 11:28 am, Benigno bca...@albendas.com wrote: Hmmm, it translates on its own 1 to True like this: SELECT count(*) FROM direccionesgrupo WHERE direccionesgrupo.activo='T'; Which results in 58 rows Whereas if it does SELECT count(*) FROM direccionesgrupo WHERE direccionesgrupo.activo=1; Then result is 112 MySQL seems to take anything it doesnt understand as a 0 and returns all the values = 0. (If instead of 'T' I enter any other char value still gets the ceroes as if it was retreiving false values). True or false are like SELECT count(*) FROM direccionesgrupo WHERE activo=TRUE; or SELECT count(*) FROM direccionesgrupo WHERE activo=FALSE; for MySQL. Which are actually just aliases TRUE for 1, FALSE for 0. Probably need to change the SELECT generated to 1 or 0, or not change value from 1 to 'T' on its own. If instead of ==1 I use ==True, same result (though I guess you are aware of that). db(db.direccionesgrupo.activo==True)._select('count(*)') Out[3]: SELECT count(*) FROM direccionesgrupo WHERE direccionesgrupo.activo='T'; On Dec 10, 5:38 pm, mdipierro mdipie...@cs.depaul.edu wrote: print db(db.direccionesgrupo.activo==1)._select('count(*)') do you see anything wrong in the generated sql? On Dec 10, 9:48 am, Benigno bca...@albendas.com wrote: In the table this is taken from, activo is either 1 or 0. In the table which is legacy MySQL it is defined as INT(1) These are the results I am getting: In [46]: db(db.direccionesgrupo.activo == 1).count() Out[46]: 58L In [48]: a =db().select(db.direccionesgrupo.activo.sum()) In [49]: print a --- print(a) SUM(direccionesgrupo.activo) 112 In [51]: b = db(db.direccionesgrupo.activo==1).select('count(*)') In [52]: print b --- print(b) count(*) 58 The correct value is the one done with the aggregate sum(). -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:36966] Unable to install application application name
Hi, I am a new web2py user. During early development, I have been running web2py on my laptop. Now, it's time to transfer this code over to an actual server. Unfortunately, when I try to install the web2py tarball using the admin interface on my server, I get the error: Unable to install application 'application name' To prepare the web2py application for installation, I clicked on clean and then pack all in the admin interface. This downloaded a web2py.app.application_name.w2p.gz file. I uploaded this to my server, started web2py and then through the admin interface, I selected: Upload Existing Application, then selected the web2py.app.application_name.w2p.gz file and finally named it the application_name. However, when I do this, I get the error: Unable to install application 'application name' Any thoughts on why this would be? Is there a log file somewhere that I could look at? I would be willing to share the application tarball with someone if they could help. The tarball, though, is 32 megs so I would have to put it up on my website. Jon -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:36967] Re: validator less than
sorry the original problem was lost in the thread. Why isn't the problem solved by the validator that I posted? If you want to compare from_time with to_time then to_time should bot be None unless you tell us how should the validation be performed in this case. On Dec 10, 11:42 am, annet annet.verm...@gmail.com wrote: Massimo and Denes, So, I guess my problem won't be solved. I don't understand why request.vars.to_time is None. I am using form=crud.create(table) and form=crud.update(table,...) so request.vars.to_time cannot be None can it? Annet. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py:36968] Unable to install application application name
It sounds like it is a permission error. Make sure the user that is running the web server (www-data perhaps?) has write access to the web2py folders. -Thadeus On Thu, Dec 10, 2009 at 12:07 PM, jonfroehlich jonfroehl...@gmail.com wrote: ughts on why this would be? Is there a log file somewhere that I could lo -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:36969] Re: Unable to install application application name
Are you actually using application_name? Special characters () and spaces are not allowed in application names. If this is not the issue could you tell us more about the web2py version/date? Massimo On Dec 10, 12:07 pm, jonfroehlich jonfroehl...@gmail.com wrote: Hi, I am a new web2py user. During early development, I have been running web2py on my laptop. Now, it's time to transfer this code over to an actual server. Unfortunately, when I try to install the web2py tarball using the admin interface on my server, I get the error: Unable to install application 'application name' To prepare the web2py application for installation, I clicked on clean and then pack all in the admin interface. This downloaded a web2py.app.application_name.w2p.gz file. I uploaded this to my server, started web2py and then through the admin interface, I selected: Upload Existing Application, then selected the web2py.app.application_name.w2p.gz file and finally named it the application_name. However, when I do this, I get the error: Unable to install application 'application name' Any thoughts on why this would be? Is there a log file somewhere that I could look at? I would be willing to share the application tarball with someone if they could help. The tarball, though, is 32 megs so I would have to put it up on my website. Jon -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:36970] Re: Unable to install application application name
On Dec 10, 12:07 pm, jonfroehlich jonfroehl...@gmail.com wrote: Hi, I am a new web2py user. During early development, I have been running web2py on my laptop. Now, it's time to transfer this code over to an actual server. Unfortunately, when I try to install the web2py tarball using the admin interface on my server, I get the error: Unable to install application 'application name' To prepare the web2py application for installation, I clicked on clean and then pack all in the admin interface. This downloaded a web2py.app.application_name.w2p.gz file. I uploaded this to my server, started web2py and then through the admin interface, I selected: Upload Existing Application, then selected the web2py.app.application_name.w2p.gz file and finally named it the application_name. However, when I do this, I get the error: Unable to install application 'application name' Without looking at this, I would guess that *.w2p.gz should probably be renamed *.w2p - the problem may be no more than that. - Yarko Any thoughts on why this would be? Is there a log file somewhere that I could look at? I would be willing to share the application tarball with someone if they could help. The tarball, though, is 32 megs so I would have to put it up on my website. Jon -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py:36971] Re: Unable to install application application name
I am able to install .w2p.gz apps using the latest devel version. Also, when he says application_name the brackets mean insert a real app name. He just decided to not include his app name to be more understandable for us. The problem could be anything (see thats why using catchall exceptions don't benefit!). For debugging, personally I would edit the admin app and disable the try:catch statements, to determine the real error. -Thadeus On Thu, Dec 10, 2009 at 12:26 PM, Yarko Tymciurak resultsinsoftw...@gmail.com wrote: On Dec 10, 12:07 pm, jonfroehlich jonfroehl...@gmail.com wrote: Hi, I am a new web2py user. During early development, I have been running web2py on my laptop. Now, it's time to transfer this code over to an actual server. Unfortunately, when I try to install the web2py tarball using the admin interface on my server, I get the error: Unable to install application 'application name' To prepare the web2py application for installation, I clicked on clean and then pack all in the admin interface. This downloaded a web2py.app.application_name.w2p.gz file. I uploaded this to my server, started web2py and then through the admin interface, I selected: Upload Existing Application, then selected the web2py.app.application_name.w2p.gz file and finally named it the application_name. However, when I do this, I get the error: Unable to install application 'application name' Without looking at this, I would guess that *.w2p.gz should probably be renamed *.w2p - the problem may be no more than that. - Yarko Any thoughts on why this would be? Is there a log file somewhere that I could look at? I would be willing to share the application tarball with someone if they could help. The tarball, though, is 32 megs so I would have to put it up on my website. Jon -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py:36972] Re: Unable to install application application name
On Dec 10, 2009, at 10:33 AM, Thadeus Burgess wrote: I am able to install .w2p.gz apps using the latest devel version. Also, when he says application_name the brackets mean insert a real app name. He just decided to not include his app name to be more understandable for us. The problem could be anything (see thats why using catchall exceptions don't benefit!). For debugging, personally I would edit the admin app and disable the try:catch statements, to determine the real error. app_install() should probably return a message along with its failure flag. It doesn't seem to me that .w2p.gz should work, given the app_install logic: if filename[-4:] == '.w2p': extension = 'w2p' elif filename[-7:] == '.tar.gz': extension = 'tar.gz' else: extension = 'tar' upname = apath('../deposit/%s.%s' % (app, extension), request) -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:36973] Re: download file name - other than file [ Solved ]
# save filename on save to file name field try: if len(request.vars.resume_bin.filename): request.vars.resume_bin_filename = request.vars.resume_bin.filename except: pass form=crud.update(.) # change the 'file' text in the form to the actual file name try: form[0][form_field_number][1][0][2][0]=form.latest.resume_bin_filename except: pass On Wed, Dec 9, 2009 at 10:15 PM, Wes James compte...@gmail.com wrote: I've been looking on the list to see if I can see any examples to show the real file name by the input field on the form. The generic form is like: field label text, field input box, [file|delete] If a file has been uploaded. How can I have it show the file name instead of file on the field on the form? thx, -wes -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:36974] Re: Unable to install application application name
Hi Massimo, I am not actually using application_name -- I am using the name hydroserver (without the quotes). Sorry for the confusion. The web2py version I am running is: web2py Version 1.72.3 (2009-11-10 09:17:13) My web server box is running Windows Server 2008. When attempting to install the hydroserver web2py application, I am the admin on that machine. Jon On Dec 10, 10:25 am, mdipierro mdipie...@cs.depaul.edu wrote: Are you actually using application_name? Special characters () and spaces are not allowed in application names. If this is not the issue could you tell us more about the web2py version/date? Massimo On Dec 10, 12:07 pm, jonfroehlich jonfroehl...@gmail.com wrote: Hi, I am a new web2py user. During early development, I have been running web2py on my laptop. Now, it's time to transfer this code over to an actual server. Unfortunately, when I try to install the web2py tarball using the admin interface on my server, I get the error: Unable to install application 'application name' To prepare the web2py application for installation, I clicked on clean and then pack all in the admin interface. This downloaded a web2py.app.application_name.w2p.gz file. I uploaded this to my server, started web2py and then through the admin interface, I selected: Upload Existing Application, then selected the web2py.app.application_name.w2p.gz file and finally named it the application_name. However, when I do this, I get the error: Unable to install application 'application name' Any thoughts on why this would be? Is there a log file somewhere that I could look at? I would be willing to share the application tarball with someone if they could help. The tarball, though, is 32 megs so I would have to put it up on my website. Jon -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:36975] Re: Unable to install application application name
web2py.app.hydroserver.w2p.gz (without the quotes) is the exact name that web2py created for me when I selected the option pack all in the admin interface. Once I dropped the .gz--in other words, renamed web2py.app.hydroserver.w2p.gz to web2py.app.hydroserver.w2p, the application installed fine. Thanks to all for your responses. It looks like we should mark the code that Jonathan found as a bug, given that web2py generated the *.w2p.gz file that I used. Jon On Dec 10, 10:37 am, Jonathan Lundell jlund...@pobox.com wrote: On Dec 10, 2009, at 10:33 AM, Thadeus Burgess wrote: I am able to install .w2p.gz apps using the latest devel version. Also, when he says application_name the brackets mean insert a real app name. He just decided to not include his app name to be more understandable for us. The problem could be anything (see thats why using catchall exceptions don't benefit!). For debugging, personally I would edit the admin app and disable the try:catch statements, to determine the real error. app_install() should probably return a message along with its failure flag. It doesn't seem to me that .w2p.gz should work, given the app_install logic: if filename[-4:] == '.w2p': extension = 'w2p' elif filename[-7:] == '.tar.gz': extension = 'tar.gz' else: extension = 'tar' upname = apath('../deposit/%s.%s' % (app, extension), request) -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py:36976] Re: Unable to install application application name
The extension should have been fixed? I remember a making a patch for this. Also web2py should be allowing a .gz extension, as that was part of the patch. -Thadeus On Thu, Dec 10, 2009 at 1:01 PM, jonfroehlich jonfroehl...@gmail.com wrote: ks to all for your responses. It looks like we should mark the code that Jonathan found as a bug, given that web2py generated the *.w2p.gz file that I us -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:36977] Switch from http to https within app
I am new to web2py and Apache w/mod_ssl and I have been searching for a solution related to this topic but I must be missing a basic understanding of the necessary pieces in order to accomplish this. Our web2py apache setup seems to be fine. I can access our app's pages using both http and https if I manually add the 's' to the url. What we are trying to do is smoothly transition from one controller/ function using http to another using https. Example, a user arrives at http://init/default/index and then the user selects ‘Login’ and they are sent to https:/init/default/login. We need some controller functions to use http and some https. Can this be done from within the controller/function? If not, what is the ‘best practice’ approach to accomplishing this? - Jay -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:36978] Re: Unable to install application application name
Yes this has been fixed in trunk. On Dec 10, 1:05 pm, Thadeus Burgess thade...@thadeusb.com wrote: The extension should have been fixed? I remember a making a patch for this. Also web2py should be allowing a .gz extension, as that was part of the patch. -Thadeus On Thu, Dec 10, 2009 at 1:01 PM, jonfroehlich jonfroehl...@gmail.com wrote: ks to all for your responses. It looks like we should mark the code that Jonathan found as a bug, given that web2py generated the *.w2p.gz file that I us -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py:36979] Switch from http to https within app
As long as you don't have a proxy between your users and the server something with request.env could be used def login(): if request.env.port != 443: redirect('https://'+request.env.http_host +'/app/default/logon') -wes On Thu, Dec 10, 2009 at 11:42 AM, Jay j...@unclehenrys.com wrote: I am new to web2py and Apache w/mod_ssl and I have been searching for a solution related to this topic but I must be missing a basic understanding of the necessary pieces in order to accomplish this. Our web2py apache setup seems to be fine. I can access our app's pages using both http and https if I manually add the 's' to the url. What we are trying to do is smoothly transition from one controller/ function using http to another using https. Example, a user arrives at http://init/default/index and then the user selects ‘Login’ and they are sent to https:/init/default/login. We need some controller functions to use http and some https. Can this be done from within the controller/function? If not, what is the ‘best practice’ approach to accomplishing this? - Jay -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:36980] Re: request.args and error handling
oh thanks a lot. On Nov 30, 12:34 am, mdipierro mdipie...@cs.depaul.edu wrote: request.args(index) On Nov 29, 10:05 am, vince lapcc...@gmail.com wrote: i've been doing lots of error handling with request.args. is that possible to have request.args[index] to return None instead of index out of range exception? -vince -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py:36981] Switch from http to https within app
Actually, I don't think it would matter if there were a proxy or not?? On Thu, Dec 10, 2009 at 1:06 PM, Wes James compte...@gmail.com wrote: As long as you don't have a proxy between your users and the server something with request.env could be used def login(): if request.env.port != 443: redirect('https://'+request.env.http_host +'/app/default/logon') -wes On Thu, Dec 10, 2009 at 11:42 AM, Jay j...@unclehenrys.com wrote: I am new to web2py and Apache w/mod_ssl and I have been searching for a solution related to this topic but I must be missing a basic understanding of the necessary pieces in order to accomplish this. Our web2py apache setup seems to be fine. I can access our app's pages using both http and https if I manually add the 's' to the url. What we are trying to do is smoothly transition from one controller/ function using http to another using https. Example, a user arrives at http://init/default/index and then the user selects ‘Login’ and they are sent to https:/init/default/login. We need some controller functions to use http and some https. Can this be done from within the controller/function? If not, what is the ‘best practice’ approach to accomplishing this? - Jay -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py:36982] Re: Unable to install application application name
I see, Massmo, I checked my emails and I had sent you the wrong patch, it only included the fix for content-type of the admin application, instead of the logic that allows you to install an app with a .gz extension as well just in case. When I get home, I will send you this second part of the patch . -Thadeus On Thu, Dec 10, 2009 at 1:51 PM, mdipierro mdipie...@cs.depaul.edu wrote: Yes this has been fixed in trunk. On Dec 10, 1:05 pm, Thadeus Burgess thade...@thadeusb.com wrote: The extension should have been fixed? I remember a making a patch for this. Also web2py should be allowing a .gz extension, as that was part of the patch. -Thadeus On Thu, Dec 10, 2009 at 1:01 PM, jonfroehlich jonfroehl...@gmail.com wrote: ks to all for your responses. It looks like we should mark the code that Jonathan found as a bug, given that web2py generated the *.w2p.gz file that I us -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py:36983] Re: Unable to install application application name
On Dec 10, 2009, at 11:51 AM, mdipierro wrote: Yes this has been fixed in trunk. If what I'm looking at is the trunk (I'm still a little fuzzy on hg updates), there's a problem between app_install() and w2p_update(). The former can deliver a filename: name.tar.gz. The latter converts this to name.tar.tar, if I'm reading it right. (Also, wouldn't it be good to handle name.tgz?) On Dec 10, 1:05 pm, Thadeus Burgess thade...@thadeusb.com wrote: The extension should have been fixed? I remember a making a patch for this. Also web2py should be allowing a .gz extension, as that was part of the patch. -Thadeus On Thu, Dec 10, 2009 at 1:01 PM, jonfroehlich jonfroehl...@gmail.com wrote: ks to all for your responses. It looks like we should mark the code that Jonathan found as a bug, given that web2py generated the *.w2p.gz file that I us -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:36984] Re: Unable to install application application name
The .gz was added by the browser upon download and that was fixed by the content time. I agree that the code in admin.py could use some cleaup. I'd be happy to take a patch to do it. On Dec 10, 2:56 pm, Jonathan Lundell jlund...@pobox.com wrote: On Dec 10, 2009, at 11:51 AM, mdipierro wrote: Yes this has been fixed in trunk. If what I'm looking at is the trunk (I'm still a little fuzzy on hg updates), there's a problem between app_install() and w2p_update(). The former can deliver a filename: name.tar.gz. The latter converts this to name.tar.tar, if I'm reading it right. (Also, wouldn't it be good to handle name.tgz?) On Dec 10, 1:05 pm, Thadeus Burgess thade...@thadeusb.com wrote: The extension should have been fixed? I remember a making a patch for this. Also web2py should be allowing a .gz extension, as that was part of the patch. -Thadeus On Thu, Dec 10, 2009 at 1:01 PM, jonfroehlich jonfroehl...@gmail.com wrote: ks to all for your responses. It looks like we should mark the code that Jonathan found as a bug, given that web2py generated the *.w2p.gz file that I us -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:36985] Re: Unable to install application application name
On Dec 10, 2:12 pm, Thadeus Burgess thade...@thadeusb.com wrote: I see, Massmo, I checked my emails and I had sent you the wrong patch, it only included the fix for content-type of the admin application, instead of the logic that allows you to install an app with a .gz extension as well just in case. When I get home, I will send you this second part of the patch . -Thadeus This is an excellent example of why web2py process would benefit from the code-review cycle (extra eyes - even your own - are useful; we are all busy, so things get missed; also the community is generally smarter than any one of us, so additional eyes can be beneficial, although limiting reviews to a small number of people has benefit). On Thu, Dec 10, 2009 at 1:51 PM, mdipierro mdipie...@cs.depaul.edu wrote: Yes this has been fixed in trunk. On Dec 10, 1:05 pm, Thadeus Burgess thade...@thadeusb.com wrote: The extension should have been fixed? I remember a making a patch for this. Also web2py should be allowing a .gz extension, as that was part of the patch. -Thadeus On Thu, Dec 10, 2009 at 1:01 PM, jonfroehlich jonfroehl...@gmail.com wrote: ks to all for your responses. It looks like we should mark the code that Jonathan found as a bug, given that web2py generated the *.w2p.gz file that I us -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/web2py?hl=en. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py:36986] Re: Unable to install application application name
On Dec 10, 2009, at 2:27 PM, Yarko Tymciurak wrote: On Dec 10, 2:12 pm, Thadeus Burgess thade...@thadeusb.com wrote: I see, Massmo, I checked my emails and I had sent you the wrong patch, it only included the fix for content-type of the admin application, instead of the logic that allows you to install an app with a .gz extension as well just in case. When I get home, I will send you this second part of the patch . -Thadeus This is an excellent example of why web2py process would benefit from the code-review cycle (extra eyes - even your own - are useful; we are all busy, so things get missed; also the community is generally smarter than any one of us, so additional eyes can be beneficial, although limiting reviews to a small number of people has benefit). It's also an excellent example of why intentional comments are desirable. I'd be happy to submit a patch to clean up the extension handling. The logic is simple, and easy to fix. But I don't completely understand the intent. Why were the particular extensions chosen for support? Are we really likely to see an uncompressed tar file? Why does app_install() unlink everything but tar files? Is it just making assumptions about what gets left around in what circumstances, or is something else going on? Another problem: elif filename[-7:] == '.tar.gz': will raise an exception for short file names, like ab.w2p. Should be using endswith(). -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:36987] Re: bad image and word Validator
here's a nice webservice for filtering bad words... the list is community driven so it should manage the changing words, their usage and the severity.. the basic service is free: http://www.thefilthylist.com On Nov 26, 5:21 am, mdipierro mdipie...@cs.depaul.edu wrote: It would be a nice app. On Nov 26, 5:24 am, Doxaliber salingro...@gmail.com wrote: Great. An open source solution is always better for me. :-) We could create a plugin to use thisfilterfor comments and other user generated contents. On 26 Nov, 12:09, mdipierro mdipie...@cs.depaul.edu wrote: This is written in python too and the complete source is available:http://spambayes.sourceforge.net/ Massimo On Nov 26, 4:24 am, Doxaliber salingro...@gmail.com wrote: Or we could implement akismet for python... :-)http://www.voidspace.org.uk/python/akismet_python.html On 26 Nov, 10:51, mdipierro mdipie...@cs.depaul.edu wrote: If you can find a list ofbadfrench words (singular and plural), I cam modify the validator to be extensible. On Nov 26, 2:30 am, Simo scommes...@gmail.com wrote: Thank, this solve a part of a problem, my site is also for french community . thanks for web2py users , am a java programmer and am very happy to use web2py On Wed, Nov 25, 2009 at 6:01 PM, mdipierro mdipie...@cs.depaul.edu wrote: As abadwords validator you can try this one: http://web2py.com/examples/static/badwords.py Detecting p**n images is complex well beyond me. I do not know if there is a web service that provides that as a service. Massimo -- Emmanuel Simo- Hide quoted text - - Show quoted text - -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:36988] Re: Unable to install application application name
We may see .tar files because that is what we used before .w2p was introduced. We should only gerenate .w2p but we want to read .tar, .tar.gz, .tgz, .w2p This filename[-7:] == '.tar.gz' will not cause an exception for short filenames but endswith is a better solution. On Dec 10, 4:37 pm, Jonathan Lundell jlund...@pobox.com wrote: On Dec 10, 2009, at 2:27 PM, Yarko Tymciurak wrote: On Dec 10, 2:12 pm, Thadeus Burgess thade...@thadeusb.com wrote: I see, Massmo, I checked my emails and I had sent you the wrong patch, it only included the fix for content-type of the admin application, instead of the logic that allows you to install an app with a .gz extension as well just in case. When I get home, I will send you this second part of the patch . -Thadeus This is an excellent example of why web2py process would benefit from the code-review cycle (extra eyes - even your own - are useful; we are all busy, so things get missed; also the community is generally smarter than any one of us, so additional eyes can be beneficial, although limiting reviews to a small number of people has benefit). It's also an excellent example of why intentional comments are desirable. I'd be happy to submit a patch to clean up the extension handling. The logic is simple, and easy to fix. But I don't completely understand the intent. Why were the particular extensions chosen for support? Are we really likely to see an uncompressed tar file? Why does app_install() unlink everything but tar files? Is it just making assumptions about what gets left around in what circumstances, or is something else going on? Another problem: elif filename[-7:] == '.tar.gz': will raise an exception for short file names, like ab.w2p. Should be using endswith(). -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:36989] Re: Switch from http to https within app
I would suggest creating a model 0_redefine_url.py that contains: _URL=URL def URL(*a,**b): if not 'secure' in b: return _URL(*a,**b) elif b['secure']: del b['secure'] return 'https://'+request.env.http_host + _URL(*a,**b) else: del b['secure'] return 'http://'+request.env.http_host + _URL(*a,**b) and use URL(,secure=True), URL(...secure=False) as required Massimo 'https://'+request.env.http_host +'/app/default/logon') On Dec 10, 2:11 pm, Wes James compte...@gmail.com wrote: Actually, I don't think it would matter if there were a proxy or not?? On Thu, Dec 10, 2009 at 1:06 PM, Wes James compte...@gmail.com wrote: As long as you don't have a proxy between your users and the server something with request.env could be used def login(): if request.env.port != 443: redirect('https://'+request.env.http_host +'/app/default/logon') -wes On Thu, Dec 10, 2009 at 11:42 AM, Jay j...@unclehenrys.com wrote: I am new to web2py and Apache w/mod_ssl and I have been searching for a solution related to this topic but I must be missing a basic understanding of the necessary pieces in order to accomplish this. Our web2py apache setup seems to be fine. I can access our app's pages using both http and https if I manually add the 's' to the url. What we are trying to do is smoothly transition from one controller/ function using http to another using https. Example, a user arrives athttp://init/default/indexand then the user selects ‘Login’ and they are sent to https:/init/default/login. We need some controller functions to use http and some https. Can this be done from within the controller/function? If not, what is the ‘best practice’ approach to accomplishing this? - Jay -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/web2py?hl=en. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py:36990] Re: Unable to install application application name
On Dec 10, 2009, at 2:46 PM, mdipierro wrote: We may see .tar files because that is what we used before .w2p was introduced. We should only gerenate .w2p but we want to read .tar, .tar.gz, .tgz, .w2p This filename[-7:] == '.tar.gz' will not cause an exception for short filenames but endswith is a better solution. I see; the : saves us. And the .tar unlink? On Dec 10, 4:37 pm, Jonathan Lundell jlund...@pobox.com wrote: On Dec 10, 2009, at 2:27 PM, Yarko Tymciurak wrote: On Dec 10, 2:12 pm, Thadeus Burgess thade...@thadeusb.com wrote: I see, Massmo, I checked my emails and I had sent you the wrong patch, it only included the fix for content-type of the admin application, instead of the logic that allows you to install an app with a .gz extension as well just in case. When I get home, I will send you this second part of the patch . -Thadeus This is an excellent example of why web2py process would benefit from the code-review cycle (extra eyes - even your own - are useful; we are all busy, so things get missed; also the community is generally smarter than any one of us, so additional eyes can be beneficial, although limiting reviews to a small number of people has benefit). It's also an excellent example of why intentional comments are desirable. I'd be happy to submit a patch to clean up the extension handling. The logic is simple, and easy to fix. But I don't completely understand the intent. Why were the particular extensions chosen for support? Are we really likely to see an uncompressed tar file? Why does app_install() unlink everything but tar files? Is it just making assumptions about what gets left around in what circumstances, or is something else going on? Another problem: elif filename[-7:] == '.tar.gz': will raise an exception for short file names, like ab.w2p. Should be using endswith(). -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:36991] Re: Unable to install application application name
According to the docs you can generate a tar.gz using mode='w:g' but I tried and it does not work on 2.5. So the process of making the w2p involves a tmp step of creating a tar file that is then removed. Somehow the unlink does not work on window. I do not know why. One solution may be to create the tar in a temp file. On Dec 10, 4:52 pm, Jonathan Lundell jlund...@pobox.com wrote: On Dec 10, 2009, at 2:46 PM, mdipierro wrote: We may see .tar files because that is what we used before .w2p was introduced. We should only gerenate .w2p but we want to read .tar, .tar.gz, .tgz, .w2p This filename[-7:] == '.tar.gz' will not cause an exception for short filenames but endswith is a better solution. I see; the : saves us. And the .tar unlink? On Dec 10, 4:37 pm, Jonathan Lundell jlund...@pobox.com wrote: On Dec 10, 2009, at 2:27 PM, Yarko Tymciurak wrote: On Dec 10, 2:12 pm, Thadeus Burgess thade...@thadeusb.com wrote: I see, Massmo, I checked my emails and I had sent you the wrong patch, it only included the fix for content-type of the admin application, instead of the logic that allows you to install an app with a .gz extension as well just in case. When I get home, I will send you this second part of the patch . -Thadeus This is an excellent example of why web2py process would benefit from the code-review cycle (extra eyes - even your own - are useful; we are all busy, so things get missed; also the community is generally smarter than any one of us, so additional eyes can be beneficial, although limiting reviews to a small number of people has benefit). It's also an excellent example of why intentional comments are desirable. I'd be happy to submit a patch to clean up the extension handling. The logic is simple, and easy to fix. But I don't completely understand the intent. Why were the particular extensions chosen for support? Are we really likely to see an uncompressed tar file? Why does app_install() unlink everything but tar files? Is it just making assumptions about what gets left around in what circumstances, or is something else going on? Another problem: elif filename[-7:] == '.tar.gz': will raise an exception for short file names, like ab.w2p. Should be using endswith(). -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/web2py?hl=en. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py:36992] Re: Unable to install application application name
On Dec 10, 2009, at 3:26 PM, mdipierro wrote: According to the docs you can generate a tar.gz using mode='w:g' but I tried and it does not work on 2.5. So the process of making the w2p involves a tmp step of creating a tar file that is then removed. Somehow the unlink does not work on window. I do not know why. One solution may be to create the tar in a temp file. This unlink is happening on the upload-and-install side, not w2p generation: try: upfile = open(upname, 'wb') upfile.write(fobj.read()) upfile.close() path = apath(app, request) os.mkdir(path) did_mkdir = True w2p_unpack(upname, path) if extension != 'tar': os.unlink(upname) fix_newlines(path) return upname except Exception: On Dec 10, 4:52 pm, Jonathan Lundell jlund...@pobox.com wrote: On Dec 10, 2009, at 2:46 PM, mdipierro wrote: We may see .tar files because that is what we used before .w2p was introduced. We should only gerenate .w2p but we want to read .tar, .tar.gz, .tgz, .w2p This filename[-7:] == '.tar.gz' will not cause an exception for short filenames but endswith is a better solution. I see; the : saves us. And the .tar unlink? On Dec 10, 4:37 pm, Jonathan Lundell jlund...@pobox.com wrote: On Dec 10, 2009, at 2:27 PM, Yarko Tymciurak wrote: On Dec 10, 2:12 pm, Thadeus Burgess thade...@thadeusb.com wrote: I see, Massmo, I checked my emails and I had sent you the wrong patch, it only included the fix for content-type of the admin application, instead of the logic that allows you to install an app with a .gz extension as well just in case. When I get home, I will send you this second part of the patch . -Thadeus This is an excellent example of why web2py process would benefit from the code-review cycle (extra eyes - even your own - are useful; we are all busy, so things get missed; also the community is generally smarter than any one of us, so additional eyes can be beneficial, although limiting reviews to a small number of people has benefit). It's also an excellent example of why intentional comments are desirable. I'd be happy to submit a patch to clean up the extension handling. The logic is simple, and easy to fix. But I don't completely understand the intent. Why were the particular extensions chosen for support? Are we really likely to see an uncompressed tar file? Why does app_install() unlink everything but tar files? Is it just making assumptions about what gets left around in what circumstances, or is something else going on? Another problem: elif filename[-7:] == '.tar.gz': will raise an exception for short file names, like ab.w2p. Should be using endswith(). -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:36993] Re: new on web2pyslices.com: WebGrid
Thanks to Fran for several recent improvements. The WebGrid is now datatables compliant (you must disable the add_links). http://www.web2pyslices.com/main/slices/take_slice/39 On Dec 5, 10:11 am, mr.freeze nat...@freezable.com wrote: I added an example to the slice of how to customize the footer (just before the screenshot). On Dec 5, 9:20 am, villas villa...@gmail.com wrote: Hi Mr Freeze, I've just been playing around with it and I was really impressed. It seems stable and so I'm already making plans to use it. I need to right-justify numbers, format numbers, grand totals, use icons etc. I'm not sure about using the lamba functions yet. If you get time to provide an extra note on that, an example would be good. However, you've left us all the 'hooks' - I think it should be easy to customize. Many thanks! D -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py:36994] Re: sqlite legacy support
You can tell your model the path to the existing sqlite database file with something like [...] Thanks a lot for your verbose help! I really appreciate it. As for telling it which existing field to use as the ID, as DenesL pointed out if the field isn't already named ID I don't think you can at the moment. If you really want to use the station number (t.staid) as your ID, why not just add a new field called ID to your existing table (using sqlite-browser) and then set the value to match t.staid? Something like I am not a database guru. So I still do not understand why t.staid could not be the PK (= ID). Regards, Timmie -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:36995] Populate failed with 'time' field
Populate.py seems to fail whenever a 'time' string is encountered. I was using Sqlite. Here is the ticket: File c:\web2py\gluon\contrib\populate.py, line 83, in populate datetime.timedelta(seconds=random.random()*24*3600) TypeError: unsupported operand type(s) for +: 'datetime.time' and 'datetime.timedelta' -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:36996] Re: new on web2pyslices.com: WebGrid
Hi Mr Freeze, Re: 'datatables compliant' Could you describe what that means? Are there any differences in the usage? I had a quick look at the code and the webslice page but it wasn't obvious to me what had changed. -David On Dec 11, 12:04 am, mr.freeze nat...@freezable.com wrote: Thanks to Fran for several recent improvements. The WebGrid is now datatables compliant (you must disable the add_links). http://www.web2pyslices.com/main/slices/take_slice/39 On Dec 5, 10:11 am, mr.freeze nat...@freezable.com wrote: I added an example to the slice of how to customize the footer (just before the screenshot). On Dec 5, 9:20 am, villas villa...@gmail.com wrote: Hi Mr Freeze, I've just been playing around with it and I was really impressed. It seems stable and so I'm already making plans to use it. I need to right-justify numbers, format numbers, grand totals, use icons etc. I'm not sure about using the lamba functions yet. If you get time to provide an extra note on that, an example would be good. However, you've left us all the 'hooks' - I think it should be easy to customize. Many thanks! D -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:36997] Re: Unable to install application application name
I think it removes the uploaded file execpt if tar because in case of tar it is remoevd by unpack. you may want to check it. Alvaro wrote this function. On Dec 10, 5:32 pm, Jonathan Lundell jlund...@pobox.com wrote: On Dec 10, 2009, at 3:26 PM, mdipierro wrote: According to the docs you can generate a tar.gz using mode='w:g' but I tried and it does not work on 2.5. So the process of making the w2p involves a tmp step of creating a tar file that is then removed. Somehow the unlink does not work on window. I do not know why. One solution may be to create the tar in a temp file. This unlink is happening on the upload-and-install side, not w2p generation: try: upfile = open(upname, 'wb') upfile.write(fobj.read()) upfile.close() path = apath(app, request) os.mkdir(path) did_mkdir = True w2p_unpack(upname, path) if extension != 'tar': os.unlink(upname) fix_newlines(path) return upname except Exception: On Dec 10, 4:52 pm, Jonathan Lundell jlund...@pobox.com wrote: On Dec 10, 2009, at 2:46 PM, mdipierro wrote: We may see .tar files because that is what we used before .w2p was introduced. We should only gerenate .w2p but we want to read .tar, .tar.gz, .tgz, .w2p This filename[-7:] == '.tar.gz' will not cause an exception for short filenames but endswith is a better solution. I see; the : saves us. And the .tar unlink? On Dec 10, 4:37 pm, Jonathan Lundell jlund...@pobox.com wrote: On Dec 10, 2009, at 2:27 PM, Yarko Tymciurak wrote: On Dec 10, 2:12 pm, Thadeus Burgess thade...@thadeusb.com wrote: I see, Massmo, I checked my emails and I had sent you the wrong patch, it only included the fix for content-type of the admin application, instead of the logic that allows you to install an app with a .gz extension as well just in case. When I get home, I will send you this second part of the patch . -Thadeus This is an excellent example of why web2py process would benefit from the code-review cycle (extra eyes - even your own - are useful; we are all busy, so things get missed; also the community is generally smarter than any one of us, so additional eyes can be beneficial, although limiting reviews to a small number of people has benefit). It's also an excellent example of why intentional comments are desirable. I'd be happy to submit a patch to clean up the extension handling. The logic is simple, and easy to fix. But I don't completely understand the intent. Why were the particular extensions chosen for support? Are we really likely to see an uncompressed tar file? Why does app_install() unlink everything but tar files? Is it just making assumptions about what gets left around in what circumstances, or is something else going on? Another problem: elif filename[-7:] == '.tar.gz': will raise an exception for short file names, like ab.w2p. Should be using endswith(). -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:36998] Re: Populate failed with 'time' field
uploading fix in trunk. Thanks for checking. On Dec 10, 8:24 pm, villas villa...@gmail.com wrote: Populate.py seems to fail whenever a 'time' string is encountered. I was using Sqlite. Here is the ticket: File c:\web2py\gluon\contrib\populate.py, line 83, in populate datetime.timedelta(seconds=random.random()*24*3600) TypeError: unsupported operand type(s) for +: 'datetime.time' and 'datetime.timedelta' -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:36999] Re: Fail login doesn't return an errorm msg
Hello thanks for the note... I did add print request.function and Yes there is a double redirection because the output print the function login twice : login login I wonder how to fix this double redirection here is one of the setting I have in my controller: auth.settings.login_next=URL(r=request, f='profile') Do you have any idea... I'll keep debugging... On Dec 9, 11:20 pm, mdipierro mdipie...@cs.depaul.edu wrote: Add a print request.function to your model and check if there is a double redirect. The other possibility is that sessions are not working. On Dec 9, 9:12 pm, Yannick ytchatch...@gmail.com wrote: Is anyone already has this issue and where able to solve it... I don't see any double redirect in my code... Thanks for your help... On Dec 9, 11:36 am, Wes James compte...@gmail.com wrote: Sorry, I'm not sure exactly when/where I made this change in the last week. You can use wingide and check what the repsponse.flash is between function calls. -wes On Wed, Dec 9, 2009 at 8:49 AM, Yannick ytchatch...@gmail.com wrote: Hmm interesting, thanks for the note... I don't think I'm doing a double redirection in my code though... can you please let me know how you resolved that issue when you had it Thanks, Yannick P. On Dec 9, 9:30 am, Wes James compte...@gmail.com wrote: On Tue, Dec 8, 2009 at 9:35 PM, Yannick ytchatch...@gmail.com wrote: hello mate, I wonder because I noticed that in auth, when the user fails to login (enter a fake username and password) there is no error message returned... Yannick, I just tried it on one of my sites and I got Invalid Login flash message. I had the same issue on one of my forms not showing field validation errors. It was as mr.freeze indicated, a double redirect that was causing this . -wes -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group athttp://groups.google.com/group/web2py?hl=en. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:37000] Re: Populate failed with 'time' field
erm... my hg client does not see any change (latest is changeset 4 from 2 days ago). I am assuming trunk means https://web2py.googlecode.com/hg/ Thanks. On Dec 10, 9:41 pm, mdipierro mdipie...@cs.depaul.edu wrote: uploading fix in trunk. Thanks for checking. On Dec 10, 8:24 pm, villas villa...@gmail.com wrote: Populate.py seems to fail whenever a 'time' string is encountered. I was using Sqlite. Here is the ticket: File c:\web2py\gluon\contrib\populate.py, line 83, in populate datetime.timedelta(seconds=random.random()*24*3600) TypeError: unsupported operand type(s) for +: 'datetime.time' and 'datetime.timedelta' -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:37001] Off-Topic: Web2py awesomeness
Everytime I look at a django app... it makes me so grateful for web2py :) -Thadeus -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:37002] Re: sqlite legacy support
For a legacy db you can do db.define_table(...Field('staid','id'),...) so staid is the id. It assumes id is an autoincrement or integer field. On Dec 10, 6:50 pm, Tim Michelsen timmichel...@gmx-topmail.de wrote: You can tell your model the path to the existing sqlite database file with something like [...] Thanks a lot for your verbose help! I really appreciate it. As for telling it which existing field to use as the ID, as DenesL pointed out if the field isn't already named ID I don't think you can at the moment. If you really want to use the station number (t.staid) as your ID, why not just add a new field called ID to your existing table (using sqlite-browser) and then set the value to match t.staid? Something like I am not a database guru. So I still do not understand why t.staid could not be the PK (= ID). Regards, Timmie -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:37003] Re: Populate failed with 'time' field
Can you try again: http://code.google.com/p/web2py/source/detail?r=22ea4f41b932e7173d4acfc1b058360b9001a939 On Dec 10, 10:01 pm, DenesL denes1...@yahoo.ca wrote: erm... my hg client does not see any change (latest is changeset 4 from 2 days ago). I am assuming trunk meanshttps://web2py.googlecode.com/hg/ Thanks. On Dec 10, 9:41 pm, mdipierro mdipie...@cs.depaul.edu wrote: uploading fix in trunk. Thanks for checking. On Dec 10, 8:24 pm, villas villa...@gmail.com wrote: Populate.py seems to fail whenever a 'time' string is encountered. I was using Sqlite. Here is the ticket: File c:\web2py\gluon\contrib\populate.py, line 83, in populate datetime.timedelta(seconds=random.random()*24*3600) TypeError: unsupported operand type(s) for +: 'datetime.time' and 'datetime.timedelta' -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:37004] Re: Populate failed with 'time' field
After clicking on the little green down arrow (Download and view incoming changesets) I can see the new fix. Not as intuitive as the SVN client but I guess I will get used to it, unless this can be set somewhere... Newbie at this hg thing. On Dec 10, 11:36 pm, mdipierro mdipie...@cs.depaul.edu wrote: Can you try again: http://code.google.com/p/web2py/source/detail?r=22ea4f41b932e7173d4ac... On Dec 10, 10:01 pm, DenesL denes1...@yahoo.ca wrote: erm... my hg client does not see any change (latest is changeset 4 from 2 days ago). I am assuming trunk meanshttps://web2py.googlecode.com/hg/ Thanks. On Dec 10, 9:41 pm, mdipierro mdipie...@cs.depaul.edu wrote: uploading fix in trunk. Thanks for checking. On Dec 10, 8:24 pm, villas villa...@gmail.com wrote: Populate.py seems to fail whenever a 'time' string is encountered. I was using Sqlite. Here is the ticket: File c:\web2py\gluon\contrib\populate.py, line 83, in populate datetime.timedelta(seconds=random.random()*24*3600) TypeError: unsupported operand type(s) for +: 'datetime.time' and 'datetime.timedelta' -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:37005] Re: Off-Topic: Web2py awesomeness
can you be more specific? What do you like more when you compare? On Dec 10, 10:20 pm, Thadeus Burgess thade...@thadeusb.com wrote: Everytime I look at a django app... it makes me so grateful for web2py :) -Thadeus -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:37007] Re: sqlite legacy support
t.staid could be the primary key as far as the database is concerned. The issue is that web2py expects the primary key field to be called ID. I'd give Massimo's suggestion of db.define_table(...Field ('staid','id'),...) a shot - he's the man, so he ought to know. Massimo - what exactly does Field('staid','id') do? Is that just telling web2py that field staid should be treated as the ID field? Is 'id' now a valid fieldtype just like 'string' or 'integer'? ~Brian On Dec 10, 6:50 pm, Tim Michelsen timmichel...@gmx-topmail.de wrote: You can tell your model the path to the existing sqlite database file with something like [...] Thanks a lot for your verbose help! I really appreciate it. As for telling it which existing field to use as the ID, as DenesL pointed out if the field isn't already named ID I don't think you can at the moment. If you really want to use the station number (t.staid) as your ID, why not just add a new field called ID to your existing table (using sqlite-browser) and then set the value to match t.staid? Something like I am not a database guru. So I still do not understand why t.staid could not be the PK (= ID). Regards, Timmie -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py:37008] Re: Unable to install application application name
On Dec 10, 2009, at 6:36 PM, mdipierro wrote: I think it removes the uploaded file execpt if tar because in case of tar it is remoevd by unpack. you may want to check it. Alvaro wrote this function. That's right. I'm not sure about the compressed files, though. I'd do some cleanup, but at the moment I don't have time to do the testing, so I'll pass for now. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.