[web2py] Re: Email and PGP
I think the problem here is - The key was found but the can_sign property is set to False but I can't find how to set it... :( 2014. január 30., csütörtök 11:55:39 UTC+1 időpontban Alan Etkin a következőt írta: Okay, looks like nobody can help me. I guess not that many people use PGP email from web2py. Probably because it's so gnarly. Apparently, you get that error message because one of this reasons: - A search for the signing key returned a void set - The key was found but the can_sign property is set to False If you want, you can debug the error checking the output in gluon/tools.py around line 496. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] Re: Email and PGP
If you list your private keys is there a key for 'my_han...@gmail.com'? (gpg --list-secret-keys) And yes you need to have receiver's public key before you could send encrypted messages to him/her. 2014. január 28., kedd 22:27:44 UTC+1 időpontban horridohobbyist a következőt írta: GnuPG seems to be intimately tied to the user account on Linux. It always, always expects .gnupg to be in /home/richard/. I can't seem to give it an alternate location. Thinking that it might be a file ownership problem, I chown'd .gnupg and everything in it to www-data:www-data, but this gave me the mail.error GPG error:Invocation of gpgme_op_sign:Unspecified source:General error. I chown'd everything back to richard:richard, and I got the mail.error No key for signing [my_h...@gmail.com javascript:]. So I lose either way! It's probably not a file ownership problem. I am totally baffled by this. Is PGP Email in web2py broken? Has anyone used it successfully recently?? Another question I have is: Must I have the public key for the receiver of my encrypted email before I can send? I'm grasping at straws, I know. Thanks. On Tuesday, 28 January 2014 13:53:02 UTC-5, horridohobbyist wrote: The error message is No key for signing [my_h...@gmail.com javascript: ]. I did create the key files with gpg for sender my_h...@gmail.comjavascript:. By default, they're created in my home directory, so I moved the .gnupg folder to /home/www-data/ and chown'd it and its contents to www-data:www-data. I don't know if there are any other steps besides the above. I used the same sender email and passphrase in creating the keys. So everything should be okay. Thanks. On Tuesday, 28 January 2014 10:51:31 UTC-5, szimszon wrote: Sorry, mail.error :-o my bad. 2014. január 28., kedd 14:35:55 UTC+1 időpontban horridohobbyist a következőt írta: AttributeError: 'Mail' object has no attribute 'err' On Tuesday, 28 January 2014 08:25:43 UTC-5, szimszon wrote: Could you please print mail.err after the failed send? 2014. január 28., kedd 14:22:59 UTC+1 időpontban horridohobbyist a következőt írta: As per the web2py book, I've installed python-pyme and created the key files (for sender 'my_h...@gmail.com'). I have the following code: mail = Mail('smtp.gmail.com:587','my_han...@gmail.com ','my_handle:my_password') mail.settings.gpg_home = '/home/www-data/.gnupg/' mail.settings.cipher_type = 'gpg' mail.settings.sign = True mail.settings.sign_passphrase = 'my_passphrase' mail.settings.encrypt = True status = mail.send('some_...@gmail.com','some subject','some text') The mail.send() is failing. What's wrong? Thanks. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] Re: Email and PGP
It could be that the key is not trusted. What is the status of the key if you look at: gpg --edit-key my_han...@gmail.com you can mark it as trusted with the trust command at gpg's cli. As I see in pgpme the problem is that there is no *suitable* key for signing rater than no key at all. First you should disable encryption and see if you could set up signing... 2014. január 29., szerda 14:54:51 UTC+1 időpontban horridohobbyist a következőt írta: Absolutely. The private (and public) keys are there for my_h...@gmail.comjavascript: . Re: the receiver's public key, where do I put it and how do I incorporate it into the code that sends the email? (Excuse me for not understanding how PGP email works.) This second question is lower priority. Right now, my *biggest* issue is just getting web2py to send the *encrypted* email *without errors*. Thanks. On Wednesday, 29 January 2014 03:11:55 UTC-5, szimszon wrote: If you list your private keys is there a key for 'my_h...@gmail.com'? (gpg --list-secret-keys) And yes you need to have receiver's public key before you could send encrypted messages to him/her. 2014. január 28., kedd 22:27:44 UTC+1 időpontban horridohobbyist a következőt írta: GnuPG seems to be intimately tied to the user account on Linux. It always, always expects .gnupg to be in /home/richard/. I can't seem to give it an alternate location. Thinking that it might be a file ownership problem, I chown'd .gnupg and everything in it to www-data:www-data, but this gave me the mail.error GPG error:Invocation of gpgme_op_sign:Unspecified source:General error. I chown'd everything back to richard:richard, and I got the mail.error No key for signing [my_h...@gmail.com]. So I lose either way! It's probably not a file ownership problem. I am totally baffled by this. Is PGP Email in web2py broken? Has anyone used it successfully recently?? Another question I have is: Must I have the public key for the receiver of my encrypted email before I can send? I'm grasping at straws, I know. Thanks. On Tuesday, 28 January 2014 13:53:02 UTC-5, horridohobbyist wrote: The error message is No key for signing [my_h...@gmail.com]. I did create the key files with gpg for sender my_h...@gmail.com. By default, they're created in my home directory, so I moved the .gnupg folder to /home/www-data/ and chown'd it and its contents to www-data:www-data . I don't know if there are any other steps besides the above. I used the same sender email and passphrase in creating the keys. So everything should be okay. Thanks. On Tuesday, 28 January 2014 10:51:31 UTC-5, szimszon wrote: Sorry, mail.error :-o my bad. 2014. január 28., kedd 14:35:55 UTC+1 időpontban horridohobbyist a következőt írta: AttributeError: 'Mail' object has no attribute 'err' On Tuesday, 28 January 2014 08:25:43 UTC-5, szimszon wrote: Could you please print mail.err after the failed send? 2014. január 28., kedd 14:22:59 UTC+1 időpontban horridohobbyist a következőt írta: As per the web2py book, I've installed python-pyme and created the key files (for sender 'my_h...@gmail.com'). I have the following code: mail = Mail('smtp.gmail.com:587','my_han...@gmail.com ','my_handle:my_password') mail.settings.gpg_home = '/home/www-data/.gnupg/' mail.settings.cipher_type = 'gpg' mail.settings.sign = True mail.settings.sign_passphrase = 'my_passphrase' mail.settings.encrypt = True status = mail.send('some_...@gmail.com','some subject','some text') The mail.send() is failing. What's wrong? Thanks. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] Re: Email and PGP
You must have a public key for the recipient. Web2py can send only encrypted mails if the recipient's public key is known. 2014. január 29., szerda 16:12:43 UTC+1 időpontban horridohobbyist a következőt írta: It says expires: never and trust: ultimate and validity: ultimate, and usage: SC for pub and usage: E for sub. Looks good, I think. Just for the purpose of testing, I want to do one thing at a time. So first, I want to send an encrypted email. I don't care whether the receiver can decrypt the message. Surely web2py can send an encrypted email to anybody without a public key... Alternatively, can I send an encrypted email to myself, since my public key should already be in my keyring? Ultimately, that's what I want to do, anyway. On Wednesday, 29 January 2014 09:29:31 UTC-5, szimszon wrote: It could be that the key is not trusted. What is the status of the key if you look at: gpg --edit-key my_h...@gmail.com you can mark it as trusted with the trust command at gpg's cli. As I see in pgpme the problem is that there is no *suitable* key for signing rater than no key at all. First you should disable encryption and see if you could set up signing... 2014. január 29., szerda 14:54:51 UTC+1 időpontban horridohobbyist a következőt írta: Absolutely. The private (and public) keys are there for my_h...@gmail.com. Re: the receiver's public key, where do I put it and how do I incorporate it into the code that sends the email? (Excuse me for not understanding how PGP email works.) This second question is lower priority. Right now, my *biggest* issue is just getting web2py to send the *encrypted* email *without errors*. Thanks. On Wednesday, 29 January 2014 03:11:55 UTC-5, szimszon wrote: If you list your private keys is there a key for 'my_h...@gmail.com'? (gpg --list-secret-keys) And yes you need to have receiver's public key before you could send encrypted messages to him/her. 2014. január 28., kedd 22:27:44 UTC+1 időpontban horridohobbyist a következőt írta: GnuPG seems to be intimately tied to the user account on Linux. It always, always expects .gnupg to be in /home/richard/. I can't seem to give it an alternate location. Thinking that it might be a file ownership problem, I chown'd .gnupg and everything in it to www-data:www-data, but this gave me the mail.error GPG error:Invocation of gpgme_op_sign:Unspecified source:General error. I chown'd everything back to richard:richard, and I got the mail.error No key for signing [my_h...@gmail.com]. So I lose either way! It's probably not a file ownership problem. I am totally baffled by this. Is PGP Email in web2py broken? Has anyone used it successfully recently?? Another question I have is: Must I have the public key for the receiver of my encrypted email before I can send? I'm grasping at straws, I know. Thanks. On Tuesday, 28 January 2014 13:53:02 UTC-5, horridohobbyist wrote: The error message is No key for signing [my_h...@gmail.com]. I did create the key files with gpg for sender my_h...@gmail.com. By default, they're created in my home directory, so I moved the .gnupg folder to /home/www-data/ and chown'd it and its contents to www-data:www-data. I don't know if there are any other steps besides the above. I used the same sender email and passphrase in creating the keys. So everything should be okay. Thanks. On Tuesday, 28 January 2014 10:51:31 UTC-5, szimszon wrote: Sorry, mail.error :-o my bad. 2014. január 28., kedd 14:35:55 UTC+1 időpontban horridohobbyist a következőt írta: AttributeError: 'Mail' object has no attribute 'err' On Tuesday, 28 January 2014 08:25:43 UTC-5, szimszon wrote: Could you please print mail.err after the failed send? 2014. január 28., kedd 14:22:59 UTC+1 időpontban horridohobbyist a következőt írta: As per the web2py book, I've installed python-pyme and created the key files (for sender 'my_h...@gmail.com'). I have the following code: mail = Mail('smtp.gmail.com:587','my_han...@gmail.com ','my_handle:my_password') mail.settings.gpg_home = '/home/www-data/.gnupg/' mail.settings.cipher_type = 'gpg' mail.settings.sign = True mail.settings.sign_passphrase = 'my_passphrase' mail.settings.encrypt = True status = mail.send('some_...@gmail.com','some subject','some text') The mail.send() is failing. What's wrong? Thanks. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] Re: Email and PGP
Can you sign some txt from command line with web2py's user? gpg --sign --default-key my_han...@gmail.com x.txt ? 2014. január 29., szerda 16:12:43 UTC+1 időpontban horridohobbyist a következőt írta: It says expires: never and trust: ultimate and validity: ultimate, and usage: SC for pub and usage: E for sub. Looks good, I think. Just for the purpose of testing, I want to do one thing at a time. So first, I want to send an encrypted email. I don't care whether the receiver can decrypt the message. Surely web2py can send an encrypted email to anybody without a public key... Alternatively, can I send an encrypted email to myself, since my public key should already be in my keyring? Ultimately, that's what I want to do, anyway. On Wednesday, 29 January 2014 09:29:31 UTC-5, szimszon wrote: It could be that the key is not trusted. What is the status of the key if you look at: gpg --edit-key my_h...@gmail.com you can mark it as trusted with the trust command at gpg's cli. As I see in pgpme the problem is that there is no *suitable* key for signing rater than no key at all. First you should disable encryption and see if you could set up signing... 2014. január 29., szerda 14:54:51 UTC+1 időpontban horridohobbyist a következőt írta: Absolutely. The private (and public) keys are there for my_h...@gmail.com. Re: the receiver's public key, where do I put it and how do I incorporate it into the code that sends the email? (Excuse me for not understanding how PGP email works.) This second question is lower priority. Right now, my *biggest* issue is just getting web2py to send the *encrypted* email *without errors*. Thanks. On Wednesday, 29 January 2014 03:11:55 UTC-5, szimszon wrote: If you list your private keys is there a key for 'my_h...@gmail.com'? (gpg --list-secret-keys) And yes you need to have receiver's public key before you could send encrypted messages to him/her. 2014. január 28., kedd 22:27:44 UTC+1 időpontban horridohobbyist a következőt írta: GnuPG seems to be intimately tied to the user account on Linux. It always, always expects .gnupg to be in /home/richard/. I can't seem to give it an alternate location. Thinking that it might be a file ownership problem, I chown'd .gnupg and everything in it to www-data:www-data, but this gave me the mail.error GPG error:Invocation of gpgme_op_sign:Unspecified source:General error. I chown'd everything back to richard:richard, and I got the mail.error No key for signing [my_h...@gmail.com]. So I lose either way! It's probably not a file ownership problem. I am totally baffled by this. Is PGP Email in web2py broken? Has anyone used it successfully recently?? Another question I have is: Must I have the public key for the receiver of my encrypted email before I can send? I'm grasping at straws, I know. Thanks. On Tuesday, 28 January 2014 13:53:02 UTC-5, horridohobbyist wrote: The error message is No key for signing [my_h...@gmail.com]. I did create the key files with gpg for sender my_h...@gmail.com. By default, they're created in my home directory, so I moved the .gnupg folder to /home/www-data/ and chown'd it and its contents to www-data:www-data. I don't know if there are any other steps besides the above. I used the same sender email and passphrase in creating the keys. So everything should be okay. Thanks. On Tuesday, 28 January 2014 10:51:31 UTC-5, szimszon wrote: Sorry, mail.error :-o my bad. 2014. január 28., kedd 14:35:55 UTC+1 időpontban horridohobbyist a következőt írta: AttributeError: 'Mail' object has no attribute 'err' On Tuesday, 28 January 2014 08:25:43 UTC-5, szimszon wrote: Could you please print mail.err after the failed send? 2014. január 28., kedd 14:22:59 UTC+1 időpontban horridohobbyist a következőt írta: As per the web2py book, I've installed python-pyme and created the key files (for sender 'my_h...@gmail.com'). I have the following code: mail = Mail('smtp.gmail.com:587','my_han...@gmail.com ','my_handle:my_password') mail.settings.gpg_home = '/home/www-data/.gnupg/' mail.settings.cipher_type = 'gpg' mail.settings.sign = True mail.settings.sign_passphrase = 'my_passphrase' mail.settings.encrypt = True status = mail.send('some_...@gmail.com','some subject','some text') The mail.send() is failing. What's wrong? Thanks. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] Re: Email and PGP
Could you please print mail.err after the failed send? 2014. január 28., kedd 14:22:59 UTC+1 időpontban horridohobbyist a következőt írta: As per the web2py book, I've installed python-pyme and created the key files (for sender 'my_h...@gmail.com javascript:'). I have the following code: mail = Mail('smtp.gmail.com:587','my_han...@gmail.comjavascript: ','my_handle:my_password') mail.settings.gpg_home = '/home/www-data/.gnupg/' mail.settings.cipher_type = 'gpg' mail.settings.sign = True mail.settings.sign_passphrase = 'my_passphrase' mail.settings.encrypt = True status = mail.send('some_...@gmail.com javascript:','some subject','some text') The mail.send() is failing. What's wrong? Thanks. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] Re: Email and PGP
Sorry, mail.error :-o my bad. 2014. január 28., kedd 14:35:55 UTC+1 időpontban horridohobbyist a következőt írta: AttributeError: 'Mail' object has no attribute 'err' On Tuesday, 28 January 2014 08:25:43 UTC-5, szimszon wrote: Could you please print mail.err after the failed send? 2014. január 28., kedd 14:22:59 UTC+1 időpontban horridohobbyist a következőt írta: As per the web2py book, I've installed python-pyme and created the key files (for sender 'my_h...@gmail.com'). I have the following code: mail = Mail('smtp.gmail.com:587','my_han...@gmail.com ','my_handle:my_password') mail.settings.gpg_home = '/home/www-data/.gnupg/' mail.settings.cipher_type = 'gpg' mail.settings.sign = True mail.settings.sign_passphrase = 'my_passphrase' mail.settings.encrypt = True status = mail.send('some_...@gmail.com','some subject','some text') The mail.send() is failing. What's wrong? Thanks. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] Re: Important New Year News: Edison Award
Good luck! :) Hajrá! 2014. január 19., vasárnap 22:49:04 UTC+1 időpontban step a következőt írta: Yes! Good luck Massimo and web2py, go go go On Saturday, January 4, 2014 5:08:38 AM UTC+1, Massimo Di Pierro wrote: Web2py/me have been nominated for the Edison Award. Please wish web2py (and me) good luck. :-) -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] Re: disk cache problem
In 2.8.1 I still have a problem. Now another one too: Ticket ID 192.168.7.29.2013-11-28.11-31-21.11f4e653-5c83-4b57-8615-c88eba04fffd __len__() should return = 0 Version web2py(tm) Version 2.8.1-stable+timestamp.2013.11.27.13.52.50 Traceback Traceback (most recent call last): File /home/gyszabolcs/fejlesztes/web2py/gluon/restricted.py, line 217, in restricted exec ccode in environment File /home/gyszabolcs/fejlesztes/web2py/applications/eszkoz/controllers/autocomplete.py (https://w2p-dev.primerate.lan/admin/default/edit/eszkoz/controllers/autocomplete.py), line 462, in File /home/gyszabolcs/fejlesztes/web2py/gluon/globals.py, line 372, in self._caller = lambda f: f() File /home/gyszabolcs/fejlesztes/web2py/gluon/tools.py, line 3239, in f return action(*a, **b) File /home/gyszabolcs/fejlesztes/web2py/applications/eszkoz/controllers/autocomplete.py (https://w2p-dev.primerate.lan/admin/default/edit/eszkoz/controllers/autocomplete.py), line 110, in qrcode_strAC select(db.device.qrcode, distinct=True , cache=(cache.disk, 120)) File /home/gyszabolcs/fejlesztes/web2py/gluon/dal.py, line 10335, in select return adapter.select(self.query,fields,attributes) File /home/gyszabolcs/fejlesztes/web2py/gluon/dal.py, line 1831, in select return self._select_aux(sql,fields,attributes) File /home/gyszabolcs/fejlesztes/web2py/gluon/dal.py, line 1805, in _select_aux rows = cache_model(key,_select_aux2,time_expire) File /home/gyszabolcs/fejlesztes/web2py/gluon/cache.py, line 365, in __call__ self._close_shelve_and_unlock() File /home/gyszabolcs/fejlesztes/web2py/gluon/cache.py, line 255, in _close_shelve_and_unlock if self.storage: File /usr/lib/python2.7/shelve.py, line 104, in __len__ return len(self.dict) ValueError: __len__() should return = 0 2013. november 27., szerda 10:53:05 UTC+1 időpontban szimszon a következőt írta: Hello! Nobody has problem with disk cache? 2013. november 26., kedd 9:16:31 UTC+1 időpontban szimszon a következőt írta: http://code.google.com/p/web2py/issues/detail?id=1791thanks=1791ts=1385453629 I have an app with lot of disk cache usage in selects after 2.7 - don't know exactly the exact version :( - I got a lot of trouble with it, sometimes the app just wait and if I try disk. Or if I make a cache.disk.flush() I got this: Ticket ID 192.168.7.29.2013-11-18.14-42-35.394acb31-76b9-4204-8695-c5f9ee84a87a class '_bsddb.DBNotFoundError' (-30988, 'DB_NOTFOUND: No matching key/data pair found') Version web2py(tm) Version 2.7.4-stable+timestamp.2013.11.03.22.45.08 Traceback Traceback (most recent call last): File /usr/local/share/web2py/gluon/restricted.py, line 217, in restricted exec ccode in environment File applications/eszkoz/compiled/controllers.bevetel.szamla.py, line 1090, in module File /usr/local/share/web2py/gluon/globals.py, line 372, in lambda self._caller = lambda f: f() File /usr/local/share/web2py/gluon/tools.py, line 3240, in f return action(*a, **b) File applications/eszkoz/compiled/controllers.bevetel.szamla.py, line 415, in szamla File /usr/local/share/web2py/gluon/tools.py, line 3948, in create **attributes File /usr/local/share/web2py/gluon/tools.py, line 3899, in update callback(onaccept, form, table._tablename) File /usr/local/share/web2py/gluon/tools.py, line 76, in callback [action(form) for action in actions] File /usr/local/share/web2py/gluon/tools.py, line 3240, in f return action(*a, **b) File applications/eszkoz/compiled/controllers.bevetel.szamla.py, line 65, in send_mail_to_penzugy File applications/eszkoz/compiled/controllers.bevetel.szamla.py, line 52, in flush_cache File /usr/local/share/web2py/gluon/cache.py, line 336, in clear storage.clear() File /usr/lib/python2.6/UserDict.py, line 124, in clear del self[key] File /usr/lib/python2.6/shelve.py, line 136, in __delitem__ del self.dict[key] File /usr/lib/python2.6/bsddb/__init__.py, line 285, in __delitem__ _DeadlockWrap(wrapF) # del self.db[key] File /usr/lib/python2.6/bsddb/dbutils.py, line 68, in DeadlockWrap return function(*_args, **_kwargs) File /usr/lib/python2.6/bsddb/__init__.py, line 284, in wrapF del self.db[key] DBNotFoundError: (-30988, 'DB_NOTFOUND: No matching key/data pair found') In file: /usr/local/share/web2py/applications/eszkoz/compiled/controllers.bevetel.szamla.pyc code object module at 0xfbc8b068, file applications/eszkoz/compiled/controllers.bevetel.szamla.py, line 1 I need to manually del the content of the cache dir. The very some app is running good with 2.6.4. I use apache frontend with wsgi in both case. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group
[web2py] Re: request.user_agent().is_mobile
I had that with 2.7.x too. I changed all my app to user_agent()['is_mobile'] :-o 2013. november 28., csütörtök 20:55:14 UTC+1 időpontban mr.freeze a következőt írta: Did request.user_agent() change from a Storage object to dict? request.user_agent().is_mobile is throwing errors for me on the latest bits (2.8.2): AttributeError: 'dict' object has no attribute 'is_mobile'. Happy Thanksgiving! -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] Re: disk cache problem
Hello! Nobody has problem with disk cache? 2013. november 26., kedd 9:16:31 UTC+1 időpontban szimszon a következőt írta: http://code.google.com/p/web2py/issues/detail?id=1791thanks=1791ts=1385453629 I have an app with lot of disk cache usage in selects after 2.7 - don't know exactly the exact version :( - I got a lot of trouble with it, sometimes the app just wait and if I try disk. Or if I make a cache.disk.flush() I got this: Ticket ID 192.168.7.29.2013-11-18.14-42-35.394acb31-76b9-4204-8695-c5f9ee84a87a class '_bsddb.DBNotFoundError' (-30988, 'DB_NOTFOUND: No matching key/data pair found') Version web2py™ Version 2.7.4-stable+timestamp.2013.11.03.22.45.08 Traceback Traceback (most recent call last): File /usr/local/share/web2py/gluon/restricted.py, line 217, in restricted exec ccode in environment File applications/eszkoz/compiled/controllers.bevetel.szamla.py, line 1090, in module File /usr/local/share/web2py/gluon/globals.py, line 372, in lambda self._caller = lambda f: f() File /usr/local/share/web2py/gluon/tools.py, line 3240, in f return action(*a, **b) File applications/eszkoz/compiled/controllers.bevetel.szamla.py, line 415, in szamla File /usr/local/share/web2py/gluon/tools.py, line 3948, in create **attributes File /usr/local/share/web2py/gluon/tools.py, line 3899, in update callback(onaccept, form, table._tablename) File /usr/local/share/web2py/gluon/tools.py, line 76, in callback [action(form) for action in actions] File /usr/local/share/web2py/gluon/tools.py, line 3240, in f return action(*a, **b) File applications/eszkoz/compiled/controllers.bevetel.szamla.py, line 65, in send_mail_to_penzugy File applications/eszkoz/compiled/controllers.bevetel.szamla.py, line 52, in flush_cache File /usr/local/share/web2py/gluon/cache.py, line 336, in clear storage.clear() File /usr/lib/python2.6/UserDict.py, line 124, in clear del self[key] File /usr/lib/python2.6/shelve.py, line 136, in __delitem__ del self.dict[key] File /usr/lib/python2.6/bsddb/__init__.py, line 285, in __delitem__ _DeadlockWrap(wrapF) # del self.db[key] File /usr/lib/python2.6/bsddb/dbutils.py, line 68, in DeadlockWrap return function(*_args, **_kwargs) File /usr/lib/python2.6/bsddb/__init__.py, line 284, in wrapF del self.db[key] DBNotFoundError: (-30988, 'DB_NOTFOUND: No matching key/data pair found') In file: /usr/local/share/web2py/applications/eszkoz/compiled/controllers.bevetel.szamla.pyc code object module at 0xfbc8b068, file applications/eszkoz/compiled/controllers.bevetel.szamla.py, line 1 I need to manually del the content of the cache dir. The very some app is running good with 2.6.4. I use apache frontend with wsgi in both case. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] disk cache problem
http://code.google.com/p/web2py/issues/detail?id=1791thanks=1791ts=1385453629 I have an app with lot of disk cache usage in selects after 2.7 - don't know exactly the exact version :( - I got a lot of trouble with it, sometimes the app just wait and if I try disk. Or if I make a cache.disk.flush() I got this: Ticket ID 192.168.7.29.2013-11-18.14-42-35.394acb31-76b9-4204-8695-c5f9ee84a87a class '_bsddb.DBNotFoundError' (-30988, 'DB_NOTFOUND: No matching key/data pair found') Version web2py™ Version 2.7.4-stable+timestamp.2013.11.03.22.45.08 Traceback Traceback (most recent call last): File /usr/local/share/web2py/gluon/restricted.py, line 217, in restricted exec ccode in environment File applications/eszkoz/compiled/controllers.bevetel.szamla.py, line 1090, in module File /usr/local/share/web2py/gluon/globals.py, line 372, in lambda self._caller = lambda f: f() File /usr/local/share/web2py/gluon/tools.py, line 3240, in f return action(*a, **b) File applications/eszkoz/compiled/controllers.bevetel.szamla.py, line 415, in szamla File /usr/local/share/web2py/gluon/tools.py, line 3948, in create **attributes File /usr/local/share/web2py/gluon/tools.py, line 3899, in update callback(onaccept, form, table._tablename) File /usr/local/share/web2py/gluon/tools.py, line 76, in callback [action(form) for action in actions] File /usr/local/share/web2py/gluon/tools.py, line 3240, in f return action(*a, **b) File applications/eszkoz/compiled/controllers.bevetel.szamla.py, line 65, in send_mail_to_penzugy File applications/eszkoz/compiled/controllers.bevetel.szamla.py, line 52, in flush_cache File /usr/local/share/web2py/gluon/cache.py, line 336, in clear storage.clear() File /usr/lib/python2.6/UserDict.py, line 124, in clear del self[key] File /usr/lib/python2.6/shelve.py, line 136, in __delitem__ del self.dict[key] File /usr/lib/python2.6/bsddb/__init__.py, line 285, in __delitem__ _DeadlockWrap(wrapF) # del self.db[key] File /usr/lib/python2.6/bsddb/dbutils.py, line 68, in DeadlockWrap return function(*_args, **_kwargs) File /usr/lib/python2.6/bsddb/__init__.py, line 284, in wrapF del self.db[key] DBNotFoundError: (-30988, 'DB_NOTFOUND: No matching key/data pair found') In file: /usr/local/share/web2py/applications/eszkoz/compiled/controllers.bevetel.szamla.pyc code object module at 0xfbc8b068, file applications/eszkoz/compiled/controllers.bevetel.szamla.py, line 1 I need to manually del the content of the cache dir. The very some app is running good with 2.6.4. I use apache frontend with wsgi in both case. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [web2py] Re: Some forms need to be submitted multiple times.
Hi! I have some apps where I usually do multiple things simultaneously or I have to look at some page for information (page with form too) and copypast to the first. But I have to reload the first page because the single form key. It can be really annoying :( So if it could be change I'm for the change. :-) 2013. szeptember 22., vasárnap 18:16:57 UTC+2 időpontban Christian Foster Howes a következőt írta: and i don't mind the design at alli can't think of a good reason that a real user would be in this situation. i tend to break things when testing or doing rote admin tasks (with my admin forms not web2py admin) cfh On 9/22/13 9:11 , Massimo Di Pierro wrote: That is by design. Perhaps we should change it. The problem is how not to pollute the session with un-used keys. On Sunday, 22 September 2013 10:53:26 UTC-5, Christian Foster Howes wrote: i have noticed that if in the same browser i open the same page with the same form in multiple tabs my stored session data only stores 1 form key, so the most recently loaded tab will submit the form fine, the others will be denied until i reload the page. any chance you have form key duplication? or are losing the form key somehow? On Saturday, September 21, 2013 7:16:17 AM UTC-7, Ian W. Scott wrote: Thanks Niphlod. I submit the form and get back the same form, empty. It's as if the submitted data is just dumped and the page reloads as if nothing had been sent. I'll try the replacement you suggest and get back to you. Ian On Friday, September 20, 2013 5:12:35 PM UTC-4, Niphlod wrote: I can't replicate it but 1st thing to debug: remove that requires and replace with a requires=IS_IN_SET(('America/Toronto')) ... BTW: submitting 2 or 3 times what means exactly? that you put email and password and you hit submit and you get back an error, the same login form, the login form empty, (fill the blanks :-P) ? On Friday, September 20, 2013 10:26:39 PM UTC+2, Ian W. Scott wrote: Sorry for the slow response. I'm experiencing this with 2.6.3 but have also had the problem with the last couple of versions. It has been the kind of thing that I keep putting off debugging because I'm not sure where to start. Could it have to do with the way I'm extending the auth_user table? In my db.py I have auth = Auth(db, hmac_key=Auth.get_or_create_key()) # authent/authorization #adding custom field for user time zone auth.settings.extra_fields['auth_user'] = [ Field('time_zone', 'string', default='America/Toronto', requires=IS_IN_SET((common_timezones)), widget=SQLFORM.widgets.options.widget ) ] Although I'm able to use the data from that field without any trouble. Ian On Wednesday, September 18, 2013 12:41:19 PM UTC-4, Massimo Di Pierro wrote: Which version? On Wednesday, 18 September 2013 10:15:46 UTC-5, Ian W. Scott wrote: I'm experiencing an odd problem where some of my forms (including registration and login forms) need to be submitted 2 or 3 times before they are processed. It's been hard to solve because it doesn't seem entirely consistent. Has anyone run into this, and does anyone have any idea what the cause would be? Thanks, Ian -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [web2py] Re: Some forms need to be submitted multiple times.
http://code.google.com/p/web2py/issues/detail?id=1688 Thanks. 2013. szeptember 22., vasárnap 19:33:22 UTC+2 időpontban Massimo Di Pierro a következőt írta: Please open a ticket. I have an idea about what to do. On Sep 22, 2013, at 12:31 PM, szimszon wrote: Hi! I have some apps where I usually do multiple things simultaneously or I have to look at some page for information (page with form too) and copypast to the first. But I have to reload the first page because the single form key. It can be really annoying :( So if it could be change I'm for the change. :-) 2013. szeptember 22., vasárnap 18:16:57 UTC+2 időpontban Christian Foster Howes a következőt írta: and i don't mind the design at alli can't think of a good reason that a real user would be in this situation. i tend to break things when testing or doing rote admin tasks (with my admin forms not web2py admin) cfh On 9/22/13 9:11 , Massimo Di Pierro wrote: That is by design. Perhaps we should change it. The problem is how not to pollute the session with un-used keys. On Sunday, 22 September 2013 10:53:26 UTC-5, Christian Foster Howes wrote: i have noticed that if in the same browser i open the same page with the same form in multiple tabs my stored session data only stores 1 form key, so the most recently loaded tab will submit the form fine, the others will be denied until i reload the page. any chance you have form key duplication? or are losing the form key somehow? On Saturday, September 21, 2013 7:16:17 AM UTC-7, Ian W. Scott wrote: Thanks Niphlod. I submit the form and get back the same form, empty. It's as if the submitted data is just dumped and the page reloads as if nothing had been sent. I'll try the replacement you suggest and get back to you. Ian On Friday, September 20, 2013 5:12:35 PM UTC-4, Niphlod wrote: I can't replicate it but 1st thing to debug: remove that requires and replace with a requires=IS_IN_SET(('America/Toronto')) ... BTW: submitting 2 or 3 times what means exactly? that you put email and password and you hit submit and you get back an error, the same login form, the login form empty, (fill the blanks :-P) ? On Friday, September 20, 2013 10:26:39 PM UTC+2, Ian W. Scott wrote: Sorry for the slow response. I'm experiencing this with 2.6.3 but have also had the problem with the last couple of versions. It has been the kind of thing that I keep putting off debugging because I'm not sure where to start. Could it have to do with the way I'm extending the auth_user table? In my db.py I have auth = Auth(db, hmac_key=Auth.get_or_create_key()) # authent/authorization #adding custom field for user time zone auth.settings.extra_fields['auth_user'] = [ Field('time_zone', 'string', default='America/Toronto', requires=IS_IN_SET((common_timezones)), widget=SQLFORM.widgets.options.widget ) ] Although I'm able to use the data from that field without any trouble. Ian On Wednesday, September 18, 2013 12:41:19 PM UTC-4, Massimo Di Pierro wrote: Which version? On Wednesday, 18 September 2013 10:15:46 UTC-5, Ian W. Scott wrote: I'm experiencing an odd problem where some of my forms (including registration and login forms) need to be submitted 2 or 3 times before they are processed. It's been hard to solve because it doesn't seem entirely consistent. Has anyone run into this, and does anyone have any idea what the cause would be? Thanks, Ian -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] Re: Latest Trunk - problem with auth(session) and login using 'remember me'
Hi! It's still broken for me. googlecode 7a1ff6228799 I have a session in db. If I didn't check the Remember me than I get Traceback (most recent call last): File /home/gyszabolcs/fejlesztes/web2py/gluon/restricted.py, line 217, in restricted exec ccode in environment File /home/gyszabolcs/fejlesztes/web2py/applications/web2print/controllers/default.py, line 134, in module File /home/gyszabolcs/fejlesztes/web2py/gluon/globals.py, line 358, in lambda self._caller = lambda f: f() File /home/gyszabolcs/fejlesztes/web2py/applications/web2print/controllers/default.py, line 17, in user return dict(form=auth()) File /home/gyszabolcs/fejlesztes/web2py/gluon/tools.py, line 1293, in __call__ return getattr(self, args[0])() File /home/gyszabolcs/fejlesztes/web2py/gluon/tools.py, line 2249, in login self.login_user(user) File /home/gyszabolcs/fejlesztes/web2py/gluon/tools.py, line 1871, in login_user current.session.renew(clear_session=not self.settings.keep_session_onlogin) File /home/gyszabolcs/fejlesztes/web2py/gluon/globals.py, line 889, in renew rows = db(table.id==record_id)(table.unique_key==unique_key)\ NameError: global name 'db' is not defined In a model: db = DAL(settings.database_uri, pool_size=2) session.connect(request, response, db=db) 2013. augusztus 22., csütörtök 9:37:22 UTC+2 időpontban Massimo Di Pierro a következőt írta: I think it is solved in trunk (committed to googlecode only, github is down today). On Thursday, 22 August 2013 02:16:20 UTC-5, David Marko wrote: I know there are some changes in session internals in trunk, so just reporting an issue I observed. When I login using 'Remember me' checked, I'm getting this error below. Without 'remember me' its working just fine. I tried to remove all session files but still the same consistent behaviour ... Traceback 1. 2. 3. 4. 5. 6. 7. 8. 9. Traceback (most recent call last): File C:\java\web2py\gluon\restricted.py, line 217, in restricted exec ccode in environment File C:/java/web2py/applications/gapps/models/03_db.py http://web2py2.tcl-digitrade.com/admin/default/edit/gapps/models/03_db.py, line 49, in module auth = Auth(db) File C:\java\web2py\gluon\tools.py, line 1229, in __init__ auth.expiration KeyError: 'session_id_gapps' Error snapshot [image: help]http://web2py2.tcl-digitrade.com/admin/default/ticket/gapps/127.0.0.1.2013-08-22.09-11-58.ff9c728c-27f4-4f34-bddc-23c433cef9fe# type 'exceptions.KeyError'('session_id_gapps') inspect attributes Frames - *File C:\java\web2py\gluon\restricted.py in restricted at line 217* code arguments variables - *File C:\java\web2py\applications\gapps\models\03_db.py in module at line 49* code arguments variables - *File C:\java\web2py\gluon\tools.py in __init__ at line 1229* code arguments variables Function argument list (self=gluon.tools.Auth object, environment=DAL uri=sqlite://storage.sqlite, db=DAL uri=sqlite://storage.sqlite, mailer=True, hmac_key=None, controller='default', function='user', cas_provider=None, signature=True, secure=False) Code listing 1224. 1225. 1226. 1227. 1228. 1229. 1230. 1231. 1232. 1233. # for remember me option response = current.response if auth and auth.remember: # when user wants to be logged in for longer response.cookies[response.session_id_name][expires] = \ auth.expiration if signature: self.define_signature() else: self.signature = None -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] Re: Latest Trunk - problem with auth(session) and login using 'remember me'
The last googlecode eec36566d1ac partially works for me. The Remember me works but I have still the NameError: global name 'db' is not defined as seen below. It's if there is a session to renew... In tools.py 1870 line... (new session logic) current*.*session*.*renew*(*clear_session*=not self.*settings*.* keep_session_onlogin*)* 2013. augusztus 22., csütörtök 10:29:03 UTC+2 időpontban szimszon a következőt írta: Hi! It's still broken for me. googlecode 7a1ff6228799 I have a session in db. If I didn't check the Remember me than I get Traceback (most recent call last): File /home/gyszabolcs/fejlesztes/web2py/gluon/restricted.py, line 217, in restricted exec ccode in environment File /home/gyszabolcs/fejlesztes/web2py/applications/web2print/controllers/default.py, line 134, in module File /home/gyszabolcs/fejlesztes/web2py/gluon/globals.py, line 358, in lambda self._caller = lambda f: f() File /home/gyszabolcs/fejlesztes/web2py/applications/web2print/controllers/default.py, line 17, in user return dict(form=auth()) File /home/gyszabolcs/fejlesztes/web2py/gluon/tools.py, line 1293, in __call__ return getattr(self, args[0])() File /home/gyszabolcs/fejlesztes/web2py/gluon/tools.py, line 2249, in login self.login_user(user) File /home/gyszabolcs/fejlesztes/web2py/gluon/tools.py, line 1871, in login_user current.session.renew(clear_session=not self.settings.keep_session_onlogin) File /home/gyszabolcs/fejlesztes/web2py/gluon/globals.py, line 889, in renew rows = db(table.id==record_id)(table.unique_key==unique_key)\ NameError: global name 'db' is not defined In a model: db = DAL(settings.database_uri, pool_size=2) session.connect(request, response, db=db) 2013. augusztus 22., csütörtök 9:37:22 UTC+2 időpontban Massimo Di Pierro a következőt írta: I think it is solved in trunk (committed to googlecode only, github is down today). On Thursday, 22 August 2013 02:16:20 UTC-5, David Marko wrote: I know there are some changes in session internals in trunk, so just reporting an issue I observed. When I login using 'Remember me' checked, I'm getting this error below. Without 'remember me' its working just fine. I tried to remove all session files but still the same consistent behaviour ... Traceback 1. 2. 3. 4. 5. 6. 7. 8. 9. Traceback (most recent call last): File C:\java\web2py\gluon\restricted.py, line 217, in restricted exec ccode in environment File C:/java/web2py/applications/gapps/models/03_db.py http://web2py2.tcl-digitrade.com/admin/default/edit/gapps/models/03_db.py, line 49, in module auth = Auth(db) File C:\java\web2py\gluon\tools.py, line 1229, in __init__ auth.expiration KeyError: 'session_id_gapps' Error snapshot [image: help]http://web2py2.tcl-digitrade.com/admin/default/ticket/gapps/127.0.0.1.2013-08-22.09-11-58.ff9c728c-27f4-4f34-bddc-23c433cef9fe# type 'exceptions.KeyError'('session_id_gapps') inspect attributes Frames - *File C:\java\web2py\gluon\restricted.py in restricted at line 217* code arguments variables - *File C:\java\web2py\applications\gapps\models\03_db.py in module at line 49* code arguments variables - *File C:\java\web2py\gluon\tools.py in __init__ at line 1229* code arguments variables Function argument list (self=gluon.tools.Auth object, environment=DAL uri=sqlite://storage.sqlite, db=DAL uri=sqlite://storage.sqlite, mailer=True, hmac_key=None, controller='default', function='user', cas_provider=None, signature=True, secure=False) Code listing 1224. 1225. 1226. 1227. 1228. 1229. 1230. 1231. 1232. 1233. # for remember me option response = current.response if auth and auth.remember: # when user wants to be logged in for longer response.cookies[response.session_id_name][expires] = \ auth.expiration if signature: self.define_signature() else: self.signature = None -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] Re: Latest Trunk - problem with auth(session) and login using 'remember me'
Seems to work. Tnx! 2013. augusztus 22., csütörtök 11:36:16 UTC+2 időpontban Massimo Di Pierro a következőt írta: Please try again. Thanks for checking this. On Thursday, 22 August 2013 03:29:03 UTC-5, szimszon wrote: Hi! It's still broken for me. googlecode 7a1ff6228799 I have a session in db. If I didn't check the Remember me than I get Traceback (most recent call last): File /home/gyszabolcs/fejlesztes/web2py/gluon/restricted.py, line 217, in restricted exec ccode in environment File /home/gyszabolcs/fejlesztes/web2py/applications/web2print/controllers/default.py, line 134, in module File /home/gyszabolcs/fejlesztes/web2py/gluon/globals.py, line 358, in lambda self._caller = lambda f: f() File /home/gyszabolcs/fejlesztes/web2py/applications/web2print/controllers/default.py, line 17, in user return dict(form=auth()) File /home/gyszabolcs/fejlesztes/web2py/gluon/tools.py, line 1293, in __call__ return getattr(self, args[0])() File /home/gyszabolcs/fejlesztes/web2py/gluon/tools.py, line 2249, in login self.login_user(user) File /home/gyszabolcs/fejlesztes/web2py/gluon/tools.py, line 1871, in login_user current.session.renew(clear_session=not self.settings.keep_session_onlogin) File /home/gyszabolcs/fejlesztes/web2py/gluon/globals.py, line 889, in renew rows = db(table.id==record_id)(table.unique_key==unique_key)\ NameError: global name 'db' is not defined In a model: db = DAL(settings.database_uri, pool_size=2) session.connect(request, response, db=db) 2013. augusztus 22., csütörtök 9:37:22 UTC+2 időpontban Massimo Di Pierro a következőt írta: I think it is solved in trunk (committed to googlecode only, github is down today). On Thursday, 22 August 2013 02:16:20 UTC-5, David Marko wrote: I know there are some changes in session internals in trunk, so just reporting an issue I observed. When I login using 'Remember me' checked, I'm getting this error below. Without 'remember me' its working just fine. I tried to remove all session files but still the same consistent behaviour ... Traceback 1. 2. 3. 4. 5. 6. 7. 8. 9. Traceback (most recent call last): File C:\java\web2py\gluon\restricted.py, line 217, in restricted exec ccode in environment File C:/java/web2py/applications/gapps/models/03_db.py http://web2py2.tcl-digitrade.com/admin/default/edit/gapps/models/03_db.py, line 49, in module auth = Auth(db) File C:\java\web2py\gluon\tools.py, line 1229, in __init__ auth.expiration KeyError: 'session_id_gapps' Error snapshot [image: help]http://web2py2.tcl-digitrade.com/admin/default/ticket/gapps/127.0.0.1.2013-08-22.09-11-58.ff9c728c-27f4-4f34-bddc-23c433cef9fe# type 'exceptions.KeyError'('session_id_gapps') inspect attributes Frames - *File C:\java\web2py\gluon\restricted.py in restricted at line 217* code arguments variables - *File C:\java\web2py\applications\gapps\models\03_db.py in module at line 49* code arguments variables - *File C:\java\web2py\gluon\tools.py in __init__ at line 1229* code arguments variables Function argument list (self=gluon.tools.Auth object, environment=DAL uri=sqlite://storage.sqlite, db=DAL uri=sqlite://storage.sqlite, mailer=True, hmac_key=None, controller='default', function='user', cas_provider=None, signature=True, secure=False) Code listing 1224. 1225. 1226. 1227. 1228. 1229. 1230. 1231. 1232. 1233. # for remember me option response = current.response if auth and auth.remember: # when user wants to be logged in for longer response.cookies[response.session_id_name][expires] = \ auth.expiration if signature: self.define_signature() else: self.signature = None -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [web2py][LDAP] once authenticated with LDAP I got No fields to update
Could you try setting the logging_level to debug? from gluon.contrib.login_methods.ldap_auth import ldap_auth auth.settings.login_methods.append(ldap_auth(mode='ad', bind_dn='userName', bind_pw='passWord', manage_groups=False, server='serverName', base_dn='ou=OU,ou=OU,dc=DC,dc=DC', logging_level='debug')) And see if you get some messages and post it back? 2013. augusztus 1., csütörtök 23:25:18 UTC+2 időpontban Richard a következőt írta: Hello, I am trying to implement LDAP authentication right now and I am falling on issue No fields to update. As far as I know the authencation is working since I only start to have this issue once the it happen something else then have the same login blank form again and again. So, I think I have proper LDAP setting... from gluon.contrib.login_methods.ldap_auth import ldap_auth auth.settings.login_methods.append(ldap_auth(mode='ad', bind_dn='userName', bind_pw='passWord', manage_groups=False, server='serverName', base_dn='ou=OU,ou=OU,dc=DC,dc=DC')) I try set manage_groups=False because I found some pretty old thread talking about issue... But notting better. I also set explicitly a redirect on login : auth.settings.login_next = URL(c='default', f='index') What's happen once authentication success? Does AD try to update auth_user data somehow? Or Does web2py is waiting for update data that don't arrive cause of my configuration of LDAP, so I should tell web2py to not try update anything? Thanks PS.: ldap tag could be good Richard -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] Re: Encrypting/decrypting db values
+1 2013. június 25., kedd 22:23:32 UTC+2 időpontban Massimo Di Pierro a következőt írta: Should we include decrypt(key,data) and encrypt(key,data) in gluon.utils? On Tuesday, 25 June 2013 13:42:29 UTC-5, Niphlod wrote: sorry, cutpaste error. import gluon.contrib.aes as AES import threading import os import base64 def fast_urandom16(urandom=[], locker=threading.RLock()): this is 4x faster than calling os.urandom(16) and prevents the too many files open issue with concurrent access to os.urandom() try: return urandom.pop() except IndexError: try: locker.acquire() ur = os.urandom(16 * 1024) urandom += [ur[i:i + 16] for i in xrange(16, 1024 * 16, 16)] return ur[0:16] finally: locker.release() def pad(s, n=32, padchar=' '): return s + (32 - len(s) % 32) * padchar def AES_new(key, IV=None): Returns an AES cipher object and random IV if None specified if IV is None: IV = fast_urandom16() return AES.new(key, AES.MODE_CBC, IV), IV def w2p_encrypt(data): key = 'asdsaddasdasdas' key = pad(key[:32]) cipher, IV = AES_new(key) encrypted_data = IV + cipher.encrypt(pad(data)) return base64.urlsafe_b64encode(encrypted_data) def w2p_decrypt(data): key = 'asdsaddasdasdas' key = pad(key[:32]) data = base64.urlsafe_b64decode(data) IV, data = data[:16], data[16:] cipher, _ = AES_new(key, IV=IV) data = cipher.decrypt(data) data = data.rstrip(' ') return data db.define_table('t_test', Field('f_field') ) db.t_test.f_field.filter_in = lambda value : w2p_encrypt(value) db.t_test.f_field.filter_out = lambda value : w2p_decrypt(value) -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] Re: AD LDAP manage_user problem
It's like you do not have a db DAL object. Where is your db connection settings? 2013. június 3., hétfő 23:22:30 UTC+2 időpontban mrendon a következőt írta: Thanks! Is this it? Traceback (most recent call last): File /home/www-data/web2py/gluon/restricted.py, line 212, in restricted exec ccode in environment File /home/www-data/web2py/applications/alcolholedu/controllers/default.py, line 14, in module File /home/www-data/web2py/gluon/globals.py, line 194, in lambda self._caller = lambda f: f() File /home/www-data/web2py/applications/alcolholedu/controllers/default.py, line 3, in user def user(): return dict(form=auth()) File /home/www-data/web2py/gluon/tools.py, line 1285, in __call__ return getattr(self, args[0])() File /home/www-data/web2py/gluon/tools.py, line 2143, in login request.vars[passfield]): File /home/www-data/web2py/gluon/contrib/login_methods/ldap_auth.py, line 421, in ldap_auth_aux user_in_db = db(db.auth_user.email == username) AttributeError: 'NoneType' object has no attribute 'auth_user' On Monday, June 3, 2013 3:08:29 PM UTC-6, Derek wrote: We need to see the whole traceback. On Monday, June 3, 2013 9:21:51 AM UTC-7, mrendon wrote: Hi. I'm trying to get email address and name attributes imported into my database. I'm using Active Directory and version web2py 2.4.7-stable+timestamp.2013.05.24.17.48.47. I think I've followed the instructions in the ldap_auth.py file under gluon/contrib/login_methods. Relevant part of db.py: ## create all tables needed by auth if not custom tables auth.define_tables(username=True) auth.settings.create_user_groups=False ## configure auth policy auth.settings.registration_requires_verification = False auth.settings.registration_requires_approval = False auth.settings.reset_password_requires_verification = True # all we need is login auth.settings.actions_disabled=['register','change_password', 'request_reset_password','retrieve_username','profile'] # you don't have to remember me auth.settings.remember_me_form = False from gluon.contrib.login_methods.ldap_auth import ldap_auth auth.settings.login_methods.append(ldap_auth(mode='ad', server='xxx..xxx', base_dn='OU=,DC=,DC=xx', bind_dn='CN=xxx,CN=x,DC=xx,DC=x', bind_pw='xx', manage_user=True, user_firstname_attrib='cn:1', user_lastname_attrib='cn:2', user_mail_attrib='mail' )) I'm able to login without manage_user=True. But when I try to use it I get the following error: type 'exceptions.AttributeError'('NoneType' object has no attribute 'auth_user') Any ideas? -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] Using a recursive select but encountered a broken reference (versioning and auth.signature)
Hi All! I wonder if somebody could help me. I use record versioning with auth.signature but if I delete (is_active=False) the parent row than I got a Using a recursive select but encountered a broken reference ticket issued when I try to access the child... I opened a ticket about it: http://code.google.com/p/web2py/issues/detail?id=1419 with a video and test app. I think if I delete the parent row than the child's is_active should be set to False too. That is the case if I don't use auth.signature anyway... child row get deleted if I delete parent. -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] Re: scheduler sincronization
I think the period starts as the last execution ends. Sometimes I miss the feature to start the task exactly at fixed interval rater than fixed interval starting after the last run ends but I can live without it. :) It's a great tool anyway :-D 2013. március 25., hétfő 16:23:56 UTC+1 időpontban Paolo valleri a következőt írta: Dear all, I started to use scheduler. I've created a simple starting example task: https://github.com/ilvalle/scapp/blob/master/models/scheduler.py and with the great niphlod's plugin cs_monitor_plugin I created an initial repetitive task. However, although I set repeats: 0 and period: 300, tasks are not repeated as expected exactly every 300s. The first five tasks were executed at: 2013-03-25 15:34:43 2013-03-25 15:40:48 2013-03-25 15:46:52 2013-03-25 15:52:08 2013-03-25 15:57:22 The time between two consecutive execution is not so straightforward. what am I missing? Is there a way to impose more accuracy ? paolo -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [web2py] Re: scheduler sincronization
My bad. Never looked closely :( Than my guess is that the scheduler is exec the task at some point after the next run time and the actual running time is a base of the next run time not the original (first) intended run time. 2013. március 25., hétfő 16:42:04 UTC+1 időpontban Paolo valleri a következőt írta: Accordingly to the book http://web2py.com/books/default/chapter/29/04?search=scheduler#Scheduler-(experimental) It doesn't start when the previous task ends but when the previous task starts instead. Paolo 2013/3/25 szimszon szim...@gmail.com javascript: I think the period starts as the last execution ends. Sometimes I miss the feature to start the task exactly at fixed interval rater than fixed interval starting after the last run ends but I can live without it. :) It's a great tool anyway :-D 2013. március 25., hétfő 16:23:56 UTC+1 időpontban Paolo valleri a következőt írta: Dear all, I started to use scheduler. I've created a simple starting example task: https://github.com/ilvalle/**scapp/blob/master/models/**scheduler.pyhttps://github.com/ilvalle/scapp/blob/master/models/scheduler.py and with the great niphlod's plugin cs_monitor_plugin I created an initial repetitive task. However, although I set repeats: 0 and period: 300, tasks are not repeated as expected exactly every 300s. The first five tasks were executed at: 2013-03-25 15:34:43 2013-03-25 15:40:48 2013-03-25 15:46:52 2013-03-25 15:52:08 2013-03-25 15:57:22 The time between two consecutive execution is not so straightforward. what am I missing? Is there a way to impose more accuracy ? paolo -- --- You received this message because you are subscribed to a topic in the Google Groups web2py-users group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/web2py/u_PgzKLuQmw/unsubscribe?hl=en. To unsubscribe from this group and all its topics, send an email to web2py+un...@googlegroups.com javascript:. For more options, visit https://groups.google.com/groups/opt_out. -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] I got a fancy wiki problem. All user end up in rw mode :(
Hi! I wonder if somebody could help me. I tried to set up a wiki in web2py and I face some funny errors :( 1, In book http://web2py.com/books/default/chapter/29/03 there is: ''recognizes permissions for wiki-editor and wiki-author'' but auth.wiki creates ''wiki_editor'' not ''wiki-editor'' I think it's just a typo :) 2, I need a lot of read-only user and a handful writers but I end up with all user in read-write mode :( I created a user and add membership in wiki_editor group. I created a first page. I creaded a new user. The new user got in to a wiki_editor group. I delete the membership (I have record versioning) I log in with a new user. New user can create page and than I recognized that the new user got in to a wiki_editor group :( again. Miss I something? I tried with and without manage_permissions=True :( http://code.google.com/p/web2py/issues/detail?id=1381 Version 2.4.1-alpha.2+timestamp.2013.02.23.14.51.03 -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] Re: I got a fancy wiki problem. All user end up in rw mode :(
2013. március 11., hétfő 18:05:36 UTC+1 időpontban Alan Etkin a következőt írta: ''wiki-editor'' I think it's just a typo :) Me too, there's no use of wiki-editor in the Wiki class (it checks for wiki_editor) and than I recognized that the new user got in to a wiki_editor group Did he actually got into the editors group (was that membership record created)? Or it's that non editors can create pages? Yes he did got into the editors group. Membership record is created. -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] Re: I got a fancy wiki problem. All user end up in rw mode :(
What do you mean when you say logged into admin? Is someone logged into web2py admin interface? Is it relevant where is logged into the application? Because the admin interface has only a password for login. If it is relevant than it would be good the have some feedback in admin which user is logged in with the admin password. Display the name in menu or something... could be good. As for your question. It could be that I was logged into web2py's admin with the new user. So I missed that part. But it's a bit confusing anyway that the admin interface assign group membership in an app :-o The book say: If you are logged-in as administrator the wiki-editor group is created automatically and you are made a member. So is administrator a logged in user in web2py's admin interface? One more thing with it: if you inactivate the membership then it shouldn't touch it again and reactivate it... 2013. március 11., hétfő 18:22:24 UTC+1 időpontban Massimo Di Pierro a következőt írta: membership record should be created automatically only for users logged into admin. Are you saying this is not the case? On Monday, 11 March 2013 12:07:42 UTC-5, szimszon wrote: 2013. március 11., hétfő 18:05:36 UTC+1 időpontban Alan Etkin a következőt írta: ''wiki-editor'' I think it's just a typo :) Me too, there's no use of wiki-editor in the Wiki class (it checks for wiki_editor) and than I recognized that the new user got in to a wiki_editor group Did he actually got into the editors group (was that membership record created)? Or it's that non editors can create pages? Yes he did got into the editors group. Membership record is created. -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] Re: I got a fancy wiki problem. All user end up in rw mode :(
Okay. :) 2013. március 11., hétfő 20:22:11 UTC+1 időpontban Alan Etkin a következőt írta: Is it relevant where is logged into the application? It seems it is, since when the admininstrator session is expired, the wiki access control returns to normal behavior (it requires access rights for read and create wikis). -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] Re: Encrypt an email?
Hello! You can try this: http://web2py.com/books/default/chapter/29/08#x509-and-PGP-Encryption 2013. március 10., vasárnap 4:55:06 UTC+1 időpontban a.ma...@hotmail.com a következőt írta: I found that website http://www.msgpadlock.com who basically allow you to encrypt/decrypt a message that I can then copy paste into the email i want to send. My question is is there a better way? Thanks guys! -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] Re: Debugging with the scheduler
for the ugly print vars I use: import logging logger=logging.getLogger('web2py.app.yourappname') logger.setLevel(logging.DEBUG) logger.debug(msg) 2013. február 26., kedd 21:12:23 UTC+1 időpontban José L. a következőt írta: Hello, I'm working with async processes using the scheduler (with the unvaluable help of the learn by trial application from Niphlod. I wonder if there's an easy way to debug the processes that are being executed in the background (I'm having problems with them, they work ok when run from web2py directly as a normal process, but not when they're executed by the scheduler). Pdb would be great, but if not, is there any way to use the ugly but useful print vars commands to see the flow of execution of the tasks? I know of the output field in the scheduler_task table in the database, but that's terribly slow Regards. José L. -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] Old app and 2.4.1-alpha.2+timestamp.2013.01.18.10.00.28 and form submission get 'Consecutive update'
I wonder if somebody could help me. I have an old app with a simple form but if I try to submit in second time. I change some value than press Submit button (after that I got an extra # in the end of the url) than I change some value and press Submit button I end up with this flash message: A record change was detected. Consecutive update self-submissions are notallowed . Try re-submitting or refreshing the form page. Ubuntu Firefox 18.0.1 Thanks. -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] Re: Autoincrement field
Something about this issue? Should it work? 2013. január 28., hétfő 15:44:22 UTC+1 időpontban szimszon a következőt írta: Hi! I wonder if somebody could help me. The definet_table('sometable', Field('otherid', compute=lambda r: r['id']) ) doesn't work for me. :( Sould it work? With other than r['id'] it's working. Version 2.4.1-alpha.2+timestamp.2013.01.27.10.24.17 2010. május 28., péntek 16:02:23 UTC+2 időpontban mdipierro a következőt írta: yes On May 28, 3:44 am, Mathieu Clabaut mathieu.clab...@gmail.com wrote: I guess that one may want some more constraints on the autoincrement field. For example, it shall begin at 100 for ecample. It may be because for example, before the application exists some paper records where made which were referenced by number 100) For such a problem, I've set up with: Field('ref_number', compute=lambda r: r['id'] + 100) Which I hope would eliminate the race solution as it is calculate upon insertion in the database... Is it the case ? -Mathieu On Thu, May 27, 2010 at 23:25, mdipierro mdipie...@cs.depaul.edu wrote: What is wrong with the default id field that web2py creates for every table? On May 27, 3:16 pm, matclab mathieu.clab...@gmail.com wrote: Hello, I'm finding this message in a thread from February... I thought that autoincremented field would guaranty unicity in the table. I'm afraid the provided solution would allow two record to have the same autonumber field (think about an access from two users at the same time). I guess the autoincrement should be done on the DAL or database side, inside a transaction What do you think about it ? On 19 jan, 21:38, Thadeus Burgess thade...@thadeusb.com wrote: max_id= db(db.table.autonumber1).select(db.table.autonumber, # select all records, and only pull the autonumber column orderby=~db.table.autonumber, # descending sort on the autonumber, (highest first) limitby=(0,1) # limit the query and only select the first record ).first().autonumber # pull the first record from the web2py rows object, and get its autonumber member db.table.autonumber.default = max_id + 1 # Set the table default as the last autonumber and incremented by one. db.table.autonumber.writable = False form = crud.create(db.table) -Thadeus On Tue, Jan 19, 2010 at 4:32 AM, ceriox cer...@gmail.com wrote: thanks for the reply but i'm not a good web2py programmer ... i writing my first real app you can write the code for my request? (i can't understand the post of your link) -- 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+un...@googlegroups.comweb2py%2bunsubscr...@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 unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] Re: Autoincrement field
The really ugly thing is that compute can silently fail and you could end up with None in the db table cell :( 2013. január 29., kedd 9:13:29 UTC+1 időpontban szimszon a következőt írta: Something about this issue? Should it work? 2013. január 28., hétfő 15:44:22 UTC+1 időpontban szimszon a következőt írta: Hi! I wonder if somebody could help me. The definet_table('sometable', Field('otherid', compute=lambda r: r['id']) ) doesn't work for me. :( Sould it work? With other than r['id'] it's working. Version 2.4.1-alpha.2+timestamp.2013.01.27.10.24.17 2010. május 28., péntek 16:02:23 UTC+2 időpontban mdipierro a következőt írta: yes On May 28, 3:44 am, Mathieu Clabaut mathieu.clab...@gmail.com wrote: I guess that one may want some more constraints on the autoincrement field. For example, it shall begin at 100 for ecample. It may be because for example, before the application exists some paper records where made which were referenced by number 100) For such a problem, I've set up with: Field('ref_number', compute=lambda r: r['id'] + 100) Which I hope would eliminate the race solution as it is calculate upon insertion in the database... Is it the case ? -Mathieu On Thu, May 27, 2010 at 23:25, mdipierro mdipie...@cs.depaul.edu wrote: What is wrong with the default id field that web2py creates for every table? On May 27, 3:16 pm, matclab mathieu.clab...@gmail.com wrote: Hello, I'm finding this message in a thread from February... I thought that autoincremented field would guaranty unicity in the table. I'm afraid the provided solution would allow two record to have the same autonumber field (think about an access from two users at the same time). I guess the autoincrement should be done on the DAL or database side, inside a transaction What do you think about it ? On 19 jan, 21:38, Thadeus Burgess thade...@thadeusb.com wrote: max_id= db(db.table.autonumber1).select(db.table.autonumber, # select all records, and only pull the autonumber column orderby=~db.table.autonumber, # descending sort on the autonumber, (highest first) limitby=(0,1) # limit the query and only select the first record ).first().autonumber # pull the first record from the web2py rows object, and get its autonumber member db.table.autonumber.default = max_id + 1 # Set the table default as the last autonumber and incremented by one. db.table.autonumber.writable = False form = crud.create(db.table) -Thadeus On Tue, Jan 19, 2010 at 4:32 AM, ceriox cer...@gmail.com wrote: thanks for the reply but i'm not a good web2py programmer ... i writing my first real app you can write the code for my request? (i can't understand the post of your link) -- 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+un...@googlegroups.comweb2py%2bunsubscr...@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 unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] Re: Autoincrement field
Some other issue: db: import datetime db.define_table('sometable', Field('otherid', compute=lambda r: 'SPPRIME%s' % ( datetime.date.today().strftime('%y%m%d' )) ) If I insert a db row from modules current.db.sometable.insert() The new record has otherid==None :( 2013. január 29., kedd 9:17:38 UTC+1 időpontban szimszon a következőt írta: The really ugly thing is that compute can silently fail and you could end up with None in the db table cell :( 2013. január 29., kedd 9:13:29 UTC+1 időpontban szimszon a következőt írta: Something about this issue? Should it work? 2013. január 28., hétfő 15:44:22 UTC+1 időpontban szimszon a következőt írta: Hi! I wonder if somebody could help me. The definet_table('sometable', Field('otherid', compute=lambda r: r['id']) ) doesn't work for me. :( Sould it work? With other than r['id'] it's working. Version 2.4.1-alpha.2+timestamp.2013.01.27.10.24.17 2010. május 28., péntek 16:02:23 UTC+2 időpontban mdipierro a következőt írta: yes On May 28, 3:44 am, Mathieu Clabaut mathieu.clab...@gmail.com wrote: I guess that one may want some more constraints on the autoincrement field. For example, it shall begin at 100 for ecample. It may be because for example, before the application exists some paper records where made which were referenced by number 100) For such a problem, I've set up with: Field('ref_number', compute=lambda r: r['id'] + 100) Which I hope would eliminate the race solution as it is calculate upon insertion in the database... Is it the case ? -Mathieu On Thu, May 27, 2010 at 23:25, mdipierro mdipie...@cs.depaul.edu wrote: What is wrong with the default id field that web2py creates for every table? On May 27, 3:16 pm, matclab mathieu.clab...@gmail.com wrote: Hello, I'm finding this message in a thread from February... I thought that autoincremented field would guaranty unicity in the table. I'm afraid the provided solution would allow two record to have the same autonumber field (think about an access from two users at the same time). I guess the autoincrement should be done on the DAL or database side, inside a transaction What do you think about it ? On 19 jan, 21:38, Thadeus Burgess thade...@thadeusb.com wrote: max_id= db(db.table.autonumber1).select(db.table.autonumber, # select all records, and only pull the autonumber column orderby=~db.table.autonumber, # descending sort on the autonumber, (highest first) limitby=(0,1) # limit the query and only select the first record ).first().autonumber # pull the first record from the web2py rows object, and get its autonumber member db.table.autonumber.default = max_id + 1 # Set the table default as the last autonumber and incremented by one. db.table.autonumber.writable = False form = crud.create(db.table) -Thadeus On Tue, Jan 19, 2010 at 4:32 AM, ceriox cer...@gmail.com wrote: thanks for the reply but i'm not a good web2py programmer ... i writing my first real app you can write the code for my request? (i can't understand the post of your link) -- 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+un...@googlegroups.comweb2py%2bunsubscr...@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 unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] Re: Autoincrement field
http://code.google.com/p/web2py/issues/detail?id=1307 and http://code.google.com/p/web2py/issues/detail?id=1308 Tnx. 2013. január 29., kedd 15:15:59 UTC+1 időpontban Massimo Di Pierro a következőt írta: Please open a ticket about this. On Tuesday, 29 January 2013 03:05:17 UTC-6, szimszon wrote: Some other issue: db: import datetime db.define_table('sometable', Field('otherid', compute=lambda r: 'SPPRIME%s' % ( datetime.date.today().strftime( '%y%m%d')) ) If I insert a db row from modules current.db.sometable.insert() The new record has otherid==None :( 2013. január 29., kedd 9:17:38 UTC+1 időpontban szimszon a következőt írta: The really ugly thing is that compute can silently fail and you could end up with None in the db table cell :( 2013. január 29., kedd 9:13:29 UTC+1 időpontban szimszon a következőt írta: Something about this issue? Should it work? 2013. január 28., hétfő 15:44:22 UTC+1 időpontban szimszon a következőt írta: Hi! I wonder if somebody could help me. The definet_table('sometable', Field('otherid', compute=lambda r: r['id']) ) doesn't work for me. :( Sould it work? With other than r['id'] it's working. Version 2.4.1-alpha.2+timestamp.2013.01.27.10.24.17 2010. május 28., péntek 16:02:23 UTC+2 időpontban mdipierro a következőt írta: yes On May 28, 3:44 am, Mathieu Clabaut mathieu.clab...@gmail.com wrote: I guess that one may want some more constraints on the autoincrement field. For example, it shall begin at 100 for ecample. It may be because for example, before the application exists some paper records where made which were referenced by number 100) For such a problem, I've set up with: Field('ref_number', compute=lambda r: r['id'] + 100) Which I hope would eliminate the race solution as it is calculate upon insertion in the database... Is it the case ? -Mathieu On Thu, May 27, 2010 at 23:25, mdipierro mdipie...@cs.depaul.edu wrote: What is wrong with the default id field that web2py creates for every table? On May 27, 3:16 pm, matclab mathieu.clab...@gmail.com wrote: Hello, I'm finding this message in a thread from February... I thought that autoincremented field would guaranty unicity in the table. I'm afraid the provided solution would allow two record to have the same autonumber field (think about an access from two users at the same time). I guess the autoincrement should be done on the DAL or database side, inside a transaction What do you think about it ? On 19 jan, 21:38, Thadeus Burgess thade...@thadeusb.com wrote: max_id= db(db.table.autonumber1).select(db.table.autonumber, # select all records, and only pull the autonumber column orderby=~db.table.autonumber, # descending sort on the autonumber, (highest first) limitby=(0,1) # limit the query and only select the first record ).first().autonumber # pull the first record from the web2py rows object, and get its autonumber member db.table.autonumber.default = max_id + 1 # Set the table default as the last autonumber and incremented by one. db.table.autonumber.writable = False form = crud.create(db.table) -Thadeus On Tue, Jan 19, 2010 at 4:32 AM, ceriox cer...@gmail.com wrote: thanks for the reply but i'm not a good web2py programmer ... i writing my first real app you can write the code for my request? (i can't understand the post of your link) -- 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+un...@googlegroups.com web2py%2bunsubscr...@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 unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[web2py] Re: Autoincrement field
Hi! I wonder if somebody could help me. The definet_table('sometable', Field('otherid', compute=lambda r: r['id']) ) doesn't work for me. :( Sould it work? With other than r['id'] it's working. Version 2.4.1-alpha.2+timestamp.2013.01.27.10.24.17 2010. május 28., péntek 16:02:23 UTC+2 időpontban mdipierro a következőt írta: yes On May 28, 3:44 am, Mathieu Clabaut mathieu.clab...@gmail.com wrote: I guess that one may want some more constraints on the autoincrement field. For example, it shall begin at 100 for ecample. It may be because for example, before the application exists some paper records where made which were referenced by number 100) For such a problem, I've set up with: Field('ref_number', compute=lambda r: r['id'] + 100) Which I hope would eliminate the race solution as it is calculate upon insertion in the database... Is it the case ? -Mathieu On Thu, May 27, 2010 at 23:25, mdipierro mdipie...@cs.depaul.edu wrote: What is wrong with the default id field that web2py creates for every table? On May 27, 3:16 pm, matclab mathieu.clab...@gmail.com wrote: Hello, I'm finding this message in a thread from February... I thought that autoincremented field would guaranty unicity in the table. I'm afraid the provided solution would allow two record to have the same autonumber field (think about an access from two users at the same time). I guess the autoincrement should be done on the DAL or database side, inside a transaction What do you think about it ? On 19 jan, 21:38, Thadeus Burgess thade...@thadeusb.com wrote: max_id= db(db.table.autonumber1).select(db.table.autonumber, # select all records, and only pull the autonumber column orderby=~db.table.autonumber, # descending sort on the autonumber, (highest first) limitby=(0,1) # limit the query and only select the first record ).first().autonumber # pull the first record from the web2py rows object, and get its autonumber member db.table.autonumber.default = max_id + 1 # Set the table default as the last autonumber and incremented by one. db.table.autonumber.writable = False form = crud.create(db.table) -Thadeus On Tue, Jan 19, 2010 at 4:32 AM, ceriox cer...@gmail.com wrote: thanks for the reply but i'm not a good web2py programmer ... i writing my first real app you can write the code for my request? (i can't understand the post of your link) -- 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.comjavascript:. To unsubscribe from this group, send email to web2py+un...@googlegroups.com javascript: web2py%2bunsubscr...@googlegroups.com javascript: . For more options, visit this group athttp:// groups.google.com/group/web2py?hl=en. --
Re: [web2py] Re: Autoincrement field
postgresql Version: 8.4.12-0squeeze1 (producttion - not tested) postgresql Version: 9.1.7-0ubuntu12.10 (dev) I need somethink like: Field('otherid','string', compute=lambda r: 'SOMETHING%s%s' % ( str(datetime.date.today()), str(r['id']))) 2013. január 28., hétfő 15:48:24 UTC+1 időpontban Alec Taylor a következőt írta: Which DB are you using BTW? Because if you're using something like MySQL; they have inbuilt autoincrement fields which would be much better to utilise than what we provide in the DAL. Maybe we should have an 'autoincrement' field, like we have a 'datetime' field? Gracefully degrade to a lambda if there isn't native autoincrement support. On Tue, Jan 29, 2013 at 1:44 AM, szimszon szim...@gmail.com javascript: wrote: Hi! I wonder if somebody could help me. The definet_table('sometable', Field('otherid', compute=lambda r: r['id']) ) doesn't work for me. :( Sould it work? With other than r['id'] it's working. Version 2.4.1-alpha.2+timestamp.2013.01.27.10.24.17 2010. május 28., péntek 16:02:23 UTC+2 időpontban mdipierro a következőt írta: yes On May 28, 3:44 am, Mathieu Clabaut mathieu.clab...@gmail.com wrote: I guess that one may want some more constraints on the autoincrement field. For example, it shall begin at 100 for ecample. It may be because for example, before the application exists some paper records where made which were referenced by number 100) For such a problem, I've set up with: Field('ref_number', compute=lambda r: r['id'] + 100) Which I hope would eliminate the race solution as it is calculate upon insertion in the database... Is it the case ? -Mathieu On Thu, May 27, 2010 at 23:25, mdipierro mdipie...@cs.depaul.edu wrote: What is wrong with the default id field that web2py creates for every table? On May 27, 3:16 pm, matclab mathieu.clab...@gmail.com wrote: Hello, I'm finding this message in a thread from February... I thought that autoincremented field would guaranty unicity in the table. I'm afraid the provided solution would allow two record to have the same autonumber field (think about an access from two users at the same time). I guess the autoincrement should be done on the DAL or database side, inside a transaction What do you think about it ? On 19 jan, 21:38, Thadeus Burgess thade...@thadeusb.com wrote: max_id= db(db.table.autonumber1).select(db.table.autonumber, # select all records, and only pull the autonumber column orderby=~db.table.autonumber, # descending sort on the autonumber, (highest first) limitby=(0,1) # limit the query and only select the first record ).first().autonumber # pull the first record from the web2py rows object, and get its autonumber member db.table.autonumber.default = max_id + 1 # Set the table default as the last autonumber and incremented by one. db.table.autonumber.writable = False form = crud.create(db.table) -Thadeus On Tue, Jan 19, 2010 at 4:32 AM, ceriox cer...@gmail.com wrote: thanks for the reply but i'm not a good web2py programmer ... i writing my first real app you can write the code for my request? (i can't understand the post of your link) -- 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+un...@googlegroups.comweb2py%2bunsubscr...@googlegroups.comjavascript: . For more options, visit this group athttp:// groups.google.com/group/web2py?hl=en. -- --
Re: [web2py] Re: Autoincrement field
I'm definitively for an auto-increment field like datetime anyway :-D 2013. január 28., hétfő 15:48:24 UTC+1 időpontban Alec Taylor a következőt írta: Which DB are you using BTW? Because if you're using something like MySQL; they have inbuilt autoincrement fields which would be much better to utilise than what we provide in the DAL. Maybe we should have an 'autoincrement' field, like we have a 'datetime' field? Gracefully degrade to a lambda if there isn't native autoincrement support. On Tue, Jan 29, 2013 at 1:44 AM, szimszon szim...@gmail.com javascript: wrote: Hi! I wonder if somebody could help me. The definet_table('sometable', Field('otherid', compute=lambda r: r['id']) ) doesn't work for me. :( Sould it work? With other than r['id'] it's working. Version 2.4.1-alpha.2+timestamp.2013.01.27.10.24.17 2010. május 28., péntek 16:02:23 UTC+2 időpontban mdipierro a következőt írta: yes On May 28, 3:44 am, Mathieu Clabaut mathieu.clab...@gmail.com wrote: I guess that one may want some more constraints on the autoincrement field. For example, it shall begin at 100 for ecample. It may be because for example, before the application exists some paper records where made which were referenced by number 100) For such a problem, I've set up with: Field('ref_number', compute=lambda r: r['id'] + 100) Which I hope would eliminate the race solution as it is calculate upon insertion in the database... Is it the case ? -Mathieu On Thu, May 27, 2010 at 23:25, mdipierro mdipie...@cs.depaul.edu wrote: What is wrong with the default id field that web2py creates for every table? On May 27, 3:16 pm, matclab mathieu.clab...@gmail.com wrote: Hello, I'm finding this message in a thread from February... I thought that autoincremented field would guaranty unicity in the table. I'm afraid the provided solution would allow two record to have the same autonumber field (think about an access from two users at the same time). I guess the autoincrement should be done on the DAL or database side, inside a transaction What do you think about it ? On 19 jan, 21:38, Thadeus Burgess thade...@thadeusb.com wrote: max_id= db(db.table.autonumber1).select(db.table.autonumber, # select all records, and only pull the autonumber column orderby=~db.table.autonumber, # descending sort on the autonumber, (highest first) limitby=(0,1) # limit the query and only select the first record ).first().autonumber # pull the first record from the web2py rows object, and get its autonumber member db.table.autonumber.default = max_id + 1 # Set the table default as the last autonumber and incremented by one. db.table.autonumber.writable = False form = crud.create(db.table) -Thadeus On Tue, Jan 19, 2010 at 4:32 AM, ceriox cer...@gmail.com wrote: thanks for the reply but i'm not a good web2py programmer ... i writing my first real app you can write the code for my request? (i can't understand the post of your link) -- 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+un...@googlegroups.comweb2py%2bunsubscr...@googlegroups.comjavascript: . For more options, visit this group athttp:// groups.google.com/group/web2py?hl=en. -- --
[web2py] Re: Is it possible to define how a field is rendered in the DB model?
Hi! What is a difference between represent and filter_out? Tnx. --
[web2py] Repo in github missing
Where is the web2py repo from https://github.com/mdipierro/ ? Happy New Year for everyone! --
[web2py] Re: Repo in github missing
OK. Tnx. 2013. január 1., kedd 17:38:14 UTC+1 időpontban Massimo Di Pierro a következőt írta: I deleted it to avoid confusion. The official is github.com/web2py/web2py. On Tuesday, 1 January 2013 02:21:40 UTC-6, szimszon wrote: Where is the web2py repo from https://github.com/mdipierro/ ? Happy New Year for everyone! --
[web2py] Disable hidden columns export in grid
Hi All! I wonder if somebody could help me. How can I disable hidden column export in grid? --
[web2py] Re: Disable hidden columns export in grid
Nice and working feature :) Tnx. 2012. december 4., kedd 11:26:50 UTC+1 időpontban Niphlod a következőt írta: with trunk just pass exportclasses=dict(csv_with_hidden_cols=False, tsv_with_hidden_cols=False) On Tuesday, December 4, 2012 10:35:52 AM UTC+1, szimszon wrote: Hi All! I wonder if somebody could help me. How can I disable hidden column export in grid? --
[web2py] server request as transfer encoding: chunked not working
Hi All! I wonder if somebody could help me. I need a little help with rocket :( I have a contoller like: def statementlist(): body = request.body.read() return dict(body=body) And I try to send a request as: curl -H Transfer-Encoding: chunked --data 'Some data inside the request...' but the body is empty :( --
[web2py] Re: server request as transfer encoding: chunked not working
Version 2.2.1 (2012-11-04 20:45:19) stable --
[web2py] Re: server request as transfer encoding: chunked not working
Wow. Thanks for the hint :) Funny that the variables have a different type in *chunked*: request.body: type 'cStringIO.StringO' request.env.wsgi_input: class 'gluon.rocket.ChunkedReader' and in *Content-Lenght* context: request.body: type 'file' request.env.wsgi_input: class 'socket._fileobject' 2012. december 3., hétfő 13:10:31 UTC+1 időpontban Niphlod a következőt írta: don't know if it's a design decision but request.body is filled only if there is a content-length header, otherwise a StringIO() is returned. you can still read the contents iterating over request.env.wsgi_input On Monday, December 3, 2012 12:30:38 PM UTC+1, szimszon wrote: Version 2.2.1 (2012-11-04 20:45:19) stable --
[web2py] Re: server request as transfer encoding: chunked not working
I was able to handle it: try: import gluon if isinstance(request.env.wsgi_input, gluon.rocket.ChunkedReader): body = '' while True: try: s = request.env.wsgi_input.read(1) if s == '': break body += s except: break else: body = request.body.read() Any suggestion to make it better? Thanks. 2012. december 3., hétfő 13:10:31 UTC+1 időpontban Niphlod a következőt írta: don't know if it's a design decision but request.body is filled only if there is a content-length header, otherwise a StringIO() is returned. you can still read the contents iterating over request.env.wsgi_input On Monday, December 3, 2012 12:30:38 PM UTC+1, szimszon wrote: Version 2.2.1 (2012-11-04 20:45:19) stable --
[web2py] Re: Custom import creates module name conflicts (2.1.1)
I have in app's modules dir a modul named sftp.py and I try to use paramiko but sftp.py modul can't import it because paramiko has it's own modul named as sftp.py and custom_import find the app's module first and nor paramiko's :( http://code.google.com/p/web2py/issues/detail?id=1125 2012. október 22., hétfő 23:31:14 UTC+2 időpontban Jim Karsten a következőt írta: Thanks, Massimo. I upgraded to web2py v2.2.1 and that patch addresses the 'ImportError: cannot import name web2py_uuid' error. I still have name clashes with my constants.py module and MySQLdb. For now I am going to rename my module. I have some reservations about the new custom_importer as it can produce these clash problems and there is little I can do to prepare for them or protect my code from them. On Friday, October 19, 2012 7:37:44 PM UTC-4, Massimo Di Pierro wrote: Good catch. Fixed in trunk On Friday, 19 October 2012 16:54:54 UTC-5, Jim Karsten wrote: I upgraded to v 2.1.1 and now see problems with module name conflicts due to the custom importer. Previously I used v2.0.9 without problems. I have a custom application module named utils.py. This appears to conflict with the gluon.utils module. I was able to simulate using the basic web2py zip file and then creating a simple module applications/welcome/modules/utils.py. When I access the welcome default page, I get this error: Traceback (most recent call last): File /root/tmp/web2py/web2py/gluon/restricted.py, line 209, in restricted exec ccode in environment File /root/tmp/web2py/web2py/applications/welcome/models/db.py, line 42, in from gluon.tools import Auth, Crud, Service, PluginManager, prettydate File /root/tmp/web2py/web2py/gluon/custom_import.py, line 89, in custom_importer return NATIVE_IMPORTER(name,globals,locals,fromlist,level) File /root/tmp/web2py/web2py/gluon/tools.py, line 30, in from utils import web2py_uuid ImportError: cannot import name web2py_uuid I disabled the custom importer by issuing a return immediately in gluon/custom_import.py def custom_import_install() and the problem goes away. I can also correct this specific issue if I change this line in gluon/tools.py -from utils import web2py_uuid +from gluon.utils import web2py_uuid This last change works, but it isn't a complete solution. For example, in another application I have a constants.py module. It is conflicting with a constants module MySQLdb makes use of. Deep in the code of MySQLdb there is a line: from constants import CLIENT, FIELD_TYPE That import fails as it tries to find those classes in my custom module. I can always rename my custom module, but this becomes a cat and mouse game. I can't know every module name already in use. Any suggestions for this? It's a bit of a show stopper for me. Perhaps an option should be available to disable the custom importer. --
Re: [web2py] Re: manage_groups AD problem
I still have no means to test AD but I welcome all the help I can get :) Please put a print '##%s##' % str(group_row) or logger.warning('##%s##' % str(group_row)) line to the gluon/contrib/login_methods/ldap_auth.py file line 627. Restart web2py try and send the printed lines back. It seems to me that AD results are in other format than ldap results... 2012. október 20., szombat 13:21:52 UTC+2 időpontban software.ted a következőt írta: Hi, went to the office to try out your suggestion. Honetly the debug process is a little strange to me I had put a break at line with ldap_auth() but the next toggled went to very cryptic code i couldn't follow. On the other hand you suggested i try adding allowed_groups...i did that and when i click on the login button am getting a ticket. I have attached the ticket details, am not sure why its complaining about the list being indices when your documentation says the list values for allowed_groups should be str as follows: allowed_groups=['group1','group2','etc']. I have also noticed your old post: If there is somebody using ldap_auth with AD please try to test allowed_groups and / or manage_groups as I have no means to test it. And I do not know differences between OpenLdap and AD regarding groups :( Tnx. You still have not tested the group feature? I am quiet surprised, cause AD is widely used and you guys need to test. From the searches I have done, looks like AD does not work well with web2py as far as groups are concerned. I goes I have reached a dead end. : Thanks for your help. Teddy L. On Sat, Oct 20, 2012 at 9:52 AM, szimszon szim...@gmail.com javascript: wrote: ldap_auth(...as usual...,logging_level='debug') 2012. október 20., szombat 9:29:44 UTC+2 időpontban software.ted a következőt írta: Whr do I set the log level and see how the code is executing I realy need that for debugging. On Oct 20, 2012 9:20 AM, szimszon szim...@gmail.com wrote: Could you set ldap_auth's logging_level to debug and see (in console) what's happening? Or you could specify allowed_groups=['some group name'] if there a logic error and login works only with allowed_groups set. Sorry I have no AD to test. With ldap it works. So I need a bit help... 2012. október 20., szombat 7:44:20 UTC+2 időpontban software.ted a következőt írta: Yes that's one am referring to. The moment I introduce the parameter manage_groups users fail to login against AD...this is my sample code: from gluon.contrib.login_methods.ldap_auth import ldap_auth auth.settings.login_methods = [ldap_auth(mode='ad', manage_groups= True, bind_dn = 'CN=Admin,DC=example,DC=co,DC= zm', bind_pw = 'ADPASSWORD', group_dn = 'DC= example,DC=co,DC=zm', group_name_attrib = 'cn', group_member_attrib = 'member', group_filterstr = 'objectClass=Group', server='xxx.xxx.xxx.xxx', base_dn='dc=example,dc=co,dc=zm')] Any reason why group management is not working? Is there another way I can use AD users and assign rolls to certain users? Teddy L. On Oct 19, 2012 8:46 PM, Massimo Di Pierro massimo@gmail.com wrote: Are you talking about ldap_auth? On Friday, 19 October 2012 02:38:39 UTC-5, software.ted wrote: I am having trouble with manage_group=True, when I enable it i am getting Invalid Login but without it logins work. Does AD Group Management in web2py work? Kind regards, -- -- -- -- ... Teddy Lubasi Nyambe Opensource Zambia Lusaka, ZAMBIA Cell: +260 97 7760473 website: http://www.opensource.org.zm ~/ Human Knowledge belongs to the world! - AntiTrust Man is a tool-using animal. Without tools he is nothing, with tools he is all - Thomas Carlyle 1795-1881 /~ --
Re: [web2py] Re: manage_groups AD problem
Could you set ldap_auth's *logging_level* to debug and see (in console) what's happening? Or you could specify *allowed_groups*=['some group name'] if there a logic error and login works only with allowed_groups set. Sorry I have no AD to test. With ldap it works. So I need a bit help... 2012. október 20., szombat 7:44:20 UTC+2 időpontban software.ted a következőt írta: Yes that's one am referring to. The moment I introduce the parameter manage_groups users fail to login against AD...this is my sample code: from gluon.contrib.login_methods.ldap_auth import ldap_auth auth.settings.login_methods = [ldap_auth(mode='ad', manage_groups= True, bind_dn = 'CN=Admin,DC=example,DC=co,DC= zm', bind_pw = 'ADPASSWORD', group_dn = 'DC= example,DC=co,DC=zm', group_name_attrib = 'cn', group_member_attrib = 'member', group_filterstr = 'objectClass=Group', server='xxx.xxx.xxx.xxx', base_dn='dc=example,dc=co,dc=zm')] Any reason why group management is not working? Is there another way I can use AD users and assign rolls to certain users? Teddy L. On Oct 19, 2012 8:46 PM, Massimo Di Pierro massimo@gmail.comjavascript: wrote: Are you talking about ldap_auth? On Friday, 19 October 2012 02:38:39 UTC-5, software.ted wrote: I am having trouble with manage_group=True, when I enable it i am getting Invalid Login but without it logins work. Does AD Group Management in web2py work? Kind regards, -- --
Re: [web2py] Re: manage_groups AD problem
ldap_auth(...as usual...,logging_level='debug') 2012. október 20., szombat 9:29:44 UTC+2 időpontban software.ted a következőt írta: Whr do I set the log level and see how the code is executing I realy need that for debugging. On Oct 20, 2012 9:20 AM, szimszon szim...@gmail.com javascript: wrote: Could you set ldap_auth's *logging_level* to debug and see (in console) what's happening? Or you could specify *allowed_groups*=['some group name'] if there a logic error and login works only with allowed_groups set. Sorry I have no AD to test. With ldap it works. So I need a bit help... 2012. október 20., szombat 7:44:20 UTC+2 időpontban software.ted a következőt írta: Yes that's one am referring to. The moment I introduce the parameter manage_groups users fail to login against AD...this is my sample code: from gluon.contrib.login_methods.**ldap_auth import ldap_auth auth.settings.login_methods = [ldap_auth(mode='ad', manage_groups= True, bind_dn = 'CN=Admin,DC=example,DC=co,DC= zm', bind_pw = 'ADPASSWORD', group_dn = 'DC= example,DC=co,DC=zm', group_name_attrib = 'cn', group_member_attrib = 'member', group_filterstr = 'objectClass=Group', server='xxx.xxx.xxx.xxx', base_dn='dc=example,dc=co,dc=**zm')] Any reason why group management is not working? Is there another way I can use AD users and assign rolls to certain users? Teddy L. On Oct 19, 2012 8:46 PM, Massimo Di Pierro massimo@gmail.com wrote: Are you talking about ldap_auth? On Friday, 19 October 2012 02:38:39 UTC-5, software.ted wrote: I am having trouble with manage_group=True, when I enable it i am getting Invalid Login but without it logins work. Does AD Group Management in web2py work? Kind regards, -- -- --
[web2py] 2.1rc1 parse_version error
parse_version can handle only numbers... and not rc1 :( fileutils.py line 46: re_version = re.compile('[^\d]+ (\d+)\.(\d+)\.(\d+)\s*\((?Pdatetime.+?)\)\s*(?Ptype[a-z]+)?') --
[web2py] Re: 2.1rc1 parse_version error
In 2.1.0rc1 admin do not work. S'Traceback (most recent call last):\n File /home/gyszabolcs/fejlesztes/web2py/gluon/main.py, line 616, in wsgibase\nBaseAdapter. close_all_instances(\'rollback\')\n File /home/gyszabolcs/fejlesztes/web2py/gluon/dal.py, line 529, in close_all_instances\nTHREA D_LOCAL.db_instances.clear()\nAttributeError: \'thread._local\' object has no attribute \'db_instances\'\n' p4570 If you just do http://127.0.0.1:8000/admin you got error. 2012. október 8., hétfő 9:23:03 UTC+2 időpontban szimszon a következőt írta: parse_version can handle only numbers... and not rc1 :( fileutils.py line 46: re_version = re.compile('[^\d]+ (\d+)\.(\d+)\.(\d+)\s*\((?Pdatetime.+?)\)\s*(?Ptype[a-z]+)?') --
Re: [web2py] Please stop embedding Bootstrap classes in your HTML!
Recently was a bit messy the SQLFORM.[smart]grid because a class changed from button to btn :-o Because we need to maintain backward compatibility but the used css framework for welcome can change significantly I think that maintaining a web framework's own class names could be beneficial. So than the webapp's less/css can handle all web framework related class names and use it with recent css framework. 2012. október 4., csütörtök 15:01:11 UTC+2 időpontban Niphlod a következőt írta: I think the point stated is correct, but I don't remember having an html template that is interoperable and modify all the looks with just only css changes. Yes, zengarden is known to me and for simple pages you may have template and css that are decoupable, but with standard websites it's futile to develop a html template without class declarations (with javascript and canvas and fonts, the thing just got worse :D) If only existed one standard way to interpret css rules and behaviours, and only one screen size, maybe we could have arrived to decouple structure from presentation completely. But we had to deal with IE back in the days, now with mobiles, etc,etc,etc. I know very little about css and I use frameworks to let my site look good. If I wanted it to look cool, I'd surely go with my own styles. But I'm not a web designer. And spending time to find that one css rule that makes all browsers behave in the same way ... seems time wasted. Yes, less mixins are good, but I want to use sidebar and my css uses sidebar-left: are we sure that my convention is better than the one on the framework itself (and when I'll have to change my css, will I retain that name at all)? Css frameworks are used all around the web and quite all of them have classes going around (960.gs, blueprint, yurb, ez, etc) so when you're deploying your html you must follow their conventions (if you want to use css frameworks at all). I'm sure I would spend more time on re-making my own css (and tweaks, copying styles around and assigning them according to my naming convention) than adopting a new css framework and adjusting my html template to match the class-naming conventions of that framework. Additionally, if you don't write HTML by hand but you use some templating system, that change in html structure means practically no time at all. --
[web2py] removed form.vars.{fieldname}_newfilename -- I used it :(
Hi! https://github.com/mdipierro/web2py/commit/74418b1a6962bf2db36b46f9620e16297abfd059 I used it :( --
[web2py] crud file upload do not work :(
http://code.google.com/p/web2py/issues/detail?id=966 --
[web2py] Re: removed form.vars.{fieldname}_newfilename -- I used it :(
Thanks. 2012. augusztus 30., csütörtök 15:20:05 UTC+2 időpontban Massimo Di Pierro a következőt írta: This is an undocumented feature. You should be able to just use form.vars.fieldname instead of form.vars.fieldname_newfieldname it was redundant On Thursday, 30 August 2012 05:18:52 UTC-5, szimszon wrote: Hi! https://github.com/mdipierro/web2py/commit/74418b1a6962bf2db36b46f9620e16297abfd059 I used it :( --
[web2py] Re: menu, mobile phones and tablets
+1 https://groups.google.com/d/msg/web2py-developers/FMCF0HTs64A/CJ-PNCaIsuwJ 2012. augusztus 21., kedd 15:58:27 UTC+2 időpontban mweissen a következőt írta: I have played with some menu details and these are my results First try: response.menu = [ (T('Home'), False, URL('default','index'), [ (T('Dummy1'), False, URL('default','index'), [],), (T('Dummy2'), False, None, [],), (T('Desktop'), False, URL('default','index'), [], not (request.user_agent().is_mobile or request.user_agent().is_mobile)), (T('Mobile'), False, URL('default','index'), [], request.user_agent().is_mobile), (T('Tablet'), False, URL('default','index'), [], request.user_agent().is_tablet), ]) ] *Desktop:* I have expected and I got: Home | Dummy1 | Dummy2 | Desktop (#1) *Mobile phone:* I have expected: Home | Dummy1 | Dummy2 | Mobile I got: Home | Dummy1 | Mobile (#2) *Tablet:* I have expected: Home | Dummy1 | Dummy2 | Tablet I got: Home | Dummy1 | Mobile | Tablet (#2, #3) Now a second try: response.menu = [ (T('Home'), False, None, [ (T('Dummy1'), False, URL('default','index'), [],), (T('Dummy2'), False, None, [],), (T('Desktop'), False, URL('default','index'), [], not (request.user_agent().is_mobile or request.user_agent().is_mobile)), (T('Mobile'), False, URL('default','index'), [], request.user_agent().is_mobile), (T('Tablet'), False, URL('default','index'), [], request.user_agent().is_tablet), ]) ] *Desktop:* I have expected and I got: Home | Dummy1 | Dummy2 | Desktop (#1) *Mobile phone:* I have expected: Home | Dummy1 | Dummy2 | Mobile I got: empty menu (#2, #4) *Tablet:* I have expected: Home | Dummy1 | Dummy2 | Tablet I got: empty menu (#2, #4) Comments: #1: Everything works as expected, but only on a desktop pc #2: Menu items without a link are not displayed on a mobile device #3: Interesting: a tablet is a tablet *and *a mobile phone #4: The empty menu is very confusing. It took some hours to find it out, because my real menu is more complicated. Maybe #2, #3 and #4 are *features *and not *bugs*, but I think, these things should be documented or changed. My proposal: menu items should not become invisible depending on the device. If somebody wants this behavior he could use the fifth component. Maybe is_tablet should be True only for tablets and not for mobile phones too. But in this case there should be not only a mobile.html view but also a tablet.html. And this would make things more complicated. Regards, Martin --
[web2py] auth exception with Version 2.0.0 (2012-07-04 23:30:47) dev
Hi! I'm using ldap auth and after the web2py update I get: Traceback (most recent call last): File /home/PRIMERATE.LAN/gyszabolcs/fejlesztes/web2py/gluon/restricted.py, line 205, in restricted exec ccode in environment File /home/PRIMERATE.LAN/gyszabolcs/fejlesztes/web2py/applications/webadmin/controllers/default.py, line 2072, in module File /home/PRIMERATE.LAN/gyszabolcs/fejlesztes/web2py/gluon/globals.py, line 182, in lambda self._caller = lambda f: f() File /home/PRIMERATE.LAN/gyszabolcs/fejlesztes/web2py/applications/webadmin/controllers/default.py, line 2051, in user return dict( form = auth() ) File /home/PRIMERATE.LAN/gyszabolcs/fejlesztes/web2py/gluon/tools.py, line 1197, in __call__ return getattr(self,args[0])() File /home/PRIMERATE.LAN/gyszabolcs/fejlesztes/web2py/gluon/tools.py, line 1832, in login if temp_user.registration_key == 'pending': File /home/PRIMERATE.LAN/gyszabolcs/fejlesztes/web2py/gluon/dal.py, line 6156, in __getattr__ return self[key] File /home/PRIMERATE.LAN/gyszabolcs/fejlesztes/web2py/gluon/dal.py, line 6147, in __getitem__ return dict.__getitem__(self, key) KeyError: 'registration_key' http://code.google.com/p/web2py/issues/detail?id=876
[web2py] with the new welcome app as template in mobile view some menu isn't accessible
I have an app with Version 2.00.0 (2012-07-01 22:43:58) dev of welcome as template. But if I browse it with a mobile all the menus with a submenu didn't get into the dropdown list. So I can access only the top level menus without submenu. :( With a new look I can't put a link in top level menu if it has a submenu. Thats ok. Can that be the problem?
[web2py] Re: smartgrid look feel with last trunk
Okay. If it was intended then is should stay so... :) 2012. július 3., kedd 0:12:30 UTC+2 időpontban Anthony a következőt írta: I agree -- I think it's good to make a visual distinction between the references (links) and the actions (buttons). Anthony On Monday, July 2, 2012 5:40:17 PM UTC-4, Jim S wrote: I personally like it the new way. Just my 2 cents. -Jim On Monday, July 2, 2012 8:45:13 AM UTC-5, szimszon wrote: Hi! I noticed the following if you create a new app from welcome with smartgrid then the linked table names aren't looking like buttons anymore. And the acural table names are just a link it looks a bit odd...
[web2py] smartgrid look feel with last trunk
Hi! I noticed the following if you create a new app from welcome with smartgrid then the linked table names aren't looking like buttons anymore. And the acural table names are just a link it looks a bit odd... attachment: linked-tables.jpgattachment: linked-tables2.jpg
[web2py] Re: smartgrid look feel with last trunk
http://code.google.com/p/web2py/issues/detail?id=870 2012. július 2., hétfő 15:45:13 UTC+2 időpontban szimszon a következőt írta: Hi! I noticed the following if you create a new app from welcome with smartgrid then the linked table names aren't looking like buttons anymore. And the acural table names are just a link it looks a bit odd...
[web2py] Re: Error importing ldap_auth module
Try to use ldap_auth.py from trunk. Just copy it over the old one. You say Python 2.7.3 but in the error there is a ... python2.6/dist-packages/ldap ... 2012. június 21., csütörtök 16:39:40 UTC+2 időpontban ehgonzalez a következőt írta: Hi, When I try to import the ldap_auth module in my db.py is throwing an error. Here's the traceback: Traceback (most recent call last): File /var/www/web2pytest/gluon/restricted.py, line 205, in restricted exec ccode in environment File /var/www/web2pytest/applications/SMS/models/db.py https://web2py-test.pdvsa.com/admin/default/edit/SMS/models/db.py, line 44, in module from gluon.contrib.login_methods.ldap_auth import ldap_auth File /var/www/web2pytest/gluon/custom_import.py, line 293, in __call__ fromlist, level) File /var/www/web2pytest/gluon/custom_import.py, line 78, in __call__ level) File /var/www/web2pytest/gluon/contrib/login_methods/ldap_auth.py, line 9, in module raise e SystemError: error 89 from ldap_set_option Web2py's Shell: In [1] : import ldap In [2] : import ldap.filter In [3] : ldap.set_option( ldap.OPT_REFERRALS, 0 ) Traceback (most recent call last): File /var/www/web2py/gluon/contrib/shell.py, line 225, in run exec compiled in statement_module.__dict__ File string, line 1, in module File /usr/lib/python2.6/dist-packages/ldap/functions.py, line 124, in set_option _ldap_function_call(_ldap.set_option,option,invalue) File /usr/lib/python2.6/dist-packages/ldap/functions.py, line 57, in _ldap_function_call result = func(*args,**kwargs) SystemError: error 89 from ldap_set_option Debian 6.0.5, Apache 2.2.16, WSGI 3.3-2, Python 2.7.3, , web2py 1.99.7. Any help much appreciated. Eduardo. --
[web2py] Re: Error importing ldap_auth module
common ldap utilities are working? ldapsearch and co? 2012. június 21., csütörtök 17:34:45 UTC+2 időpontban ehgonzalez a következőt írta: You rigth, python version is 2.6.6. I copied ldap_auth.py from trunk but it's throwing same error. any ideas? El jueves, 21 de junio de 2012 10:18:43 UTC-4:30, szimszon escribió: Try to use ldap_auth.py from trunk. Just copy it over the old one. You say Python 2.7.3 but in the error there is a ... python2.6/dist-packages/ldap ... 2012. június 21., csütörtök 16:39:40 UTC+2 időpontban ehgonzalez a következőt írta: Hi, When I try to import the ldap_auth module in my db.py is throwing an error. Here's the traceback: Traceback (most recent call last): File /var/www/web2pytest/gluon/restricted.py, line 205, in restricted exec ccode in environment File /var/www/web2pytest/applications/SMS/models/db.py https://web2py-test.pdvsa.com/admin/default/edit/SMS/models/db.py, line 44, in module from gluon.contrib.login_methods.ldap_auth import ldap_auth File /var/www/web2pytest/gluon/custom_import.py, line 293, in __call__ fromlist, level) File /var/www/web2pytest/gluon/custom_import.py, line 78, in __call__ level) File /var/www/web2pytest/gluon/contrib/login_methods/ldap_auth.py, line 9, in module raise e SystemError: error 89 from ldap_set_option Web2py's Shell: In [1] : import ldap In [2] : import ldap.filter In [3] : ldap.set_option( ldap.OPT_REFERRALS, 0 ) Traceback (most recent call last): File /var/www/web2py/gluon/contrib/shell.py, line 225, in run exec compiled in statement_module.__dict__ File string, line 1, in module File /usr/lib/python2.6/dist-packages/ldap/functions.py, line 124, in set_option _ldap_function_call(_ldap.set_option,option,invalue) File /usr/lib/python2.6/dist-packages/ldap/functions.py, line 57, in _ldap_function_call result = func(*args,**kwargs) SystemError: error 89 from ldap_set_option Debian 6.0.5, Apache 2.2.16, WSGI 3.3-2, Python 2.7.3, , web2py 1.99.7. Any help much appreciated. Eduardo. --
Re: [web2py] Users Poll: To keep the button look for the welcome app's auth options, or not ?
b.1 2012. június 17., vasárnap 8:06:54 UTC+2 időpontban encompass a következőt írta: B.1 looks nice. On 06/17/2012 06:30 AM, Andrew wrote: A week or two ago a change was made to the nav bar to give the auth buttons for Login, Register, etc a button look. This was part of the fix to the dropdown menus to get them to work with bootstrap. Another change was made to revert back to the old look (but only as an attachment to a previous post in this list). There are two screen shots, current welcome app, and with the buttons reverted to the old look. Credit to Paolo for making both changes. Given that the buttons have been in trunk for a while, it is worth getting a consensus to keep it or revert it. So: *Vote:* *A) KEEP THE BUTTON LOOK* *B) REVERT TO THE OLD LOOK* * * *if B) * * * *B.1) Revert to the Pipe separator between the options (as shown)* *B.2) Don't include the Pipe separator.* B.1) involves updating a recent patch to layout.html: div id=navbar{{='auth' in globals() and auth.navbar(separators=(' ',' | ','')) or ''}}/div A patch for B.1) has already been sent to Massimo (that's my vote :) ) , but let's see what the general feeling is. Thanks
[web2py] Re: commit 2799e09d6bb4 broke backward compatibility
+1 2012. június 5., kedd 22:22:44 UTC+2 időpontban Niphlod a következőt írta: The only thing coming to mind is add a web2py-component-flash-international header in new trunk and check only that in new web2py.js, leaving web2py-component-flash header the way it was before. Il giorno martedì 5 giugno 2012 22:17:36 UTC+2, Massimo Di Pierro ha scritto: We cannot do that. Yet I agree that this improvement broke backward compatibility and needs to be reverted until we find a way to deal with intrnationalization of flash and in a backward compatible way. On Tuesday, 5 June 2012 15:02:07 UTC-5, Niphlod wrote: Hi, I'm all for supporting international flash messages, but for applications relying on the old web2py.js (or even web2py_ajax.js) the message appear urlencoded. That's because *var flash=**decodeURIComponent(**xhr.getResponseHeader('web2py-component-flash'**)**); *expects an encoded flash message (done in main.py in trunk) but if it isn't (encoded, e.g. using the 1.99.7 version) the old line transforming web2py-component-flash header gets the raw urlencoded message i.e. shows form%20accepted instead of form accepted. Maybe a message stating that web2py.js or web2py_ajax.js of old apps needs to be overwritten by the one in welcome for web2py 2.0.0 will prevent angry users :P
[web2py] newcron.py, line 227 AttributeError: 'list' object has no attribute 'split'
http://code.google.com/p/web2py/issues/detail?id=849 Exception in thread Thread-21: Traceback (most recent call last): File /usr/lib/python2.7/threading.py, line 551, in __bootstrap_inner self.run() File /home/szimszon/fejlesztes/sajat/web2py/gluon/newcron.py, line 227, in run proc = subprocess.Popen(self.cmd.split(), AttributeError: 'list' object has no attribute 'split' Version 2.00.0 (2012-06-10 01:18:28) dev
[web2py] Re: newcron.py, line 227 AttributeError: 'list' object has no attribute 'split'
It's on the console where you start the web2py.py... 2012. június 11., hétfő 14:19:45 UTC+2 időpontban szimszon a következőt írta: http://code.google.com/p/web2py/issues/detail?id=849 Exception in thread Thread-21: Traceback (most recent call last): File /usr/lib/python2.7/threading.py, line 551, in __bootstrap_inner self.run() File /home/szimszon/fejlesztes/sajat/web2py/gluon/newcron.py, line 227, in run proc = subprocess.Popen(self.cmd.split(), AttributeError: 'list' object has no attribute 'split' Version 2.00.0 (2012-06-10 01:18:28) dev
[web2py] Re: newcron.py, line 227 AttributeError: 'list' object has no attribute 'split'
I'm running it on Linux and I have nothing in cron. I use scheduler and linux crontab. 2012. június 11., hétfő 20:58:55 UTC+2 időpontban Niphlod a következőt írta: I'm running from source and I don't see the error, but I think I know what's going on. Have you something in your applications crontab ? also, are you on linux, mac or windows ? Il giorno lunedì 11 giugno 2012 18:49:58 UTC+2, simon ha scritto: I also get this. It appears after the cron fix update to trunk. On Monday, 11 June 2012 14:23:20 UTC+1, szimszon wrote: It's on the console where you start the web2py.py... 2012. június 11., hétfő 14:19:45 UTC+2 időpontban szimszon a következőt írta: http://code.google.com/p/web2py/issues/detail?id=849 Exception in thread Thread-21: Traceback (most recent call last): File /usr/lib/python2.7/threading.py, line 551, in __bootstrap_inner self.run() File /home/szimszon/fejlesztes/sajat/web2py/gluon/newcron.py, line 227, in run proc = subprocess.Popen(self.cmd.split(), AttributeError: 'list' object has no attribute 'split' Version 2.00.0 (2012-06-10 01:18:28) dev
[web2py] session in cookies
Hi All! What is the use case behind a session in cookies scenario? Tnx.
[web2py] Re: grid's web2py style cleanup
I don't think so. bootstrap use button too... Using two or more css template system could be problematic because name collisions... 2012. június 10., vasárnap 12:01:19 UTC+2 időpontban villas a következőt írta: I think many of these problems are resolved by the inclusion of static/css/css3buttons.css On Wednesday, June 6, 2012 1:37:51 PM UTC+1, szimszon wrote: Hi! I wonder if somebody could help to clean up sqlhtml.py's grid web2py style because there are buttons with 'button' and 'buttontext' class but the css have no visible definition for it. It should be 'btn' or something. I opened an issue about it in google code: http://code.google.com/p/web2py/issues/detail?id=840 Thanks.
[web2py] Re: commit 2799e09d6bb4 broke backward compatibility
There are sometimes null displayed in flash :( (Version 2.0.0 (2012-06-10 01:18:28) dev) 2012. június 5., kedd 22:22:44 UTC+2 időpontban Niphlod a következőt írta: The only thing coming to mind is add a web2py-component-flash-international header in new trunk and check only that in new web2py.js, leaving web2py-component-flash header the way it was before. Il giorno martedì 5 giugno 2012 22:17:36 UTC+2, Massimo Di Pierro ha scritto: We cannot do that. Yet I agree that this improvement broke backward compatibility and needs to be reverted until we find a way to deal with intrnationalization of flash and in a backward compatible way. On Tuesday, 5 June 2012 15:02:07 UTC-5, Niphlod wrote: Hi, I'm all for supporting international flash messages, but for applications relying on the old web2py.js (or even web2py_ajax.js) the message appear urlencoded. That's because *var flash=**decodeURIComponent(**xhr.getResponseHeader('web2py-component-flash'**)**); *expects an encoded flash message (done in main.py in trunk) but if it isn't (encoded, e.g. using the 1.99.7 version) the old line transforming web2py-component-flash header gets the raw urlencoded message i.e. shows form%20accepted instead of form accepted. Maybe a message stating that web2py.js or web2py_ajax.js of old apps needs to be overwritten by the one in welcome for web2py 2.0.0 will prevent angry users :P
[web2py] LOAD with ajax=True not working please help
Version 2.00.0 (2012-06-05 00:02:52) dev in layout.html {{=LOAD('default','setuser',extension='load',ajax=True)}} $(# + target) is null @ http://127.0.0.1:8000/.../static/js/web2py.js:107 without ajax=True it loads but is is working correctly only with ajax=True :( http://code.google.com/p/web2py/issues/detail?id=839
[web2py] Re: Anyone using BootSwatch with new web2py layout
I have issue with dropdown menu when the main menu is a link too. If I click on the main menu than that menu is activated and I can't access the items below it with any means :(
[web2py] Re: LOAD with ajax=True not working please help
Here is what I found with help of http://stackoverflow.com/questions/777062/jquery-field-is-null --- web2py.js.old2012-06-04 22:02:56.0 +0200 +++ web2py.js2012-06-06 14:12:48.546141468 +0200 @@ -104,8 +104,8 @@ function web2py_component(action, target, timeout, times){ jQuery(function(){ -var element = $(# + target).get(0); -var statement = $('# + target + ').get(0).reload();; +var element = jQuery(# + target).get(0); +var statement = jQuery('# + target + ').get(0).reload();; element.reload = function (){ // Continue if times is Infinity or // the times limit is not reached 2012. június 6., szerda 13:38:12 UTC+2 időpontban szimszon a következőt írta: Version 2.00.0 (2012-06-05 00:02:52) dev in layout.html {{=LOAD('default','setuser',extension='load',ajax=True)}} $(# + target) is null @ http://127.0.0.1:8000/.../static/js/web2py.js:107 without ajax=True it loads but is is working correctly only with ajax=True :( http://code.google.com/p/web2py/issues/detail?id=839
[web2py] grid's web2py style cleanup
Hi! I wonder if somebody could help to clean up sqlhtml.py's grid web2py style because there are buttons with 'button' and 'buttontext' class but the css have no visible definition for it. It should be 'btn' or something. I opened an issue about it in google code: http://code.google.com/p/web2py/issues/detail?id=840 Thanks.
[web2py] Re: grid's web2py style cleanup
SQLFORM.grid and .smartgrid is experimental... If grid and smartgrid will use the button and buttontext class for buttons in grid with new app you have to add this class definition back manually to the new lookfeel layout :( What if grid and smartgrid can access some resource in app layout system with class names and can adopt to the new underlying css system. 2012. június 6., szerda 15:30:08 UTC+2 időpontban LightDot a következőt írta: I don't have a personal preference about this since I'm not using these selectors in any project. But even if the default css doesn't use them, some developer could already be using them for custom css definitions. So wouldn't this break backward compatibility of web2py? Regards On Wednesday, June 6, 2012 2:37:51 PM UTC+2, szimszon wrote: Hi! I wonder if somebody could help to clean up sqlhtml.py's grid web2py style because there are buttons with 'button' and 'buttontext' class but the css have no visible definition for it. It should be 'btn' or something. I opened an issue about it in google code: http://code.google.com/p/web2py/issues/detail?id=840 Thanks.
[web2py] Re: grid's web2py style cleanup
Or better the dictionary should be tied in the layout(.html) somehow. I think it would better than polluting the web2py core with time limited data... it could be a javascript / javascript variable that should set the right class names in layout scope. So people do not need to search and replace in all their code if new layout is applied. 2012. június 6., szerda 17:25:40 UTC+2 időpontban LightDot a következőt írta: Quite right, I forgot that the grids are experimental. Sorry, I was too quick to comment in regards to backward compatibility. I missed the scope of the issue anyway, since if I remember right, ui setting for the grid is already defined as a dictionary in sqlhtml.py. With definitions such as button='button', etc. So you are suggesting a new ui dictionary, predefined for the bootstrap? Similar to the jquery-ui dictionary that is already in the sqlhtml.py? I should have realized that sooner... And it's a great idea, of course. Regards On Wednesday, June 6, 2012 3:57:40 PM UTC+2, szimszon wrote: SQLFORM.grid and .smartgrid is experimental... If grid and smartgrid will use the button and buttontext class for buttons in grid with new app you have to add this class definition back manually to the new lookfeel layout :( What if grid and smartgrid can access some resource in app layout system with class names and can adopt to the new underlying css system. 2012. június 6., szerda 15:30:08 UTC+2 időpontban LightDot a következőt írta: I don't have a personal preference about this since I'm not using these selectors in any project. But even if the default css doesn't use them, some developer could already be using them for custom css definitions. So wouldn't this break backward compatibility of web2py? Regards On Wednesday, June 6, 2012 2:37:51 PM UTC+2, szimszon wrote: Hi! I wonder if somebody could help to clean up sqlhtml.py's grid web2py style because there are buttons with 'button' and 'buttontext' class but the css have no visible definition for it. It should be 'btn' or something. I opened an issue about it in google code: http://code.google.com/p/web2py/issues/detail?id=840 Thanks.
[web2py] I have trouble with the new scheduler and mysql: NotSupportedError
http://code.google.com/p/web2py/issues/detail?id=833 After upgrading to Version 2.0.0 (2012-06-02 16:44:25) dev I got this if I start scheduler: Currently running 1 scheduler processes Processes started 2012-06-04 09:40:47,874 - root - DEBUG - defining tables (migrate=True) 2012-06-04 09:40:47,880 - root - DEBUG - thread building own DAL object 2012-06-04 09:40:47,880 - root - DEBUG - looping... 2012-06-04 09:40:47,883 - root - DEBUG - defining tables (migrate=False) 2012-06-04 09:40:47,886 - root - DEBUG - recording heartbeat 2012-06-04 09:40:47,887 - root - DEBUG - freeing workers that have not sent heartbeat 2012-06-04 09:40:47,889 - root - INFO - TICKER: I'm a ticker (info-szimszon#709cdf44-805a-41a5-b197-8aa124acf311) Traceback (most recent call last): File /home/PRIMERATE.LAN/gyszabolcs/fejlesztes/web2py/gluon/shell.py, line 219, in run exec(python_code, _env) File string, line 1, in module File /home/PRIMERATE.LAN/gyszabolcs/fejlesztes/web2py/gluon/scheduler.py, line 398, in loop MetaScheduler.loop(self) File /home/PRIMERATE.LAN/gyszabolcs/fejlesztes/web2py/gluon/scheduler.py, line 279, in loop task = self.pop_task() File /home/PRIMERATE.LAN/gyszabolcs/fejlesztes/web2py/gluon/scheduler.py, line 423, in pop_task ).update(status=RUNNING,last_run_time=now) #reduces collisions? File /home/PRIMERATE.LAN/gyszabolcs/fejlesztes/web2py/gluon/dal.py, line 8147, in update if any(f(self,update_fields) for f in table._before_update): return 0 File /home/PRIMERATE.LAN/gyszabolcs/fejlesztes/web2py/gluon/dal.py, line 8147, in genexpr if any(f(self,update_fields) for f in table._before_update): return 0 File /home/PRIMERATE.LAN/gyszabolcs/fejlesztes/web2py/gluon/dal.py, line 7051, in lambda archive_record(qset,fs,at,cn)) File /home/PRIMERATE.LAN/gyszabolcs/fejlesztes/web2py/gluon/dal.py, line 7450, in archive_record for row in qset.select(): File /home/PRIMERATE.LAN/gyszabolcs/fejlesztes/web2py/gluon/dal.py, line 8130, in select return adapter.select(self.query,fields,attributes) File /home/PRIMERATE.LAN/gyszabolcs/fejlesztes/web2py/gluon/dal.py, line 1400, in select rows = response(sql) File /home/PRIMERATE.LAN/gyszabolcs/fejlesztes/web2py/gluon/dal.py, line 1390, in response self.execute(sql) File /home/PRIMERATE.LAN/gyszabolcs/fejlesztes/web2py/gluon/dal.py, line 1479, in execute return self.log_execute(*a, **b) File /home/PRIMERATE.LAN/gyszabolcs/fejlesztes/web2py/gluon/dal.py, line 1473, in log_execute ret = self.cursor.execute(*a, **b) File /home/PRIMERATE.LAN/gyszabolcs/fejlesztes/web2py/gluon/contrib/pymysql/cursors.py, line 108, in execute self.errorhandler(self, exc, value) File /home/PRIMERATE.LAN/gyszabolcs/fejlesztes/web2py/gluon/contrib/pymysql/connections.py, line 184, in defaulterrorhandler raise errorclass, errorvalue NotSupportedError: (1235, uThis version of MySQL doesn't yet support 'LIMIT IN/ALL/ANY/SOME subquery')
[web2py] Re: I have trouble with the new scheduler and mysql: NotSupportedError
Here is a quick patch need testing: --- scheduler.py.old2012-06-02 14:44:26.0 +0200 +++ scheduler.py2012-06-04 10:46:35.557913663 +0200 @@ -417,13 +417,13 @@ return None grabbed = db(ts.assigned_worker_name==self.worker_name)\ (ts.status==ASSIGNED) -task_id = grabbed._select(ts.id, limitby=(0,1), orderby=ts.next_run_time) -updated = db( -ts.id.belongs(task_id) -).update(status=RUNNING,last_run_time=now) #reduces collisions? -#noone will touch my task! -db.commit() -if updated: +task_row = grabbed.select(ts.id, limitby=(0,1), orderby=ts.next_run_time).first() +if task_row: +updated = db( +ts.id.belongs(task_row.id) +).update(status=RUNNING,last_run_time=now) #reduces collisions? +#noone will touch my task! +db.commit() logging.debug(' work to do %s' % updated) task = db(ts.assigned_worker_name==self.worker_name)\ (ts.status==RUNNING).select().first() 2012. június 4., hétfő 9:47:29 UTC+2 időpontban szimszon a következőt írta: http://code.google.com/p/web2py/issues/detail?id=833 After upgrading to Version 2.0.0 (2012-06-02 16:44:25) dev I got this if I start scheduler: Currently running 1 scheduler processes Processes started 2012-06-04 09:40:47,874 - root - DEBUG - defining tables (migrate=True) 2012-06-04 09:40:47,880 - root - DEBUG - thread building own DAL object 2012-06-04 09:40:47,880 - root - DEBUG - looping... 2012-06-04 09:40:47,883 - root - DEBUG - defining tables (migrate=False) 2012-06-04 09:40:47,886 - root - DEBUG - recording heartbeat 2012-06-04 09:40:47,887 - root - DEBUG - freeing workers that have not sent heartbeat 2012-06-04 09:40:47,889 - root - INFO - TICKER: I'm a ticker (info-szimszon#709cdf44-805a-41a5-b197-8aa124acf311) Traceback (most recent call last): File /home/PRIMERATE.LAN/gyszabolcs/fejlesztes/web2py/gluon/shell.py, line 219, in run exec(python_code, _env) File string, line 1, in module File /home/PRIMERATE.LAN/gyszabolcs/fejlesztes/web2py/gluon/scheduler.py, line 398, in loop MetaScheduler.loop(self) File /home/PRIMERATE.LAN/gyszabolcs/fejlesztes/web2py/gluon/scheduler.py, line 279, in loop task = self.pop_task() File /home/PRIMERATE.LAN/gyszabolcs/fejlesztes/web2py/gluon/scheduler.py, line 423, in pop_task ).update(status=RUNNING,last_run_time=now) #reduces collisions? File /home/PRIMERATE.LAN/gyszabolcs/fejlesztes/web2py/gluon/dal.py, line 8147, in update if any(f(self,update_fields) for f in table._before_update): return 0 File /home/PRIMERATE.LAN/gyszabolcs/fejlesztes/web2py/gluon/dal.py, line 8147, in genexpr if any(f(self,update_fields) for f in table._before_update): return 0 File /home/PRIMERATE.LAN/gyszabolcs/fejlesztes/web2py/gluon/dal.py, line 7051, in lambda archive_record(qset,fs,at,cn)) File /home/PRIMERATE.LAN/gyszabolcs/fejlesztes/web2py/gluon/dal.py, line 7450, in archive_record for row in qset.select(): File /home/PRIMERATE.LAN/gyszabolcs/fejlesztes/web2py/gluon/dal.py, line 8130, in select return adapter.select(self.query,fields,attributes) File /home/PRIMERATE.LAN/gyszabolcs/fejlesztes/web2py/gluon/dal.py, line 1400, in select rows = response(sql) File /home/PRIMERATE.LAN/gyszabolcs/fejlesztes/web2py/gluon/dal.py, line 1390, in response self.execute(sql) File /home/PRIMERATE.LAN/gyszabolcs/fejlesztes/web2py/gluon/dal.py, line 1479, in execute return self.log_execute(*a, **b) File /home/PRIMERATE.LAN/gyszabolcs/fejlesztes/web2py/gluon/dal.py, line 1473, in log_execute ret = self.cursor.execute(*a, **b) File /home/PRIMERATE.LAN/gyszabolcs/fejlesztes/web2py/gluon/contrib/pymysql/cursors.py, line 108, in execute self.errorhandler(self, exc, value) File /home/PRIMERATE.LAN/gyszabolcs/fejlesztes/web2py/gluon/contrib/pymysql/connections.py, line 184, in defaulterrorhandler raise errorclass, errorvalue NotSupportedError: (1235, uThis version of MySQL doesn't yet support 'LIMIT IN/ALL/ANY/SOME subquery')
[web2py] Re: I have trouble with the new scheduler and mysql: NotSupportedError
Prev. patch wasn't good, here it is: --- scheduler.py.old2012-06-02 14:44:26.0 +0200 +++ scheduler.py2012-06-04 10:53:59.013899780 +0200 @@ -417,13 +417,13 @@ return None grabbed = db(ts.assigned_worker_name==self.worker_name)\ (ts.status==ASSIGNED) -task_id = grabbed._select(ts.id, limitby=(0,1), orderby=ts. next_run_time) -updated = db( -ts.id.belongs(task_id) -).update(status=RUNNING,last_run_time=now) #reduces collisions? -#noone will touch my task! -db.commit() -if updated: +task_row = grabbed.select(ts.id, limitby=(0,1), orderby=ts. next_run_time).first() +if task_row: +updated = db( +ts.id==task_row.id +).update(status=RUNNING,last_run_time=now) #reduces collisions? +#noone will touch my task! +db.commit() logging.debug(' work to do %s' % updated) task = db(ts.assigned_worker_name==self.worker_name)\ (ts.status==RUNNING).select().first() 2012. június 4., hétfő 9:47:29 UTC+2 időpontban szimszon a következőt írta: http://code.google.com/p/web2py/issues/detail?id=833 After upgrading to Version 2.0.0 (2012-06-02 16:44:25) dev I got this if I start scheduler: Currently running 1 scheduler processes Processes started 2012-06-04 09:40:47,874 - root - DEBUG - defining tables (migrate=True) 2012-06-04 09:40:47,880 - root - DEBUG - thread building own DAL object 2012-06-04 09:40:47,880 - root - DEBUG - looping... 2012-06-04 09:40:47,883 - root - DEBUG - defining tables (migrate=False) 2012-06-04 09:40:47,886 - root - DEBUG - recording heartbeat 2012-06-04 09:40:47,887 - root - DEBUG - freeing workers that have not sent heartbeat 2012-06-04 09:40:47,889 - root - INFO - TICKER: I'm a ticker (info-szimszon#709cdf44-805a-41a5-b197-8aa124acf311) Traceback (most recent call last): File /home/PRIMERATE.LAN/gyszabolcs/fejlesztes/web2py/gluon/shell.py, line 219, in run exec(python_code, _env) File string, line 1, in module File /home/PRIMERATE.LAN/gyszabolcs/fejlesztes/web2py/gluon/scheduler.py, line 398, in loop MetaScheduler.loop(self) File /home/PRIMERATE.LAN/gyszabolcs/fejlesztes/web2py/gluon/scheduler.py, line 279, in loop task = self.pop_task() File /home/PRIMERATE.LAN/gyszabolcs/fejlesztes/web2py/gluon/scheduler.py, line 423, in pop_task ).update(status=RUNNING,last_run_time=now) #reduces collisions? File /home/PRIMERATE.LAN/gyszabolcs/fejlesztes/web2py/gluon/dal.py, line 8147, in update if any(f(self,update_fields) for f in table._before_update): return 0 File /home/PRIMERATE.LAN/gyszabolcs/fejlesztes/web2py/gluon/dal.py, line 8147, in genexpr if any(f(self,update_fields) for f in table._before_update): return 0 File /home/PRIMERATE.LAN/gyszabolcs/fejlesztes/web2py/gluon/dal.py, line 7051, in lambda archive_record(qset,fs,at,cn)) File /home/PRIMERATE.LAN/gyszabolcs/fejlesztes/web2py/gluon/dal.py, line 7450, in archive_record for row in qset.select(): File /home/PRIMERATE.LAN/gyszabolcs/fejlesztes/web2py/gluon/dal.py, line 8130, in select return adapter.select(self.query,fields,attributes) File /home/PRIMERATE.LAN/gyszabolcs/fejlesztes/web2py/gluon/dal.py, line 1400, in select rows = response(sql) File /home/PRIMERATE.LAN/gyszabolcs/fejlesztes/web2py/gluon/dal.py, line 1390, in response self.execute(sql) File /home/PRIMERATE.LAN/gyszabolcs/fejlesztes/web2py/gluon/dal.py, line 1479, in execute return self.log_execute(*a, **b) File /home/PRIMERATE.LAN/gyszabolcs/fejlesztes/web2py/gluon/dal.py, line 1473, in log_execute ret = self.cursor.execute(*a, **b) File /home/PRIMERATE.LAN/gyszabolcs/fejlesztes/web2py/gluon/contrib/pymysql/cursors.py, line 108, in execute self.errorhandler(self, exc, value) File /home/PRIMERATE.LAN/gyszabolcs/fejlesztes/web2py/gluon/contrib/pymysql/connections.py, line 184, in defaulterrorhandler raise errorclass, errorvalue NotSupportedError: (1235, uThis version of MySQL doesn't yet support 'LIMIT IN/ALL/ANY/SOME subquery')
[web2py] Re: I have trouble with the new scheduler and mysql: NotSupportedError
already there... http://code.google.com/p/web2py/issues/detail?id=833 2012. június 4., hétfő 17:39:52 UTC+2 időpontban Massimo Di Pierro a következőt írta: Thank you. Please upload the patch in a google code issue. Less changes of me forgetting or doing a mistake. ;-) On Monday, 4 June 2012 04:00:05 UTC-5, szimszon wrote: Prev. patch wasn't good, here it is: --- scheduler.py.old2012-06-02 14:44:26.0 +0200 +++ scheduler.py2012-06-04 10:53:59.013899780 +0200 @@ -417,13 +417,13 @@ return None grabbed = db(ts.assigned_worker_name==self.worker_name)\ (ts.status==ASSIGNED) -task_id = grabbed._select(ts.id, limitby=(0,1), orderby=ts. next_run_time) -updated = db( -ts.id.belongs(task_id) -).update(status=RUNNING,last_run_time=now) #reduces collisions? -#noone will touch my task! -db.commit() -if updated: +task_row = grabbed.select(ts.id, limitby=(0,1), orderby=ts. next_run_time).first() +if task_row: +updated = db( +ts.id==task_row.id +).update(status=RUNNING,last_run_time=now) #reduces collisions? +#noone will touch my task! +db.commit() logging.debug(' work to do %s' % updated) task = db(ts.assigned_worker_name==self.worker_name)\ (ts.status==RUNNING).select().first() 2012. június 4., hétfő 9:47:29 UTC+2 időpontban szimszon a következőt írta: http://code.google.com/p/web2py/issues/detail?id=833 After upgrading to Version 2.0.0 (2012-06-02 16:44:25) dev I got this if I start scheduler: Currently running 1 scheduler processes Processes started 2012-06-04 09:40:47,874 - root - DEBUG - defining tables (migrate=True) 2012-06-04 09:40:47,880 - root - DEBUG - thread building own DAL object 2012-06-04 09:40:47,880 - root - DEBUG - looping... 2012-06-04 09:40:47,883 - root - DEBUG - defining tables (migrate=False) 2012-06-04 09:40:47,886 - root - DEBUG - recording heartbeat 2012-06-04 09:40:47,887 - root - DEBUG - freeing workers that have not sent heartbeat 2012-06-04 09:40:47,889 - root - INFO - TICKER: I'm a ticker (info-szimszon#709cdf44-805a-41a5-b197-8aa124acf311) Traceback (most recent call last): File /home/PRIMERATE.LAN/gyszabolcs/fejlesztes/web2py/gluon/shell.py, line 219, in run exec(python_code, _env) File string, line 1, in module File /home/PRIMERATE.LAN/gyszabolcs/fejlesztes/web2py/gluon/scheduler.py, line 398, in loop MetaScheduler.loop(self) File /home/PRIMERATE.LAN/gyszabolcs/fejlesztes/web2py/gluon/scheduler.py, line 279, in loop task = self.pop_task() File /home/PRIMERATE.LAN/gyszabolcs/fejlesztes/web2py/gluon/scheduler.py, line 423, in pop_task ).update(status=RUNNING,last_run_time=now) #reduces collisions? File /home/PRIMERATE.LAN/gyszabolcs/fejlesztes/web2py/gluon/dal.py, line 8147, in update if any(f(self,update_fields) for f in table._before_update): return 0 File /home/PRIMERATE.LAN/gyszabolcs/fejlesztes/web2py/gluon/dal.py, line 8147, in genexpr if any(f(self,update_fields) for f in table._before_update): return 0 File /home/PRIMERATE.LAN/gyszabolcs/fejlesztes/web2py/gluon/dal.py, line 7051, in lambda archive_record(qset,fs,at,cn)) File /home/PRIMERATE.LAN/gyszabolcs/fejlesztes/web2py/gluon/dal.py, line 7450, in archive_record for row in qset.select(): File /home/PRIMERATE.LAN/gyszabolcs/fejlesztes/web2py/gluon/dal.py, line 8130, in select return adapter.select(self.query,fields,attributes) File /home/PRIMERATE.LAN/gyszabolcs/fejlesztes/web2py/gluon/dal.py, line 1400, in select rows = response(sql) File /home/PRIMERATE.LAN/gyszabolcs/fejlesztes/web2py/gluon/dal.py, line 1390, in response self.execute(sql) File /home/PRIMERATE.LAN/gyszabolcs/fejlesztes/web2py/gluon/dal.py, line 1479, in execute return self.log_execute(*a, **b) File /home/PRIMERATE.LAN/gyszabolcs/fejlesztes/web2py/gluon/dal.py, line 1473, in log_execute ret = self.cursor.execute(*a, **b) File /home/PRIMERATE.LAN/gyszabolcs/fejlesztes/web2py/gluon/contrib/pymysql/cursors.py, line 108, in execute self.errorhandler(self, exc, value) File /home/PRIMERATE.LAN/gyszabolcs/fejlesztes/web2py/gluon/contrib/pymysql/connections.py, line 184, in defaulterrorhandler raise errorclass, errorvalue NotSupportedError: (1235, uThis version of MySQL doesn't yet support 'LIMIT IN/ALL/ANY/SOME subquery')
[web2py] Re: I have trouble with the new scheduler and mysql: NotSupportedError
Thank you! 2012. június 4., hétfő 22:00:54 UTC+2 időpontban Niphlod a következőt írta: patched and ready for new testing.. Thank you for your patience szimszon Niphlod
Re: [web2py] MailCaptcha
There is now a honeypot address handling to put sender directly in to blacklist. 1. somebody send you an email from someb...@domain.com 2. postfix ask MailCaptcha what to do - if the recipient address is not in the protected list do nothing special - else if the sender is in the blacklist reject the message with 5xx code - else if the recipient address is a honeypot address put the sender in the blacklist and reject the message with 5xx code - else if the sender is in the whitelist do nothing special - else if the sender is in the waiting queue the message get a temporary rejection with 4xx code - else if the sender is not in queue then - put the sender address in the waiting queue - send a mail to the sender address with the web url where the sender can solve the captcha and so the sender address is going to the whitelist - optionally send a mail to mail system admin to notify about a new sender address in the waiting queue so admin can enable the sender address by hand 3. the sender have to go to the web url and solve the captcha 4. sender address is going to the whitelist 5. the next time the sender's mail system (the system that hold the sender's mail) try to deliver the e-mail after temporary failure can deliver the message without problem
Re: [web2py] MailCaptcha
On Friday, May 25, 2012 12:54:42 AM UTC+2, Ricardo Pedroso wrote: On Thu, May 24, 2012 at 11:00 PM, szimszon szims...@gmail.com wrote: MailCaptcha === For e-mail address protection with recaptcha for postfix. I'm not understand how this works, but I feel that is an interesting idea. Can you specify a use case? 1. somebody send you an email from someb...@domain.com 2. postfix ask MailCaptcha what to do - if the recipient address is not in the protected list do nothing special - else if the sender is in the whitelist do nothing special - else if the sender is in the blacklist reject the message with 5xx code - else if the sender is in the waiting queue the message get a temporary rejection with 4xx code - else if the sender is not in queue then - put the sender address in the waiting queue - send a mail to the sender address with the web url where the sender can solve the captcha and so the sender address is going to the whitelist - optionally send a mail to mail system admin to notify about a new sender address in the waiting queue so admin can enable the sender address by hand 3. the sender have to go to the web url and solve the captcha 4. sender address is going to the whitelist 5. the next time the sender's mail system (the system that hold the sender's mail) try to deliver the e-mail after temporary failure can deliver the message without problem Why and how is tied to postfix? It's a postfix policy daemon. Here is the doc: http://www.postfix.org/SMTPD_POLICY_README.html It receives over tcp message envelope header parameter and based the recipient and sender parameter ask postfix to do accept, tem. reject, reject... If somebody send an e-mail to a protected address the MailCaptcha defer it with 4xx temporary failure and send an e-mail to the sender with the URL where the sender can solve the captcha and get their e-mail address to the whitelist. After that the mail system is accepting the e-mail address. There is a * whitelist * blacklist Are these lists defined in postfix side or web2py side? It's in web2py's side. By the way, I was trying to browse the code via github but you are using tabs for indentation, making a litter bit harder to follow the code. Sorry for that I'm used to make code indention with tabs. :-o Ricardo The main idea is from: http://www.kfki.hu/cnc/projekt/postfilter/indexeng.html http://www.kfki.hu/cnc/projekt/postfilter/docs/README.txt
Re: [web2py] MailCaptcha
The right order: (sorry) 1. somebody send you an email from someb...@domain.com 2. postfix ask MailCaptcha what to do - if the recipient address is not in the protected list do nothing special - *else if the sender is in the blacklist reject the message with 5xx code* - *else if the sender is in the whitelist do nothing special* - else if the sender is in the waiting queue the message get a temporary rejection with 4xx code - else if the sender is not in queue then - put the sender address in the waiting queue - send a mail to the sender address with the web url where the sender can solve the captcha and so the sender address is going to the whitelist - optionally send a mail to mail system admin to notify about a new sender address in the waiting queue so admin can enable the sender address by hand 3. the sender have to go to the web url and solve the captcha 4. sender address is going to the whitelist 5. the next time the sender's mail system (the system that hold the sender's mail) try to deliver the e-mail after temporary failure can deliver the message without problem
[web2py] Re: MailCaptcha
Agree. On Friday, May 25, 2012 6:04:22 AM UTC+2, Massimo Di Pierro wrote: We need a way to post apps like this. Perhaps a subsection of poweredby for apps with may not be deployed but are available for download. On Thursday, 24 May 2012 17:00:43 UTC-5, szimszon wrote: Hi All! I made a little app to be able to filter spam with recaptcha. MailCaptcha === For e-mail address protection with recaptcha for postfix. If somebody send an e-mail to a protected address the MailCaptcha defer it with 4xx temporary failure and send an e-mail to the sender with the URL where the sender can solve the captcha and get their e-mail address to the whitelist. After that the mail system is accepting the e-mail address. There is a * whitelist * blacklist * notification to the mail system administrator * sent mail can be signed with x.509 certificate Requirements * web2py 1.99.7 (http://web2py.com) * postfix (http://postfix.com) https://github.com/szimszon/web2py_mailcaptcha
[web2py] MailCaptcha
Hi All! I made a little app to be able to filter spam with recaptcha. MailCaptcha === For e-mail address protection with recaptcha for postfix. If somebody send an e-mail to a protected address the MailCaptcha defer it with 4xx temporary failure and send an e-mail to the sender with the URL where the sender can solve the captcha and get their e-mail address to the whitelist. After that the mail system is accepting the e-mail address. There is a * whitelist * blacklist * notification to the mail system administrator * sent mail can be signed with x.509 certificate Requirements * web2py 1.99.7 (http://web2py.com) * postfix (http://postfix.com) https://github.com/szimszon/web2py_mailcaptcha
[web2py] Re: Little problem with scheduler_task - has no signature Fields
Here it is: http://code.google.com/p/osmand/issues/detail?id=1012 Thank you! 2012. május 20., vasárnap 23:19:33 UTC+2 időpontban Massimo Di Pierro a következőt írta: Please open a ticket about this. We can add options to add fields to scheduler tables. On Friday, 18 May 2012 03:43:38 UTC-5, szimszon wrote: Hi! I wonder if somebody could help me. I have to audit scheduler_task db.scheduler_task._enable_record_versioning() works but scheduler_task have no Created On, By and Modified On, By (is_active) Fields :( Can we put this Fields in it?
[web2py] signature field's label should be translatable and _archive.current_record too...
Hi All! I think it could be good to have auth.signature. ... .label wrapped with T(). And _archive.current_record too... Thanks! http://code.google.com/p/web2py/issues/detail?id=812 http://code.google.com/p/web2py/issues/detail?id=813
[web2py] Re: Little problem with scheduler_task - has no signature Fields
Wrong project. Sorry. http://code.google.com/p/web2py/issues/detail?id=814 2012. május 21., hétfő 8:40:43 UTC+2 időpontban szimszon a következőt írta: Here it is: http://code.google.com/p/osmand/issues/detail?id=1012 Thank you! 2012. május 20., vasárnap 23:19:33 UTC+2 időpontban Massimo Di Pierro a következőt írta: Please open a ticket about this. We can add options to add fields to scheduler tables. On Friday, 18 May 2012 03:43:38 UTC-5, szimszon wrote: Hi! I wonder if somebody could help me. I have to audit scheduler_task db.scheduler_task._enable_record_versioning() works but scheduler_task have no Created On, By and Modified On, By (is_active) Fields :( Can we put this Fields in it?
[web2py] OverflowError: long int too large to convert to int (SQLFORM.grid)
File applications/szegedarchive/compiled/controllers_default_index.py, line 127, in index File /srv/web2py/gluon/sqlhtml.py, line 1905, in grid tr.append(TD(link['body'](row))) File applications/szegedarchive/compiled/controllers_default_index.py, line 120, in lambda File /srv/web2py/gluon/dal.py, line 6851, in __getattr__ self.__allocate() File /srv/web2py/gluon/dal.py, line 6844, in __allocate self._record = self._table[int(self)] File /srv/web2py/gluon/dal.py, line 7119, in __getitem__ return self._db(self._id == key).select(limitby=(0,1)).first() File /srv/web2py/gluon/dal.py, line 8110, in select return adapter.select(self.query,fields,attributes) File /srv/web2py/gluon/dal.py, line 1402, in select return processor(rows,fields,self._colnames) File /srv/web2py/gluon/dal.py, line 1704, in parse self.parse_value(value,field.type,blob_decode) File /srv/web2py/gluon/dal.py, line 1581, in parse_value return self.parsemap[key](value,field_type) File /srv/web2py/gluon/dal.py, line 1586, in parse_reference value = Reference(value) OverflowError: long int too large to convert to int http://code.google.com/p/web2py/issues/detail?id=815
[web2py] Re: OverflowError: long int too large to convert to int (SQLFORM.grid)
Sorry, invalid. 2012. május 21., hétfő 12:21:29 UTC+2 időpontban szimszon a következőt írta: File applications/szegedarchive/compiled/controllers_default_index.py, line 127, in index File /srv/web2py/gluon/sqlhtml.py, line 1905, in grid tr.append(TD(link['body'](row))) File applications/szegedarchive/compiled/controllers_default_index.py, line 120, in lambda File /srv/web2py/gluon/dal.py, line 6851, in __getattr__ self.__allocate() File /srv/web2py/gluon/dal.py, line 6844, in __allocate self._record = self._table[int(self)] File /srv/web2py/gluon/dal.py, line 7119, in __getitem__ return self._db(self._id == key).select(limitby=(0,1)).first() File /srv/web2py/gluon/dal.py, line 8110, in select return adapter.select(self.query,fields,attributes) File /srv/web2py/gluon/dal.py, line 1402, in select return processor(rows,fields,self._colnames) File /srv/web2py/gluon/dal.py, line 1704, in parse self.parse_value(value,field.type,blob_decode) File /srv/web2py/gluon/dal.py, line 1581, in parse_value return self.parsemap[key](value,field_type) File /srv/web2py/gluon/dal.py, line 1586, in parse_reference value = Reference(value) OverflowError: long int too large to convert to int http://code.google.com/p/web2py/issues/detail?id=815
[web2py] Re: Little problem with scheduler_task - has no signature Fields
There are users they can trigger scheduled tasks and I need to audit it. I'll try what you say. And report back. 2012. május 18., péntek 17:56:19 UTC+2 időpontban Niphlod a következőt írta: you can put them on like in every table, and then prevent the scheduler migrating the table setting migrate=False in its call. There should be no problems on that, but a big problem arises : the scheduler_task table will likely to have multiple copies of the same task (auditing works in that way, setting to is_active only the last version of the record but keeping the entire history) and will try to execute all of them. anyway, why do you need to audit the task table ? Il giorno venerdì 18 maggio 2012 10:43:38 UTC+2, szimszon ha scritto: Hi! I wonder if somebody could help me. I have to audit scheduler_task db.scheduler_task._enable_record_versioning() works but scheduler_task have no Created On, By and Modified On, By (is_active) Fields :( Can we put this Fields in it?
[web2py] Little problem with scheduler_task - has no signature Fields
Hi! I wonder if somebody could help me. I have to audit scheduler_task db.scheduler_task._enable_record_versioning() works but scheduler_task have no Created On, By and Modified On, By (is_active) Fields :( Can we put this Fields in it?
[web2py] Re: mailing with pgp
Is there any progress? Are you able to use it? 2012. április 27., péntek 23:06:40 UTC+2 időpontban szimszon a következőt írta: What distrib is this? What is the content of GPGKEY? The list is from python shell or from web2py? 2012. április 27., péntek 17:34:06 UTC+2 időpontban weheh a következőt írta: os.environ listing: LANG TERM SHELL LESSCLOSE XDG_SESSION_COOKIE SHLVL SSH_TTY OLDPWD GPGKEY PWD LESSOPEN SSH_CLIENT LOGNAME USER PATH MAIL LS_COLORS HOME _ SSH_CONNECTION
Re: [web2py] Need a little help in code review (a function eating up all memory)
The problem is not that if I call the controller function if consumes memory. My problem is that there is something that still reference something after the execution is finished so the consumed memory never get released / reused... 2012. május 10., csütörtök 23:27:32 UTC+2 időpontban Martin.Mulone a következőt írta: The problem is fetchall(), is getting all the records to memory. If you want to iterate a large dataset or not so heavy, but have a table with many fields, perhaps you can do it by blocks. For example using raw sql with dal: example: this fetch by 1000 records queryraw = select * from mytable %(limit_query)s def records(query): rows = db.executesql(query) if rows: return True else: return False rec = 0 stage = 0 block = 1000while True: offset = stage * block query = queryraw % {'limitquery': 'LIMIT %s, %s' % (offset, block)} if not records(query): break rows = db.executesql(query) for row in rows: rec += 1 # do something stage += 1 This is not fast but keep memory low. 2012/5/10 szimszon szims...@gmail.com Could it be related? https://groups.google.com/forum/#!topic/web2py/hmsupVHdDHo/discussion (Memory leak in standalone DAL (issue #731), can you please help test?) 2012. május 10., csütörtök 22:32:53 UTC+2 időpontban szimszon a következőt írta: Okay. It's clear. I'm only puzzled about why the memory didn't get freed or reused after execution is finished. And if I execute the controller function in 1-2min interval mem is still not reused. So I understand it can eat up the memory but why is all memory locked forever and didn't get reused - in my understanding (it's not much) in my case GC do not free mem at all in python level. So some reference is still intact after function is finished. 2012. május 10., csütörtök 21:53:06 UTC+2 időpontban Richard a következőt írta: Ok, you don't need it to works all the time. Did you get it to update your records? If not, and if as you said it is a one trip, you can just treat the whole records batch by batch... Look here : http://web2py.com/books/**default/chapter/29/14#** Populating-database-with-**dummy-datahttp://web2py.com/books/default/chapter/29/14#Populating-database-with-dummy-data for i in range(10): populate(db.mytable,100) db.commit() In this example only 100 records are populated at a time between db.commit()... So maybe you just have to wrap for loop that will db.commit() a couples of time during your processing. Richard On Thu, May 10, 2012 at 3:32 PM, szimszon szims...@gmail.com wrote: I had to store files and a lot of properties for it. It was in csv. But after I processed it we figured out that not all value was correct in csv but it was a bit redundant. So I can correct it by go through all the records row by row. So that was a one time trip. I just realized after the process I had no memory left. So now I'm investigating what happened... 2012. május 10., csütörtök 21:00:05 UTC+2 időpontban Richard a következőt írta: Yes but in this case it is not for the entire reecords... Why would you return a full list of all the records? I don't understand what is the purpose of listar that you return in the view under a html table, why do you need to return all the 10+ entries? Richard On Thu, May 10, 2012 at 2:56 PM, szimszon szims...@gmail.com wrote: In book it is a recommended way to iterate over sql results: http://web2py.com/books/**defaul**t/chapter/29/6http://web2py.com/books/default/chapter/29/6 You can do all the steps in one statement: 1. 2. 3. for row in db(db.person.name=='Alex').select(): print row.name Alex 2012. május 10., csütörtök 20:42:22 UTC+2 időpontban Bruce Wade a következőt írta: Sorry, you really need to read more about how python works. If you learn how for loops work and memory you will understand the problem. One solution do the query before the for loop then loop through the objects. This may help at bit. Research xrange vs range On Thu, May 10, 2012 at 11:30 AM, szimszon szims...@gmail.comwrote: Sorry I don't understand. What do you mean achieve with join? There is an empty for loop with db.executesql() without join. And it is eating up the memory. :( 2012. május 10., csütörtök 19:12:30 UTC+2 időpontban Richard a következőt írta: You can't manage what you want to achieve with join? Richard On Thu, May 10, 2012 at 10:48 AM, szimszon szims...@gmail.comwrote: Sorry for my dumbness but if something is wrong with my code please point me the right line. I'm not so good in English if it comes to object instance count and so. Yeah I know I should go and do some milkmaid job :) but I'm curious. I'm just define some variable: lista = list() last_row = None next_page_number = 0 Go in a for loop that just assign the db
Re: [web2py] Need a little help in code review (a function eating up all memory)
OK. Finally I have it :) It was only the amount of memory it was consumed each time. I tried it with a smaller but a significant number of records and finally I figured out that there is a limit and after that memory consumption is ok. I had only reach that count of browser request :-D Sorry for your time and thanks for help. =--= 2012. május 11., péntek 9:30:28 UTC+2 időpontban szimszon a következőt írta: The problem is not that if I call the controller function if consumes memory. My problem is that there is something that still reference something after the execution is finished so the consumed memory never get released / reused... 2012. május 10., csütörtök 23:27:32 UTC+2 időpontban Martin.Mulone a következőt írta: The problem is fetchall(), is getting all the records to memory. If you want to iterate a large dataset or not so heavy, but have a table with many fields, perhaps you can do it by blocks. For example using raw sql with dal: example: this fetch by 1000 records queryraw = select * from mytable %(limit_query)s def records(query): rows = db.executesql(query) if rows: return True else: return False rec = 0 stage = 0 block = 1000while True: offset = stage * block query = queryraw % {'limitquery': 'LIMIT %s, %s' % (offset, block)} if not records(query): break rows = db.executesql(query) for row in rows: rec += 1 # do something stage += 1 This is not fast but keep memory low. 2012/5/10 szimszon szims...@gmail.com Could it be related? https://groups.google.com/forum/#!topic/web2py/hmsupVHdDHo/discussion (Memory leak in standalone DAL (issue #731), can you please help test?) 2012. május 10., csütörtök 22:32:53 UTC+2 időpontban szimszon a következőt írta: Okay. It's clear. I'm only puzzled about why the memory didn't get freed or reused after execution is finished. And if I execute the controller function in 1-2min interval mem is still not reused. So I understand it can eat up the memory but why is all memory locked forever and didn't get reused - in my understanding (it's not much) in my case GC do not free mem at all in python level. So some reference is still intact after function is finished. 2012. május 10., csütörtök 21:53:06 UTC+2 időpontban Richard a következőt írta: Ok, you don't need it to works all the time. Did you get it to update your records? If not, and if as you said it is a one trip, you can just treat the whole records batch by batch... Look here : http://web2py.com/books/**default/chapter/29/14#** Populating-database-with-**dummy-datahttp://web2py.com/books/default/chapter/29/14#Populating-database-with-dummy-data for i in range(10): populate(db.mytable,100) db.commit() In this example only 100 records are populated at a time between db.commit()... So maybe you just have to wrap for loop that will db.commit() a couples of time during your processing. Richard On Thu, May 10, 2012 at 3:32 PM, szimszon szims...@gmail.com wrote: I had to store files and a lot of properties for it. It was in csv. But after I processed it we figured out that not all value was correct in csv but it was a bit redundant. So I can correct it by go through all the records row by row. So that was a one time trip. I just realized after the process I had no memory left. So now I'm investigating what happened... 2012. május 10., csütörtök 21:00:05 UTC+2 időpontban Richard a következőt írta: Yes but in this case it is not for the entire reecords... Why would you return a full list of all the records? I don't understand what is the purpose of listar that you return in the view under a html table, why do you need to return all the 10+ entries? Richard On Thu, May 10, 2012 at 2:56 PM, szimszon szims...@gmail.comwrote: In book it is a recommended way to iterate over sql results: http://web2py.com/books/**defaul**t/chapter/29/6http://web2py.com/books/default/chapter/29/6 You can do all the steps in one statement: 1. 2. 3. for row in db(db.person.name=='Alex').select(): print row.name Alex 2012. május 10., csütörtök 20:42:22 UTC+2 időpontban Bruce Wade a következőt írta: Sorry, you really need to read more about how python works. If you learn how for loops work and memory you will understand the problem. One solution do the query before the for loop then loop through the objects. This may help at bit. Research xrange vs range On Thu, May 10, 2012 at 11:30 AM, szimszon szims...@gmail.comwrote: Sorry I don't understand. What do you mean achieve with join? There is an empty for loop with db.executesql() without join. And it is eating up the memory. :( 2012. május 10., csütörtök 19:12:30 UTC+2 időpontban Richard a következőt írta: You can't manage what you want to achieve with join? Richard On Thu, May 10
Re: [web2py] Need a little help in code review (a function eating up all memory)
I had only to reach that count of browser request :-D
Re: [web2py] Need a little help in code review (a function eating up all memory)
Yes I know but it happens over type the mem usage is linearly growing and after the successful execution never released and that is why I ask :( 2012. május 10., csütörtök 9:14:14 UTC+2 időpontban Bruce Wade a következőt írta: WOW not a good idea: for row in db( db.file_properties.id 0 ).select( If you have a lot of records that is going to kill your memory. On Thu, May 10, 2012 at 12:10 AM, szimszon szims...@gmail.com wrote: I wonder if somebody could help me. The following code has eaten up ~1,5GB ram and after ended successfully it is not released :( file_properties table has 137314 rows. Model: db.define_table( 'files_store', Field( 'name', 'string', label = 'Fájlnév' , ), Field( 'content', 'upload', uploadseparate = True, autodelete = True, label = 'Aláírt fájl', ), Field( 'status', 'string', label = 'Állapot', requires = IS_IN_SET( [ 'empty', 'notsigned', 'senttosign', 'signed'], [ 'Üres', 'Aláiratlan', 'Aláírásra elküldve', 'Aláírt'] ), represent = lambda r, row:T(r ) ), Field( 'state', 'string', label = 'Státusz', requires = IS_IN_SET( ['ok', 'error'], [ 'Rendben', 'Hiba'] ), represent = lambda r, row:T(r ) ), Field( 'data_count', 'integer', label = 'Adat bejegyzések', requires = IS_NOT_EMPTY(), default = 0, ), Field( 'dirname', 'string', label = 'Könyvtár név' , requires = IS_NOT_EMPTY(), ), Field( 'md5sum', 'string', label = T( 'MD5 Sum' ), represent = lambda md5sum,junk : '[%s]' % md5sum, writable = False ), auth.signature, format = '%(dirname)s/%(name)s (%(id)s)' ) db.files_store.created_on.readable = True db.define_table( 'file_properties', Field( 'files_store_id', db.files_store, label = 'Aláírt fájl' , ), Field( 'kezdo_oldal', 'integer', label = 'Számla kezdő oldal', requires = IS_NOT_EMPTY(), ), Field( 'oldalszam', 'integer', label = 'Számla oldalainak száma', requires = IS_NOT_EMPTY(), ), Field( 'szamla_sorszama', 'string', label = 'Számla sorszáma', #requires = IS_NOT_IN_DB( db, 'file_properties' ), unique = True, ), Field( 'ugyfel_azonosito', 'string', label = 'Ügyfél azonosító', requires = IS_NOT_EMPTY(), ), Field( 'folyoszamla_azonosito', 'string', label = 'Folyószámla azonosító', requires = IS_NOT_EMPTY(), ), Field( 'teljesites_idopontja', 'date', label = 'Teljesítés időpontja', requires = IS_DATE( '%Y.%m.%d