[web2py] Re: Error on start: 'Auth' object has no attribute 'wikimenu'
I'm also having the save error during the start on mac os On Monday, May 27, 2013 1:26:23 AM UTC+3, jfinke wrote: I just downloaded the mac version of web2py. When I start the server with a password, I immediately get an error ticket. Error ticket for welcomeTicket ID 127.0.0.1.2013-05-26.17-23-02.b3d13a3c-4b2c-445a-a4cf-2722911fae41 type 'exceptions.AttributeError' 'Auth' object has no attribute 'wikimenu'Versionweb2py™Version (2, 4, 7, 'stable', datetime.datetime(2013, 5, 24, 17, 48, 47))PythonPython 2.5.1: /Users/jeremy/Downloads/web2py/web2py.app/Contents/MacOS/pythonTraceback 1. 2. 3. 4. 5. Traceback (most recent call last): File /home/mdipierro/web2py/gluon/restricted.py, line 212, in restricted File /Users/jeremy/Downloads/web2py/web2py.app/Contents/Resources/applications/welcome/models/menu.py http://localhost:8002/admin/default/edit/welcome/models/menu.py, line 140, in module AttributeError: 'Auth' object has no attribute 'wikimenu' Error snapshot [image: help]http://localhost:8002/admin/default/ticket/welcome/127.0.0.1.2013-05-26.17-23-02.b3d13a3c-4b2c-445a-a4cf-2722911fae41# type 'exceptions.AttributeError'('Auth' object has no attribute 'wikimenu') When I go to line 140 in models/menu.py, I see: if auth in locals(): auth.wikimenu() Any ideas? 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.
Re: [web2py] Re: help please
yeah.. backup backup backup.. it's just that sometimes you forget to :( Would it be wise to add some backup module to web2py admin? It could default to 1 copy per day or smthing simillar. It would especially serve Noobs :) On Thu, Dec 20, 2012 at 12:27 AM, Derek sp1d...@gmail.com wrote: The data is gone. Let this be a reminder to all of you out there, back up your data and back it up often. Also, it's not backed up if you can't restore it, so test out restores as well. On Wednesday, December 19, 2012 9:08:47 AM UTC-7, LightDot wrote: First, make a couple of physical copies of the database and do not write into it anymore. Then, working on a copy, you could try restoring / extracting the data by using forensic tools, etc. I'm not aware of a straightforward sqlite restore tool, but there might be one or two out there... I'm sure you're not the first to have such an issue. I guess it comes down to the question of is it worth the time and effort. Regards, Ales On Wednesday, December 19, 2012 4:54:50 PM UTC+1, Aurelijus Useckas wrote: Yeah I know.. I have an old backup only :( me bad On Wed, Dec 19, 2012 at 5:51 PM, Mark czhan...@gmail.com wrote: Do you have any kind of backup files for the database? Or, do your server/computer backup daily or weekly? If there are any backup files, you can restore the deleted data easily. Mark On Wednesday, December 19, 2012 8:21:27 AM UTC-5, Aurelijus Useckas wrote: I've deleted user information from auth_users and suddenly all my data (from other table views) disapears.. Yes, other tables are linked to this one. Specifically for info on updates and simillar... If I restore the same data in auth_users other table still doesn't show anything... I event reset the autoincrement and make it appear totally identical.. still nothing :( did i mess up??? :( -- -- --
[web2py] change id?
is it possible to change row id or null it so it starts sequential counting starting from 0? thank you --
Re: [web2py] change id?
I''m using an SQlite btw. autoincrement resets with this command: print db.executesql('UPDATE SQLITE_SEQUENCE SET seq = 0 WHERE name = \'auth_user\'') On Wednesday, December 19, 2012 2:20:49 PM UTC+2, viniciusban wrote: I think it depends on you RDBMS. On Wed, Dec 19, 2012 at 10:00 AM, Aurelijus Useckas aureliju...@gmail.com javascript: wrote: is it possible to change row id or null it so it starts sequential counting starting from 0? thank you -- --
[web2py] help please
I've deleted user information from auth_users and suddenly all my data (from other table views) disapears.. Yes, other tables are linked to this one. Specifically for info on updates and simillar... If I restore the same data in auth_users other table still doesn't show anything... I event reset the autoincrement and make it appear totally identical.. still nothing :( did i mess up??? :( --
[web2py] Re: help please
i'm on SQLite On Wednesday, December 19, 2012 3:21:27 PM UTC+2, Aurelijus Useckas wrote: I've deleted user information from auth_users and suddenly all my data (from other table views) disapears.. Yes, other tables are linked to this one. Specifically for info on updates and simillar... If I restore the same data in auth_users other table still doesn't show anything... I event reset the autoincrement and make it appear totally identical.. still nothing :( did i mess up??? :( --
[web2py] Re: help please
is there any way to extract data from sqlite? The file is still full of data... I don't understand, if you delete somthing that is linked, everything messes up? On Wednesday, December 19, 2012 3:34:31 PM UTC+2, Niphlod wrote: definitely messed up. no way they will return back. That's why referenced tables are for. Il giorno mercoledì 19 dicembre 2012 14:25:01 UTC+1, Aurelijus Useckas ha scritto: i'm on SQLite On Wednesday, December 19, 2012 3:21:27 PM UTC+2, Aurelijus Useckas wrote: I've deleted user information from auth_users and suddenly all my data (from other table views) disapears.. Yes, other tables are linked to this one. Specifically for info on updates and simillar... If I restore the same data in auth_users other table still doesn't show anything... I event reset the autoincrement and make it appear totally identical.. still nothing :( did i mess up??? :( --
[web2py] Re: help please
but I can see the records inside the storage.sqlite file, so they must be accessible somehow On Wednesday, December 19, 2012 3:51:37 PM UTC+2, Niphlod wrote: I said *messed up* just to use part of your sentence. With referenced table, if you used the default ondelete attribute of the field, every child record gets deleted as soon as the parent is deleted. You can't fetch the data drom sqlite, it's definitely gone. For goods. The fact that the sqlite file is still large is because by default SQLite doesn't release the space: it keeps it for future records. On Wednesday, December 19, 2012 2:38:32 PM UTC+1, Aurelijus Useckas wrote: is there any way to extract data from sqlite? The file is still full of data... I don't understand, if you delete somthing that is linked, everything messes up? On Wednesday, December 19, 2012 3:34:31 PM UTC+2, Niphlod wrote: definitely messed up. no way they will return back. That's why referenced tables are for. Il giorno mercoledì 19 dicembre 2012 14:25:01 UTC+1, Aurelijus Useckas ha scritto: i'm on SQLite On Wednesday, December 19, 2012 3:21:27 PM UTC+2, Aurelijus Useckas wrote: I've deleted user information from auth_users and suddenly all my data (from other table views) disapears.. Yes, other tables are linked to this one. Specifically for info on updates and simillar... If I restore the same data in auth_users other table still doesn't show anything... I event reset the autoincrement and make it appear totally identical.. still nothing :( did i mess up??? :( --
Re: [web2py] Re: help please
Thanks Niphlod for supporting me on this one. The problem is that appadmin doesn't see any records but if I'm accessing the same storage.sqlite db with VIM or even word processor, I can still see all the data in there, it's just that something doesn't allow appadmin or sqlite viewer to see it.. I wonder why and what possibly could be done.. On Wed, Dec 19, 2012 at 5:09 PM, Niphlod niph...@gmail.com wrote: do you see them in appadmin ? if yes, then it's a no-issue: the data is there but I'm not sure what are you pointing to saying *all my data (from other table views) disapears* . If it's not there in appadmin but you see the records on sqlite with some other tool, than you're app is using a different database than the one you're examining with the external tool. Appadmin lets you see all the records for all your defined tables, without filters. Il giorno mercoledì 19 dicembre 2012 14:55:14 UTC+1, Aurelijus Useckas ha scritto: but I can see the records inside the storage.sqlite file, so they must be accessible somehow On Wednesday, December 19, 2012 3:51:37 PM UTC+2, Niphlod wrote: I said *messed up* just to use part of your sentence. With referenced table, if you used the default ondelete attribute of the field, every child record gets deleted as soon as the parent is deleted. You can't fetch the data drom sqlite, it's definitely gone. For goods. The fact that the sqlite file is still large is because by default SQLite doesn't release the space: it keeps it for future records. On Wednesday, December 19, 2012 2:38:32 PM UTC+1, Aurelijus Useckas wrote: is there any way to extract data from sqlite? The file is still full of data... I don't understand, if you delete somthing that is linked, everything messes up? On Wednesday, December 19, 2012 3:34:31 PM UTC+2, Niphlod wrote: definitely messed up. no way they will return back. That's why referenced tables are for. Il giorno mercoledì 19 dicembre 2012 14:25:01 UTC+1, Aurelijus Useckas ha scritto: i'm on SQLite On Wednesday, December 19, 2012 3:21:27 PM UTC+2, Aurelijus Useckas wrote: I've deleted user information from auth_users and suddenly all my data (from other table views) disapears.. Yes, other tables are linked to this one. Specifically for info on updates and simillar... If I restore the same data in auth_users other table still doesn't show anything... I event reset the autoincrement and make it appear totally identical.. still nothing :( did i mess up??? :( -- --
Re: [web2py] Re: help please
I've tried Sqlite database browser. Same results.. but still it's strange, records are really there On Wed, Dec 19, 2012 at 5:22 PM, Niphlod niph...@gmail.com wrote: did you try with some app that has sqlite support such as sqliteman or the sqlite3 command line ? I hardly doubt that if sqlite3 commandline can't fetch your records, what you're seeing with VIM is your actual records Il giorno mercoledì 19 dicembre 2012 16:12:31 UTC+1, Aurelijus Useckas ha scritto: Thanks Niphlod for supporting me on this one. The problem is that appadmin doesn't see any records but if I'm accessing the same storage.sqlite db with VIM or even word processor, I can still see all the data in there, it's just that something doesn't allow appadmin or sqlite viewer to see it.. I wonder why and what possibly could be done.. On Wed, Dec 19, 2012 at 5:09 PM, Niphlod nip...@gmail.com wrote: do you see them in appadmin ? if yes, then it's a no-issue: the data is there but I'm not sure what are you pointing to saying *all my data (from other table views) disapears* . If it's not there in appadmin but you see the records on sqlite with some other tool, than you're app is using a different database than the one you're examining with the external tool. Appadmin lets you see all the records for all your defined tables, without filters. Il giorno mercoledì 19 dicembre 2012 14:55:14 UTC+1, Aurelijus Useckas ha scritto: but I can see the records inside the storage.sqlite file, so they must be accessible somehow On Wednesday, December 19, 2012 3:51:37 PM UTC+2, Niphlod wrote: I said *messed up* just to use part of your sentence. With referenced table, if you used the default ondelete attribute of the field, every child record gets deleted as soon as the parent is deleted. You can't fetch the data drom sqlite, it's definitely gone. For goods. The fact that the sqlite file is still large is because by default SQLite doesn't release the space: it keeps it for future records. On Wednesday, December 19, 2012 2:38:32 PM UTC+1, Aurelijus Useckas wrote: is there any way to extract data from sqlite? The file is still full of data... I don't understand, if you delete somthing that is linked, everything messes up? On Wednesday, December 19, 2012 3:34:31 PM UTC+2, Niphlod wrote: definitely messed up. no way they will return back. That's why referenced tables are for. Il giorno mercoledì 19 dicembre 2012 14:25:01 UTC+1, Aurelijus Useckas ha scritto: i'm on SQLite On Wednesday, December 19, 2012 3:21:27 PM UTC+2, Aurelijus Useckas wrote: I've deleted user information from auth_users and suddenly all my data (from other table views) disapears.. Yes, other tables are linked to this one. Specifically for info on updates and simillar... If I restore the same data in auth_users other table still doesn't show anything... I event reset the autoincrement and make it appear totally identical.. still nothing :( did i mess up??? :( -- -- --
Re: [web2py] Re: help please
Yeah I know.. I have an old backup only :( me bad On Wed, Dec 19, 2012 at 5:51 PM, Mark czhang2...@gmail.com wrote: Do you have any kind of backup files for the database? Or, do your server/computer backup daily or weekly? If there are any backup files, you can restore the deleted data easily. Mark On Wednesday, December 19, 2012 8:21:27 AM UTC-5, Aurelijus Useckas wrote: I've deleted user information from auth_users and suddenly all my data (from other table views) disapears.. Yes, other tables are linked to this one. Specifically for info on updates and simillar... If I restore the same data in auth_users other table still doesn't show anything... I event reset the autoincrement and make it appear totally identical.. still nothing :( did i mess up??? :( -- --
Re: [web2py] User accessed site without logging in
Sorry for bothering, solved On Wednesday, December 5, 2012 9:28:54 AM UTC+2, Aurelijus Useckas wrote: Hi Massimo, One of my users gets an error: Bad Request (request.client=unknown) Does it have anything to do with your update? Can I change the requirement somewhere? Thank you On Tuesday, July 24, 2012 11:26:21 PM UTC+3, Massimo Di Pierro wrote: Perhaps it would be safe to block access to the site if request.client is unknown. I think we should change web2py to block access to any web2py app if request.client does not validate as an IP address. Massimo On Tuesday, 24 July 2012 15:24:06 UTC-5, Massimo Di Pierro wrote: Here is a possible cause of the problem although I am not sure. There are two possible issues which may conspire to create this problem. Issue #1 === There is a session file in the app you sent me called: unknown-c4571a37... session files should be ip-. This means that one of the HEADERS http_x_forwarded_for or remote_addr has a value unknown. A first google search retuned: http://nixforums.org/about154671-Hacking-X-Forwarded-For.html which opens the possibility the the web server, in your case nginx, is not finding the client ip address (how is that possible) and setting it to unknown. This should never happen. The client_addr is a required field for WSGI. This could be the result of a hacking attempt but it would required both parties doing the hacking for the sessions to be mixed up. Issue #2 === There is a bug with may prevent urandom from working: http://community.webfaction.com/questions/9333/importerror-cannot-import-name-urandom http://stackoverflow.com/questions/10776797/error-when-importing-wsgihandler-with-django Can you check if you can import urandom on your version of python on webfaction? It is therefore theoretically possible that, given the concurrency model of nginx, if two users visit the site very close to each other, with urandom missing, both declaring the same incorrect client ip (unknown), they get assigned the same session id. This is because web2py has no way of distinguishing the two users and lacks a proper random number generator. TODO: 1) check if you can import urandom 2) try understand how it possible to have an unkown client_addr in the http headers. My google search returned nothing about 2. Has anybody ever seen this before? Please let us know. On Tuesday, 24 July 2012 14:50:04 UTC-5, Massimo Di Pierro wrote: Nothing stands out from your code. It is very good code. You have changed to gluon/tools.py but I do not think they can be causing this problem. On Tuesday, 24 July 2012 14:48:16 UTC-5, Massimo Di Pierro wrote: I should add that the conflict I mentioned below is not possible unless there is a proxy in between. That is because the session id includes the client IP. I really do not see how this problem can be possible. Are you sure they are not playing a prank on you? If they share a facebook page perhaps they know each other. I have to ask but we will keep investigating the issue very seriously nevertheless. For now I suggest you add this to your code: if auth.user: session.clients = session.clients or [] if not request.client in session.clients: session.clients.append(request.client) if len(session.clients)1: print auth.user.email, session.clients log the output and check how often you have multiple session.clients for the same email from different network top level domains (xxx.*.*.*) If you do, email the user and check what is going on with them. Massimo On Tuesday, 24 July 2012 14:26:35 UTC-5, Massimo Di Pierro wrote: The only time I have seen something like this was long age. Web2py was running on replicated VMs behing a load balancer. If two requests from new users arrived within a short time frame (do not remember if a millisecond or a second), they were assigned the same session uuid because uuid.uuid4() could not discriminate between the VMs. We fixed it by make uuid dependent on the os entropy source urandom and initializing it differently on different VMs using the IP address. The fix works on linux/unix but not on Windows. Replicated windows machine may suffer from this problem still. What is the web server and configuration in your case? Do you know what was the link that caused the problem? Which page she was directed too? massimo On Tuesday, 24 July 2012 10:18:46 UTC-5, Jonathan Lundell wrote: On 24 Jul 2012, at 6:41 AM, Neil wrote: Good point about trunk. There are some features that I liked and got used to, but nothing essential. I'll try to summarize any relevant settings in the hope that someone can spot something. In 0.py I have: ... settings.login_method = 'local' settings.login_config = '' ... in db.py: ... auth = Auth(db, hmac_key=Auth.get_or_create_key()) crud, service, plugins = Crud(db
[web2py] Re: Unable to send emails (mail.send) from server
Gmail server gives an error of: *No SSL support included in this Python* I'm using 2.6v of Python, doesn't it support it? ordinary server gives an error of: *STARTTLS extension not supported by server.* Would it be possible to somehow bypass the STARTTLS initialization? I'm good with simple smtp. btw server.result = {} thnx On Tuesday, December 4, 2012 12:35:25 PM UTC+2, Niphlod wrote: BTW: all of these are showing that all of them return *False*! ...what python version are you using ? The first log shows that no SSL is available. Please print both server.result and server.error --
[web2py] Re: Unable to send emails (mail.send) from server
Yes, I've turned the TLS off and now it works :) thanks for your very valuable tips! On Tuesday, December 4, 2012 1:45:41 PM UTC+2, Niphlod wrote: On Tuesday, December 4, 2012 12:25:00 PM UTC+1, Aurelijus Useckas wrote: Gmail server gives an error of: *No SSL support included in this Python* I'm using 2.6v of Python, doesn't it support it? It should, in theory, if openssl headers are compiled into the distribution you have. That's all a different problem ordinary server gives an error of: *STARTTLS extension not supported by server.* Would it be possible to somehow bypass the STARTTLS initialization? I'm good with simple smtp. tls=False on the server istantiation or settings.tls = False in db.py . By default it's true for security measures. btw server.result = {} thnx On Tuesday, December 4, 2012 12:35:25 PM UTC+2, Niphlod wrote: BTW: all of these are showing that all of them return *False*! ...what python version are you using ? The first log shows that no SSL is available. Please print both server.result and server.error --
[web2py] Re: Unable to send emails (mail.send) from server
one more question if I may, I'm trying to send email to my mailing list (around 1500 emails), bus I get a constant error: WARNING:web2py:Mail.send failure:{'some@email': (451, 'Sender rate 78.5 of 50 messages per 5m')} do you know what could be causing this? On Tuesday, December 4, 2012 1:55:39 PM UTC+2, Aurelijus Useckas wrote: Yes, I've turned the TLS off and now it works :) thanks for your very valuable tips! On Tuesday, December 4, 2012 1:45:41 PM UTC+2, Niphlod wrote: On Tuesday, December 4, 2012 12:25:00 PM UTC+1, Aurelijus Useckas wrote: Gmail server gives an error of: *No SSL support included in this Python* I'm using 2.6v of Python, doesn't it support it? It should, in theory, if openssl headers are compiled into the distribution you have. That's all a different problem ordinary server gives an error of: *STARTTLS extension not supported by server.* Would it be possible to somehow bypass the STARTTLS initialization? I'm good with simple smtp. tls=False on the server istantiation or settings.tls = False in db.py . By default it's true for security measures. btw server.result = {} thnx On Tuesday, December 4, 2012 12:35:25 PM UTC+2, Niphlod wrote: BTW: all of these are showing that all of them return *False*! ...what python version are you using ? The first log shows that no SSL is available. Please print both server.result and server.error --
Re: [web2py] Re: Unable to send emails (mail.send) from server
thnx guys On Tue, Dec 4, 2012 at 10:11 PM, LightDot light...@gmail.com wrote: The SMTP server you're using has restrains on the number of messages that can be sent in a certain time period. Also, make sure the provider's terms and conditions allow such usage so that you don't get suspended... In any case, these are not really errors and have nothing to do with web2py itself. Regards, Ales On Tuesday, December 4, 2012 6:09:23 PM UTC+1, Aurelijus Useckas wrote: one more question if I may, I'm trying to send email to my mailing list (around 1500 emails), bus I get a constant error: WARNING:web2py:Mail.send failure:{'some@email': (451, 'Sender rate 78.5 of 50 messages per 5m')} do you know what could be causing this? On Tuesday, December 4, 2012 1:55:39 PM UTC+2, Aurelijus Useckas wrote: Yes, I've turned the TLS off and now it works :) thanks for your very valuable tips! On Tuesday, December 4, 2012 1:45:41 PM UTC+2, Niphlod wrote: On Tuesday, December 4, 2012 12:25:00 PM UTC+1, Aurelijus Useckas wrote: Gmail server gives an error of: *No SSL support included in this Python* I'm using 2.6v of Python, doesn't it support it? It should, in theory, if openssl headers are compiled into the distribution you have. That's all a different problem ordinary server gives an error of: *STARTTLS extension not supported by server.* Would it be possible to somehow bypass the STARTTLS initialization? I'm good with simple smtp. tls=False on the server istantiation or settings.tls = False in db.py . By default it's true for security measures. btw server.result = {} thnx On Tuesday, December 4, 2012 12:35:25 PM UTC+2, Niphlod wrote: BTW: all of these are showing that all of them return *False*! ...what python version are you using ? The first log shows that no SSL is available. Please print both server.result and server.error -- --
Re: [web2py] User accessed site without logging in
Hi Massimo, One of my users gets an error: Bad Request (request.client=unknown) Does it have anything to do with your update? Can I change the requirement somewhere? Thank you On Tuesday, July 24, 2012 11:26:21 PM UTC+3, Massimo Di Pierro wrote: Perhaps it would be safe to block access to the site if request.client is unknown. I think we should change web2py to block access to any web2py app if request.client does not validate as an IP address. Massimo On Tuesday, 24 July 2012 15:24:06 UTC-5, Massimo Di Pierro wrote: Here is a possible cause of the problem although I am not sure. There are two possible issues which may conspire to create this problem. Issue #1 === There is a session file in the app you sent me called: unknown-c4571a37... session files should be ip-. This means that one of the HEADERS http_x_forwarded_for or remote_addr has a value unknown. A first google search retuned: http://nixforums.org/about154671-Hacking-X-Forwarded-For.html which opens the possibility the the web server, in your case nginx, is not finding the client ip address (how is that possible) and setting it to unknown. This should never happen. The client_addr is a required field for WSGI. This could be the result of a hacking attempt but it would required both parties doing the hacking for the sessions to be mixed up. Issue #2 === There is a bug with may prevent urandom from working: http://community.webfaction.com/questions/9333/importerror-cannot-import-name-urandom http://stackoverflow.com/questions/10776797/error-when-importing-wsgihandler-with-django Can you check if you can import urandom on your version of python on webfaction? It is therefore theoretically possible that, given the concurrency model of nginx, if two users visit the site very close to each other, with urandom missing, both declaring the same incorrect client ip (unknown), they get assigned the same session id. This is because web2py has no way of distinguishing the two users and lacks a proper random number generator. TODO: 1) check if you can import urandom 2) try understand how it possible to have an unkown client_addr in the http headers. My google search returned nothing about 2. Has anybody ever seen this before? Please let us know. On Tuesday, 24 July 2012 14:50:04 UTC-5, Massimo Di Pierro wrote: Nothing stands out from your code. It is very good code. You have changed to gluon/tools.py but I do not think they can be causing this problem. On Tuesday, 24 July 2012 14:48:16 UTC-5, Massimo Di Pierro wrote: I should add that the conflict I mentioned below is not possible unless there is a proxy in between. That is because the session id includes the client IP. I really do not see how this problem can be possible. Are you sure they are not playing a prank on you? If they share a facebook page perhaps they know each other. I have to ask but we will keep investigating the issue very seriously nevertheless. For now I suggest you add this to your code: if auth.user: session.clients = session.clients or [] if not request.client in session.clients: session.clients.append(request.client) if len(session.clients)1: print auth.user.email, session.clients log the output and check how often you have multiple session.clients for the same email from different network top level domains (xxx.*.*.*) If you do, email the user and check what is going on with them. Massimo On Tuesday, 24 July 2012 14:26:35 UTC-5, Massimo Di Pierro wrote: The only time I have seen something like this was long age. Web2py was running on replicated VMs behing a load balancer. If two requests from new users arrived within a short time frame (do not remember if a millisecond or a second), they were assigned the same session uuid because uuid.uuid4() could not discriminate between the VMs. We fixed it by make uuid dependent on the os entropy source urandom and initializing it differently on different VMs using the IP address. The fix works on linux/unix but not on Windows. Replicated windows machine may suffer from this problem still. What is the web server and configuration in your case? Do you know what was the link that caused the problem? Which page she was directed too? massimo On Tuesday, 24 July 2012 10:18:46 UTC-5, Jonathan Lundell wrote: On 24 Jul 2012, at 6:41 AM, Neil wrote: Good point about trunk. There are some features that I liked and got used to, but nothing essential. I'll try to summarize any relevant settings in the hope that someone can spot something. In 0.py I have: ... settings.login_method = 'local' settings.login_config = '' ... in db.py: ... auth = Auth(db, hmac_key=Auth.get_or_create_key()) crud, service, plugins = Crud(db), Service(), PluginManager() auth.define_tables() db.auth_user.last_name.requires = None
[web2py] Re: Unable to send emails (mail.send) from server
Thanx for a tip Niphlod, Here's the output: send: 'ehlo [127.0.1.1]\r\n' reply: '250-mx.google.com at your service, [95.244.128.226]\r\n' reply: '250-SIZE 35882577\r\n' reply: '250-8BITMIME\r\n' reply: '250-STARTTLS\r\n' reply: '250 ENHANCEDSTATUSCODES\r\n' reply: retcode (250); Msg: mx.google.com at your service, [95.244.128.226] SIZE 35882577 8BITMIME STARTTLS ENHANCEDSTATUSCODES send: 'STARTTLS\r\n' .. File console, line 1 send: 'ehlo [127.0.1.1]\r\n' ^ SyntaxError: invalid syntax File console, line 1 reply: '250-mx.google.com at your service, [95.244.128.226]\r\n' ^ SyntaxError: invalid syntax File console, line 1 reply: '250-SIZE 35882577\r\n' ^ SyntaxError: invalid syntax File console, line 1 reply: '250-8BITMIME\r\n' ^ SyntaxError: invalid syntax File console, line 1 reply: '250-STARTTLS\r\n' ^ SyntaxError: invalid syntax File console, line 1 reply: '250 ENHANCEDSTATUSCODES\r\n' ^ SyntaxError: invalid syntax File console, line 1 reply: retcode (250); Msg: mx.google.com at your service, [95.244. 128.226] ^ SyntaxError: invalid syntax File console, line 1 SIZE 35882577 ^ SyntaxError: invalid syntax File console, line 1 8BITMIME ^ SyntaxError: invalid syntax Traceback (most recent call last): File console, line 1, in module NameError: name 'STARTTLS' is not defined Traceback (most recent call last): File console, line 1, in module NameError: name 'ENHANCEDSTATUSCODES' is not defined File console, line 1 send: 'STARTTLS\r\n' ^ SyntaxError: invalid syntax send: 'ehlo [127.0.1.1]\r\n' File console, line 1 ..send: 'ehlo [127.0.1.1]\r\n' ^ Could you help me to figure out what's wrong? On Monday, December 3, 2012 1:29:33 AM UTC+2, Niphlod wrote: let's inspect the code: if the exception has something to do with an error related to sending the email, the value returned is always True. That means that if (and that's not your case) there's something wrong with body, sender, cc, etc, you would see an exception. Given instead that there are no errors with the parameters you're using (because your rtn is True), if there are errors sending the email they are stored into mail.error (usually the entire traceback). If that's None, by all means the mail server (or whatever you're connecting to) is responding something like ok, I queued it. To inspect the problem further, please add a line in gluon/tools.py smtp_args = self.settings.server.split(':') if self.settings.ssl: server = smtplib.SMTP_SSL(*smtp_args) else: server = smtplib.SMTP(*smtp_args) server.set_debuglevel(1)#added line That will print on stderr all the raw commands sent to the mail server. You can try sending an email just entering the shell of your app with web2py.py -M -S yourappname and then mail.send('t...@example.comjavascript:', 'subject', 'test body') or, cd-ing into web2py.py folder and web2py$ python Python 2.6.5 (r265:79063, Oct 1 2012, 22:04:36) [GCC 4.4.3] on linux2 Type help, copyright, credits or license for more information. from gluon.tools import Mail server = Mail('smtp.gmail.com:587', 'your...@gmail.com javascript:', 'youruser:password') server.send('t...@example.com javascript:', 'subject', 'test body') following this, something like send: 'ehlo [127.0.1.1]\r\n' reply: '250-mx.google.com at your service, [95.244.128.226]\r\n' reply: '250-SIZE 35882577\r\n' reply: '250-8BITMIME\r\n' reply: '250-STARTTLS\r\n' reply: '250 ENHANCEDSTATUSCODES\r\n' reply: retcode (250); Msg: mx.google.com at your service, [95.244.128.226] SIZE 35882577 8BITMIME STARTTLS ENHANCEDSTATUSCODES send: 'STARTTLS\r\n' .. should appear if the connection can be established with google servers. On Sunday, December 2, 2012 10:03:44 PM UTC+1, Aurelijus Useckas wrote: it only returns True. I'm beginning to guess there's smthng wrong with some firewalls ISP has placed On Sunday, December 2, 2012 9:54:40 PM UTC+2, Niphlod wrote: and the rtn ? it's strange that no errors are returned because that would mean that the mail library didn't catch the error (i.e. no error messages were returned by the mail server) On Sunday, December 2, 2012 1:57:22 PM UTC+1, Aurelijus Useckas wrote: yes, it gives very little info: In [3] : print mail.result {} In [4] : print mail.error None On Friday, November 30, 2012 1:42:16 PM UTC+2, Niphlod wrote: did you try to see what errors you get back ? rtn = mail.send('y...@example.com', 'Message subject', 'Plain text body of the message') print rtn print mail.result print mail.error ? Il giorno venerdì 30 novembre 2012 11:16:00 UTC+1, Aurelijus Useckas ha scritto: nope... I'm
[web2py] Re: Unable to send emails (mail.send) from server
yes, it gives very little info: In [3] : print mail.result {} In [4] : print mail.error None On Friday, November 30, 2012 1:42:16 PM UTC+2, Niphlod wrote: did you try to see what errors you get back ? rtn = mail.send('y...@example.com javascript:', 'Message subject', 'Plain text body of the message') print rtn print mail.result print mail.error ? Il giorno venerdì 30 novembre 2012 11:16:00 UTC+1, Aurelijus Useckas ha scritto: nope... I'm running a linux. Virus free environment. No need for McAfee ;) Thnx anyway guys, I guess I'll check with my provider. It has to be their fault. On Thursday, November 29, 2012 3:36:09 PM UTC+2, Mark wrote: If McAfee is running on the server, McAfee blocked the emails sending from web2py, which isn't on the whitelist of McAfee. Try to change web2py.exe into apache.exe On Wednesday, November 28, 2012 10:20:55 AM UTC-5, Aurelijus Useckas wrote: Hey, strange situation. Would apreciate your help... I have 2 identical versions of the same app running on local host (v2.2.1) and the server (v2.2.1 as well). Local version handles auth mail (mail.send) very well, but the app which is running on server is unable to send anything. This must be something with the server but I'm not sure what and how to ask?? BTW the server is dedicated, I myself have deployed a web2py on it. Thank you in advance! --
[web2py] Re: Unable to send emails (mail.send) from server
it only returns True. I'm beginning to guess there's smthng wrong with some firewalls ISP has placed On Sunday, December 2, 2012 9:54:40 PM UTC+2, Niphlod wrote: and the rtn ? it's strange that no errors are returned because that would mean that the mail library didn't catch the error (i.e. no error messages were returned by the mail server) On Sunday, December 2, 2012 1:57:22 PM UTC+1, Aurelijus Useckas wrote: yes, it gives very little info: In [3] : print mail.result {} In [4] : print mail.error None On Friday, November 30, 2012 1:42:16 PM UTC+2, Niphlod wrote: did you try to see what errors you get back ? rtn = mail.send('y...@example.com', 'Message subject', 'Plain text body of the message') print rtn print mail.result print mail.error ? Il giorno venerdì 30 novembre 2012 11:16:00 UTC+1, Aurelijus Useckas ha scritto: nope... I'm running a linux. Virus free environment. No need for McAfee ;) Thnx anyway guys, I guess I'll check with my provider. It has to be their fault. On Thursday, November 29, 2012 3:36:09 PM UTC+2, Mark wrote: If McAfee is running on the server, McAfee blocked the emails sending from web2py, which isn't on the whitelist of McAfee. Try to change web2py.exe into apache.exe On Wednesday, November 28, 2012 10:20:55 AM UTC-5, Aurelijus Useckas wrote: Hey, strange situation. Would apreciate your help... I have 2 identical versions of the same app running on local host (v2.2.1) and the server (v2.2.1 as well). Local version handles auth mail (mail.send) very well, but the app which is running on server is unable to send anything. This must be something with the server but I'm not sure what and how to ask?? BTW the server is dedicated, I myself have deployed a web2py on it. Thank you in advance! --
[web2py] Re: Unable to send emails (mail.send) from server
Yes, I am able to telnet to gmail smtp On Thursday, November 29, 2012 12:08:08 PM UTC+2, Niphlod wrote: is your server able to reach gmail's smtps servers ? On Thursday, November 29, 2012 10:46:12 AM UTC+1, Aurelijus Useckas wrote: External smtp, gmail --
[web2py] Re: Unable to send emails (mail.send) from server
nope... I'm running a linux. Virus free environment. No need for McAfee ;) Thnx anyway guys, I guess I'll check with my provider. It has to be their fault. On Thursday, November 29, 2012 3:36:09 PM UTC+2, Mark wrote: If McAfee is running on the server, McAfee blocked the emails sending from web2py, which isn't on the whitelist of McAfee. Try to change web2py.exe into apache.exe On Wednesday, November 28, 2012 10:20:55 AM UTC-5, Aurelijus Useckas wrote: Hey, strange situation. Would apreciate your help... I have 2 identical versions of the same app running on local host (v2.2.1) and the server (v2.2.1 as well). Local version handles auth mail (mail.send) very well, but the app which is running on server is unable to send anything. This must be something with the server but I'm not sure what and how to ask?? BTW the server is dedicated, I myself have deployed a web2py on it. Thank you in advance! --
[web2py] Re: Unable to send emails (mail.send) from server
External smtp, gmail --
[web2py] Unable to send emails (mail.send) from server
Hey, strange situation. Would apreciate your help... I have 2 identical versions of the same app running on local host (v2.2.1) and the server (v2.2.1 as well). Local version handles auth mail (mail.send) very well, but the app which is running on server is unable to send anything. This must be something with the server but I'm not sure what and how to ask?? BTW the server is dedicated, I myself have deployed a web2py on it. Thank you in advance! --
[web2py] SQLFORM.grid exports the whole table
I want to export a certain query in SQLFORM.grid to a CSV, but once I press on the (any) export option bellow the SQLFORM.grid, it exports the whole table and not just the ones meeting the certain criteria. Any ideas? --
Re: [web2py] SQLFORM.grid exports the whole table
OK On Tuesday, November 6, 2012 3:35:10 PM UTC+2, Johann Spies wrote: On 6 November 2012 12:50, Aurelijus Useckas aureliju...@gmail.comjavascript: wrote: I want to export a certain query in SQLFORM.grid to a CSV, but once I press on the (any) export option bellow the SQLFORM.grid, it exports the whole table and not just the ones meeting the certain criteria. This must be viewed as a bug in my opinion. To me it is important that the csv-buttons at the bottom of the grid must work with the same query that determines what is shown in the grid. If the user refines the original query using the search options available, that must be reflected in the csv-export. I think it is worth opening an issue about this. Will you do it please? As a workaround you can add your own export button which redirects to a function which handles the query correctly. Regards Johann -- Because experiencing your loyal love is better than life itself, my lips will praise you. (Psalm 63:3) --
Re: [web2py] SQLFORM.grid exports the whole table
I would personally expect the export to give the representation only of the fields I've made a query for. On Tue, Nov 6, 2012 at 4:10 PM, Johann Spies johann.sp...@gmail.com wrote: On 6 November 2012 15:57, Niphlod niph...@gmail.com wrote: one sec. export is meant to give the user the full resultset he can access (let's say, offline consultation). Currently, only the with hidden cols exports honour the current query. Before calling it a bug we should agree on what functionalities expose on the grid . If that is so, I think it should be the other way round. Export with hidden columns should export all data, while the normal csv-download should export what the user can see using the grid at that stage. Anyhow it should be clear to the user what he/she can expect and at the moment it is not. Regards Johann -- Because experiencing your loyal love is better than life itself, my lips will praise you. (Psalm 63:3) -- --
Re: [web2py] Re: web2py hangs while creating the mysql tables
Thanx Yarin, I've fixed this one. There are no more reserved words in the table or field definitions. Nevertheless it returns an error 1005 / 150, which refer to: table creation failed because a foreign key constraint was not correctly formed. If I get rid of any refering fields it works fine. Somehow the mysql doesn't recognise/understand the refering definitions. On Wed, Aug 8, 2012 at 4:08 AM, Yarin ykess...@gmail.com wrote: Massimo- steps to reproduce (using rocket/mysql/OSX): 1) In db.py pointing to MySQL: db.define_table('bad', Field('field_a', 'string'), Field('long', 'string') ) 2) Make a request. The app will error out and SQL syntax error will be ticketed. 3) Make another request. App requests now hang. Other apps are semi-hung (it's strange- i could open example app, but not others). App admin still works (?). The web2py process cannot be terminated and must be killed. (I brush up against this whenever I do something MySQL doesn't like- altering two tables at once in db.py, etc...) On Tuesday, August 7, 2012 5:42:30 PM UTC-4, Massimo Di Pierro wrote: can you reproduce. If this is a web2py problem, it needs to be fixed. On Tuesday, 7 August 2012 10:41:27 UTC-5, Yarin wrote: Think it actually does return a non-specific SQL syntax error that gets ticketed by web2py- but web2py never goes to an error screen and the browser just hangs- if i recall.. On Tuesday, August 7, 2012 11:30:37 AM UTC-4, Massimo Di Pierro wrote: Damn MySQL. It should not hang, it should return a operationalerror. On Tuesday, 7 August 2012 10:03:44 UTC-5, Yarin wrote: Change the name of in your Field('long') field in maps table - it's a reserved keyword in MySQL and will cause it to hang. On Tuesday, August 7, 2012 10:57:07 AM UTC-4, Aurelijus Useckas wrote: Here it is: db.define_table('tag', Field('tag', notnull=True, unique=True), format='%(tag)s') db.define_table('city', Field('name', notnull=True, unique=True), format='%(name)s') db.define_table('maps', Field('name'), Field('last_name'), Field('long'), Field('lat')) db.define_table('asoc', Field('name', label='Pavadinimas', unique=True), Field('City', 'list:reference city', label='Miestas'), Field('address', label='Adresas'), Field('www'), Field('tel'), Field('fax'), Field('email'), Field('President', label='Asociacijos prezidentas'), Field('CEO', label='Asociacijos generalinis'), Field('CEO_tel', label='Generalinio tel.'), Field('CEO_email', label='Generalinio email'), Field('CEO_mob', label='Generalinio mobilus'), Field('Pres_tel', label='Prezidento tel.'), Field('Pres_email', label='Prezidento email'), Field('Pres_mob', label='Prezidento mobilus'), Field('submited_at', 'datetime', default=request.now, writable=False, readable=False), Field('updated_at', 'datetime', default=request.now, update=request.now, writable=False, readable=False), Field('submited_by', db.auth_user, default=auth.user_id, writable=False, readable=False), Field('updated_by', db.auth_user, update=auth.user_id, writable=False, readable=False), format='%(name)s') db.asoc.email.requires=IS_**EMPTY_OR(IS_EMAIL()) db.asoc.CEO_email.requires=IS_**EMPTY_OR(IS_EMAIL()) db.asoc.Pres_email.requires=**IS_EMPTY_OR(IS_EMAIL()) db.asoc.name.requires=IS_NOT_**EMPTY() db.define_table('countries', Field('Country', notnull=True, unique=True), Field('latitude', readable=True, writable=False), Field('longitude', readable=True, writable=False), format = '%(Country)s' ) def horizontal_checkboxes(f,v): horizontal_widget = SQLFORM.widgets.checkboxes.** widget(f,v,cols=4) return locals() db.define_table('company', Field('title', label='Pavadinimas', unique=True), Field('CEO', label='Generalinis dir.'), Field('code', 'integer', label='Įmonės kodas',unique=True, default=None), Field('revenue', 'integer', label='Metinė apyvarta (mln.)'), Field('workers', 'integer', label='Darbuotojų skaičius'), # Field('logo', 'upload', label='Įmonės logo'), Field('produce_tag', 'list:reference tag', label='Produkcija', default=None), Field('produce', label='Produkcija (smulkiau)'), Field('Email', default=None, notnull=False), Field('Tel'), Field('Fax'), Field('www'), Field('City', 'list:reference city', label='Miestas'), Field('address', label='Adresas'), Field('extra_contacts', 'boolean', label='Pridėti kontakt. duomenų'), Field('extra_contacts_2', 'boolean', label='Pridėti kontakt. duomenų'), Field('name_1', label='Vardas'), Field('pareigos_1', label='Pareigos'), Field('tel_1', label='Papildomas tel.'), Field('email_1', label='Papildomas el. paštas'), Field('name_2', label='Vardas'), Field('pareigos_2', label='Pareigos'), Field('tel_2', label='Papildomas tel.'), Field
Re: [web2py] Re: web2py hangs while creating the mysql tables
I've tried nearly any possible syntax, but with no success. Any line with the reference to other table causes an error 1005 / 150: table creation failed because a foreign key constraint was not correctly formed Wasted a lot of time on it with no avail, guess will be forced to go back to ol' SQLite :) On Wednesday, August 1, 2012 8:03:05 PM UTC+3, Massimo Di Pierro wrote: Try Field('City', 'list:reference City', label='Miestas'), On Wednesday, 1 August 2012 11:05:02 UTC-5, Aurelijus Useckas wrote: tried it, still the same error :( thnx anyway On Wednesday, August 1, 2012 6:31:52 PM UTC+3, Massimo Di Pierro wrote: Yes. this is wrong: Field('City', db.city, 'list:reference city', label='Miestas'), should be Field('City', 'list:reference city', label='Miestas'), On Wednesday, 1 August 2012 09:15:07 UTC-5, Aurelijus Useckas wrote: Thank you Massimo, but the 1005/150 mysql problem seems to be smth wring with foreign key (merging of tables). Are there any flaws in my DAL syntax? This line seems to be the trigger: Field('City', db.city, 'list:reference city', label='Miestas'), it references: db.define_table('city', Field('name', notnull=True, unique=True), format='%(name)s') any ideas what's bothering mysql? On Wednesday, August 1, 2012 4:56:03 PM UTC+3, Massimo Di Pierro wrote: db = DAL('mysql://', check_reserved=['common','mysql']) Anyway, I am not sure your problem is that you are using a reserved keyword. Perhaps the table exists already. I am also surprised you are getting a pymysql InternalError and not an OperationalError. On Wednesday, 1 August 2012 07:45:01 UTC-5, Aurelijus Useckas wrote: I've changed the long into longitude and it seems to be solved but I still get errors: p2 S'class \'gluon.contrib.pymysql.err.InternalError\' (1005, uCan\'t create table \'./lpkdb/asoc.frm\' (errno: 150))' Now it says it cannot create next table, which is: db.define_table('asoc', Field('name', label='Pavadinimas', unique=True), Field('City', db.city, 'list:reference city', label='Miestas'), Field('address', label='Adresas'), Field('www'), Field('tel'), Field('fax'), Field('email'), Field('President', label='Asociacijos prezidentas'), Field('CEO', label='Asociacijos generalinis'), Field('CEO_tel', label='Generalinio tel.'), Field('CEO_email', label='Generalinio email'), Field('CEO_mob', label='Generalinio mobilus'), Field('Pres_tel', label='Prezidento tel.'), Field('Pres_email', label='Prezidento email'), Field('Pres_mob', label='Prezidento mobilus'), Field('submited_at', 'datetime', default=request.now, writable=False, readable=False), Field('updated_at', 'datetime', default=request.now, update=request.now, writable=False, readable=False), Field('submited_by', db.auth_user, default=auth.user_id, writable=False, readable=False), Field('updated_by', db.auth_user, update=auth.user_id, writable=False, readable=False), format='%(name)s') Are there some guidlines on how to construct DAL field names in order to avoid any conflict while migrating to mysql? On Wednesday, August 1, 2012 3:36:51 PM UTC+3, tomasz bandura wrote: Is it 'long' a mysql's reserved word? Regards Tomasz 2012/8/1 Aurelijus Useckas aurelijus.usec...@gmail.com this is the trigger i guess: db.define_table('maps', Field('name'), Field('last_name'), Field('long'), Field('lat'), format='%(name)s') On Wednesday, August 1, 2012 3:30:40 PM UTC+3, Aurelijus Useckas wrote: Hi, I've built the app on SQLite and now want to migrate to the server based mysql. BUT web2py hangs in the middle of creating, basicaly just after the auth tables. When I restart the apache I can see auth tables as well as a few from my app. this is the err ticket that I get: (dp1 S'output' p2 S'class \'gluon.contrib.pymysql.err.**ProgrammingError\' (1064, uYou have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near \'long VARCHAR(255),\\nlat VARCHAR(255),\\nPRIMARY KEY(id)\\n) ENGINE=InnoDB CHA\' at line 5)' p3 sS'layer' p4 S'/opt/web-apps/web2py/**applications/init/models/db_**comp.py' p5 sS'code' p6 thnx -- --
Re: [web2py] Re: web2py hangs while creating the mysql tables
) db.company.Association.requires=IS_IN_DB(db,'asoc.id',db.asoc._format, zero='-Pasirinkti-') db.define_table('comment', Field('body','text',label='Your comment'), Field('company', db.company, 'list: reference company', readable=False, writable=False), Field('posted_on','datetime',default=request.now), Field('posted_by', db.auth_user, 'list: reference auth_user', default=auth.user_id)) db.comment.posted_on.writable=db.comment.posted_on.readable=False db.comment.posted_by.writable=db.comment.posted_by.readable=False db.comment.company.default = request.args(0) On Tuesday, August 7, 2012 5:36:49 PM UTC+3, Massimo Di Pierro wrote: Can you please post the entire mode? My guess is an issue with capitalization perhaps combined with corruption of table files. On Tuesday, 7 August 2012 06:00:06 UTC-5, Aurelijus Useckas wrote: I've tried nearly any possible syntax, but with no success. Any line with the reference to other table causes an error 1005 / 150: table creation failed because a foreign key constraint was not correctly formed Wasted a lot of time on it with no avail, guess will be forced to go back to ol' SQLite :) On Wednesday, August 1, 2012 8:03:05 PM UTC+3, Massimo Di Pierro wrote: Try Field('City', 'list:reference City', label='Miestas'), On Wednesday, 1 August 2012 11:05:02 UTC-5, Aurelijus Useckas wrote: tried it, still the same error :( thnx anyway On Wednesday, August 1, 2012 6:31:52 PM UTC+3, Massimo Di Pierro wrote: Yes. this is wrong: Field('City', db.city, 'list:reference city', label='Miestas'), should be Field('City', 'list:reference city', label='Miestas'), On Wednesday, 1 August 2012 09:15:07 UTC-5, Aurelijus Useckas wrote: Thank you Massimo, but the 1005/150 mysql problem seems to be smth wring with foreign key (merging of tables). Are there any flaws in my DAL syntax? This line seems to be the trigger: Field('City', db.city, 'list:reference city', label='Miestas'), it references: db.define_table('city', Field('name', notnull=True, unique=True), format='%(name)s') any ideas what's bothering mysql? On Wednesday, August 1, 2012 4:56:03 PM UTC+3, Massimo Di Pierro wrote: db = DAL('mysql://', check_reserved=['common','mysql']) Anyway, I am not sure your problem is that you are using a reserved keyword. Perhaps the table exists already. I am also surprised you are getting a pymysql InternalError and not an OperationalError. On Wednesday, 1 August 2012 07:45:01 UTC-5, Aurelijus Useckas wrote: I've changed the long into longitude and it seems to be solved but I still get errors: p2 S'class \'gluon.contrib.pymysql.err.InternalError\' (1005, uCan\'t create table \'./lpkdb/asoc.frm\' (errno: 150))' Now it says it cannot create next table, which is: db.define_table('asoc', Field('name', label='Pavadinimas', unique=True), Field('City', db.city, 'list:reference city', label='Miestas'), Field('address', label='Adresas'), Field('www'), Field('tel'), Field('fax'), Field('email'), Field('President', label='Asociacijos prezidentas'), Field('CEO', label='Asociacijos generalinis'), Field('CEO_tel', label='Generalinio tel.'), Field('CEO_email', label='Generalinio email'), Field('CEO_mob', label='Generalinio mobilus'), Field('Pres_tel', label='Prezidento tel.'), Field('Pres_email', label='Prezidento email'), Field('Pres_mob', label='Prezidento mobilus'), Field('submited_at', 'datetime', default=request.now, writable=False, readable=False), Field('updated_at', 'datetime', default=request.now, update=request.now, writable=False, readable=False), Field('submited_by', db.auth_user, default=auth.user_id, writable=False, readable=False), Field('updated_by', db.auth_user, update=auth.user_id, writable=False, readable=False), format='%(name)s') Are there some guidlines on how to construct DAL field names in order to avoid any conflict while migrating to mysql? On Wednesday, August 1, 2012 3:36:51 PM UTC+3, tomasz bandura wrote: Is it 'long' a mysql's reserved word? Regards Tomasz 2012/8/1 Aurelijus Useckas aurelijus.usec...@gmail.com this is the trigger i guess: db.define_table('maps', Field('name'), Field('last_name'), Field('long'), Field('lat'), format='%(name)s') On Wednesday, August 1, 2012 3:30:40 PM UTC+3, Aurelijus Useckas wrote: Hi, I've built the app on SQLite and now want to migrate to the server based mysql. BUT web2py hangs in the middle of creating, basicaly just after the auth tables. When I restart the apache I can see auth tables as well as a few from my app. this is the err ticket that I get: (dp1 S'output' p2 S'class \'gluon.contrib.pymysql.err.**ProgrammingError\' (1064, uYou have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near \'long
[web2py] web2py hangs while creating the mysql tables
Hi, I've built the app on SQLite and now want to migrate to the server based mysql. BUT web2py hangs in the middle of creating, basicaly just after the auth tables. When I restart the apache I can see auth tables as well as a few from my app. this is the err ticket that I get: (dp1 S'output' p2 S'class \'gluon.contrib.pymysql.err.ProgrammingError\' (1064, uYou have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near \'long VARCHAR(255),\\nlat VARCHAR(255),\\nPRIMARY KEY(id)\\n) ENGINE=InnoDB CHA\' at line 5)' p3 sS'layer' p4 S'/opt/web-apps/web2py/applications/init/models/db_comp.py' p5 sS'code' p6 thnx --
[web2py] Re: web2py hangs while creating the mysql tables
this is the trigger i guess: db.define_table('maps', Field('name'), Field('last_name'), Field('long'), Field('lat'), format='%(name)s') On Wednesday, August 1, 2012 3:30:40 PM UTC+3, Aurelijus Useckas wrote: Hi, I've built the app on SQLite and now want to migrate to the server based mysql. BUT web2py hangs in the middle of creating, basicaly just after the auth tables. When I restart the apache I can see auth tables as well as a few from my app. this is the err ticket that I get: (dp1 S'output' p2 S'class \'gluon.contrib.pymysql.err.ProgrammingError\' (1064, uYou have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near \'long VARCHAR(255),\\nlat VARCHAR(255),\\nPRIMARY KEY(id)\\n) ENGINE=InnoDB CHA\' at line 5)' p3 sS'layer' p4 S'/opt/web-apps/web2py/applications/init/models/db_comp.py' p5 sS'code' p6 thnx --
Re: [web2py] Re: web2py hangs while creating the mysql tables
I really have no clue.. Could it be? On Wed, Aug 1, 2012 at 3:36 PM, tomasz bandura tomasz.band...@gmail.comwrote: Is it 'long' a mysql's reserved word? Regards Tomasz 2012/8/1 Aurelijus Useckas aurelijus.usec...@gmail.com this is the trigger i guess: db.define_table('maps', Field('name'), Field('last_name'), Field('long'), Field('lat'), format='%(name)s') On Wednesday, August 1, 2012 3:30:40 PM UTC+3, Aurelijus Useckas wrote: Hi, I've built the app on SQLite and now want to migrate to the server based mysql. BUT web2py hangs in the middle of creating, basicaly just after the auth tables. When I restart the apache I can see auth tables as well as a few from my app. this is the err ticket that I get: (dp1 S'output' p2 S'class \'gluon.contrib.pymysql.err.**ProgrammingError\' (1064, uYou have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near \'long VARCHAR(255),\\nlat VARCHAR(255),\\nPRIMARY KEY(id)\\n) ENGINE=InnoDB CHA\' at line 5)' p3 sS'layer' p4 S'/opt/web-apps/web2py/**applications/init/models/db_**comp.py' p5 sS'code' p6 thnx -- -- --
Re: [web2py] Re: web2py hangs while creating the mysql tables
I've changed the long into longitude and it seems to be solved but I still get errors: p2 S'class \'gluon.contrib.pymysql.err.InternalError\' (1005, uCan\'t create table \'./lpkdb/asoc.frm\' (errno: 150))' Now it says it cannot create next table, which is: db.define_table('asoc', Field('name', label='Pavadinimas', unique=True), Field('City', db.city, 'list:reference city', label='Miestas'), Field('address', label='Adresas'), Field('www'), Field('tel'), Field('fax'), Field('email'), Field('President', label='Asociacijos prezidentas'), Field('CEO', label='Asociacijos generalinis'), Field('CEO_tel', label='Generalinio tel.'), Field('CEO_email', label='Generalinio email'), Field('CEO_mob', label='Generalinio mobilus'), Field('Pres_tel', label='Prezidento tel.'), Field('Pres_email', label='Prezidento email'), Field('Pres_mob', label='Prezidento mobilus'), Field('submited_at', 'datetime', default=request.now, writable=False, readable=False), Field('updated_at', 'datetime', default=request.now, update=request.now, writable=False, readable=False), Field('submited_by', db.auth_user, default=auth.user_id, writable=False, readable=False), Field('updated_by', db.auth_user, update=auth.user_id, writable=False, readable=False), format='%(name)s') Are there some guidlines on how to construct DAL field names in order to avoid any conflict while migrating to mysql? On Wednesday, August 1, 2012 3:36:51 PM UTC+3, tomasz bandura wrote: Is it 'long' a mysql's reserved word? Regards Tomasz 2012/8/1 Aurelijus Useckas aurelijus.usec...@gmail.com this is the trigger i guess: db.define_table('maps', Field('name'), Field('last_name'), Field('long'), Field('lat'), format='%(name)s') On Wednesday, August 1, 2012 3:30:40 PM UTC+3, Aurelijus Useckas wrote: Hi, I've built the app on SQLite and now want to migrate to the server based mysql. BUT web2py hangs in the middle of creating, basicaly just after the auth tables. When I restart the apache I can see auth tables as well as a few from my app. this is the err ticket that I get: (dp1 S'output' p2 S'class \'gluon.contrib.pymysql.err.**ProgrammingError\' (1064, uYou have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near \'long VARCHAR(255),\\nlat VARCHAR(255),\\nPRIMARY KEY(id)\\n) ENGINE=InnoDB CHA\' at line 5)' p3 sS'layer' p4 S'/opt/web-apps/web2py/**applications/init/models/db_**comp.py' p5 sS'code' p6 thnx -- --
Re: [web2py] Re: web2py hangs while creating the mysql tables
Thank you Massimo, but the 1005/150 mysql problem seems to be smth wring with foreign key (merging of tables). Are there any flaws in my DAL syntax? This line seems to be the trigger: Field('City', db.city, 'list:reference city', label='Miestas'), it references: db.define_table('city', Field('name', notnull=True, unique=True), format='%(name)s') any ideas what's bothering mysql? On Wednesday, August 1, 2012 4:56:03 PM UTC+3, Massimo Di Pierro wrote: db = DAL('mysql://', check_reserved=['common','mysql']) Anyway, I am not sure your problem is that you are using a reserved keyword. Perhaps the table exists already. I am also surprised you are getting a pymysql InternalError and not an OperationalError. On Wednesday, 1 August 2012 07:45:01 UTC-5, Aurelijus Useckas wrote: I've changed the long into longitude and it seems to be solved but I still get errors: p2 S'class \'gluon.contrib.pymysql.err.InternalError\' (1005, uCan\'t create table \'./lpkdb/asoc.frm\' (errno: 150))' Now it says it cannot create next table, which is: db.define_table('asoc', Field('name', label='Pavadinimas', unique=True), Field('City', db.city, 'list:reference city', label='Miestas'), Field('address', label='Adresas'), Field('www'), Field('tel'), Field('fax'), Field('email'), Field('President', label='Asociacijos prezidentas'), Field('CEO', label='Asociacijos generalinis'), Field('CEO_tel', label='Generalinio tel.'), Field('CEO_email', label='Generalinio email'), Field('CEO_mob', label='Generalinio mobilus'), Field('Pres_tel', label='Prezidento tel.'), Field('Pres_email', label='Prezidento email'), Field('Pres_mob', label='Prezidento mobilus'), Field('submited_at', 'datetime', default=request.now, writable=False, readable=False), Field('updated_at', 'datetime', default=request.now, update=request.now, writable=False, readable=False), Field('submited_by', db.auth_user, default=auth.user_id, writable=False, readable=False), Field('updated_by', db.auth_user, update=auth.user_id, writable=False, readable=False), format='%(name)s') Are there some guidlines on how to construct DAL field names in order to avoid any conflict while migrating to mysql? On Wednesday, August 1, 2012 3:36:51 PM UTC+3, tomasz bandura wrote: Is it 'long' a mysql's reserved word? Regards Tomasz 2012/8/1 Aurelijus Useckas aurelijus.usec...@gmail.com this is the trigger i guess: db.define_table('maps', Field('name'), Field('last_name'), Field('long'), Field('lat'), format='%(name)s') On Wednesday, August 1, 2012 3:30:40 PM UTC+3, Aurelijus Useckas wrote: Hi, I've built the app on SQLite and now want to migrate to the server based mysql. BUT web2py hangs in the middle of creating, basicaly just after the auth tables. When I restart the apache I can see auth tables as well as a few from my app. this is the err ticket that I get: (dp1 S'output' p2 S'class \'gluon.contrib.pymysql.err.**ProgrammingError\' (1064, uYou have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near \'long VARCHAR(255),\\nlat VARCHAR(255),\\nPRIMARY KEY(id)\\n) ENGINE=InnoDB CHA\' at line 5)' p3 sS'layer' p4 S'/opt/web-apps/web2py/**applications/init/models/db_**comp.py' p5 sS'code' p6 thnx -- --
Re: [web2py] Re: web2py hangs while creating the mysql tables
tried it, still the same error :( thnx anyway On Wednesday, August 1, 2012 6:31:52 PM UTC+3, Massimo Di Pierro wrote: Yes. this is wrong: Field('City', db.city, 'list:reference city', label='Miestas'), should be Field('City', 'list:reference city', label='Miestas'), On Wednesday, 1 August 2012 09:15:07 UTC-5, Aurelijus Useckas wrote: Thank you Massimo, but the 1005/150 mysql problem seems to be smth wring with foreign key (merging of tables). Are there any flaws in my DAL syntax? This line seems to be the trigger: Field('City', db.city, 'list:reference city', label='Miestas'), it references: db.define_table('city', Field('name', notnull=True, unique=True), format='%(name)s') any ideas what's bothering mysql? On Wednesday, August 1, 2012 4:56:03 PM UTC+3, Massimo Di Pierro wrote: db = DAL('mysql://', check_reserved=['common','mysql']) Anyway, I am not sure your problem is that you are using a reserved keyword. Perhaps the table exists already. I am also surprised you are getting a pymysql InternalError and not an OperationalError. On Wednesday, 1 August 2012 07:45:01 UTC-5, Aurelijus Useckas wrote: I've changed the long into longitude and it seems to be solved but I still get errors: p2 S'class \'gluon.contrib.pymysql.err.InternalError\' (1005, uCan\'t create table \'./lpkdb/asoc.frm\' (errno: 150))' Now it says it cannot create next table, which is: db.define_table('asoc', Field('name', label='Pavadinimas', unique=True), Field('City', db.city, 'list:reference city', label='Miestas'), Field('address', label='Adresas'), Field('www'), Field('tel'), Field('fax'), Field('email'), Field('President', label='Asociacijos prezidentas'), Field('CEO', label='Asociacijos generalinis'), Field('CEO_tel', label='Generalinio tel.'), Field('CEO_email', label='Generalinio email'), Field('CEO_mob', label='Generalinio mobilus'), Field('Pres_tel', label='Prezidento tel.'), Field('Pres_email', label='Prezidento email'), Field('Pres_mob', label='Prezidento mobilus'), Field('submited_at', 'datetime', default=request.now, writable=False, readable=False), Field('updated_at', 'datetime', default=request.now, update=request.now, writable=False, readable=False), Field('submited_by', db.auth_user, default=auth.user_id, writable=False, readable=False), Field('updated_by', db.auth_user, update=auth.user_id, writable=False, readable=False), format='%(name)s') Are there some guidlines on how to construct DAL field names in order to avoid any conflict while migrating to mysql? On Wednesday, August 1, 2012 3:36:51 PM UTC+3, tomasz bandura wrote: Is it 'long' a mysql's reserved word? Regards Tomasz 2012/8/1 Aurelijus Useckas aurelijus.usec...@gmail.com this is the trigger i guess: db.define_table('maps', Field('name'), Field('last_name'), Field('long'), Field('lat'), format='%(name)s') On Wednesday, August 1, 2012 3:30:40 PM UTC+3, Aurelijus Useckas wrote: Hi, I've built the app on SQLite and now want to migrate to the server based mysql. BUT web2py hangs in the middle of creating, basicaly just after the auth tables. When I restart the apache I can see auth tables as well as a few from my app. this is the err ticket that I get: (dp1 S'output' p2 S'class \'gluon.contrib.pymysql.err.**ProgrammingError\' (1064, uYou have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near \'long VARCHAR(255),\\nlat VARCHAR(255),\\nPRIMARY KEY(id)\\n) ENGINE=InnoDB CHA\' at line 5)' p3 sS'layer' p4 S'/opt/web-apps/web2py/**applications/init/models/db_**comp.py' p5 sS'code' p6 thnx -- --
[web2py] Re: Need a little help with DAL
This worked! thnx a lot ;) On Tuesday, July 17, 2012 2:00:37 PM UTC+3, Anthony wrote: Note, SQLite cannot drop fields -- see http://web2py.com/books/default/chapter/29/6#Fixing-broken-migrations. How about if you create a fresh database (i.e., delete everything from the databases folder and start from scratch)? On Tuesday, July 17, 2012 6:27:52 AM UTC-4, Aurelijus Useckas wrote: I've tried to erase all fields, but still with no success :( yep, SQLite On Tuesday, July 17, 2012 11:15:02 AM UTC+3, Anthony wrote: Are you using SQLite? Did you initially forget to define workers as an integer field, enter some data, and then convert it to an integer field? What happens if you start with a fresh db? Anthony On Tuesday, July 17, 2012 3:55:35 AM UTC-4, Aurelijus Useckas wrote: Yes, it really acts like str. I'm using the nightly build 1.99.7 dev. Could it be because of dev? here's all of the db definition: db.define_table('company', Field('title', label='Pavadinimas', unique=True), Field('CEO', label='Generalinis dir.'), Field('code', 'integer', label='Įmonės kodas',unique=True, default=None), Field('revenue', 'integer', label='Metinė apyvarta'), Field('workers', 'integer', label='Darbuotojų skaičius'), # Field('logo', 'upload', label='Įmonės logo'), Field('produce_tag', db.tag, 'list:string', label='Produkcija', default=None), Field('produce', label='Produkcija (smulkiau)'), Field('Email', default=None, notnull=False), Field('Tel'), Field('Fax'), Field('www'), Field('City', db.city, 'list:reference city', label='Miestas'), Field('address', label='Adresas'), Field('extra_contacts', 'boolean', label='Pridėti kontakt. duomenų'), Field('extra_contacts_2', 'boolean', label='Pridėti kontakt. duomenų'), Field('name_1', label='Vardas'), Field('pareigos_1', label='Pareigos'), Field('tel_1', label='Papildomas tel.'), Field('email_1', label='Papildomas el. paštas'), Field('name_2', label='Vardas'), Field('pareigos_2', label='Pareigos'), Field('tel_2', label='Papildomas tel.'), Field('email_2', label='Papildomas el. paštas'), Field('Association', db.asoc, label='Priklauso asociacijai'), Field('other', 'text', label='Papildoma info'), Field('submited_at', 'datetime', default=request.now, writable=False, readable=False), Field('submited_by', db.auth_user, default=auth.user_id, writable=False, readable=False), Field('updated_at', 'datetime', update=request.now, writable=False, readable=False), Field('updated_by', db.auth_user, update=auth.user_id, writable=False, readable=False), Field('exports_wants_to', 'list:reference countries', label='Domina šalys'), # Field('exports_or_not', 'boolean', label = 'Ar eksportuoja?'), Field('exports_to', 'list:reference countries', label='Eksportuoja į', required=False), # Field('imports_or_not', 'boolean', label = 'Ar Importuoja?'), Field('imports_from', 'list:reference countries', label='Importuoja iš', required=False), format = '%(title)s') in order to test the selection, I use web2py DB environment. Query: db.company.workers40 acts like comparing strings.. wonder why :/ On Tuesday, July 17, 2012 9:37:20 AM UTC+3, pbreit wrote: Looks like it is comparing them as strings. As others noted, need to see code. --
[web2py] Re: Need a little help with DAL
Yes, it really acts like str. I'm using the nightly build 1.99.7 dev. Could it be because of dev? here's all of the db definition: db.define_table('company', Field('title', label='Pavadinimas', unique=True), Field('CEO', label='Generalinis dir.'), Field('code', 'integer', label='Įmonės kodas',unique=True, default=None), Field('revenue', 'integer', label='Metinė apyvarta'), Field('workers', 'integer', label='Darbuotojų skaičius'), # Field('logo', 'upload', label='Įmonės logo'), Field('produce_tag', db.tag, 'list:string', label='Produkcija', default=None), Field('produce', label='Produkcija (smulkiau)'), Field('Email', default=None, notnull=False), Field('Tel'), Field('Fax'), Field('www'), Field('City', db.city, 'list:reference city', label='Miestas'), Field('address', label='Adresas'), Field('extra_contacts', 'boolean', label='Pridėti kontakt. duomenų'), Field('extra_contacts_2', 'boolean', label='Pridėti kontakt. duomenų'), Field('name_1', label='Vardas'), Field('pareigos_1', label='Pareigos'), Field('tel_1', label='Papildomas tel.'), Field('email_1', label='Papildomas el. paštas'), Field('name_2', label='Vardas'), Field('pareigos_2', label='Pareigos'), Field('tel_2', label='Papildomas tel.'), Field('email_2', label='Papildomas el. paštas'), Field('Association', db.asoc, label='Priklauso asociacijai'), Field('other', 'text', label='Papildoma info'), Field('submited_at', 'datetime', default=request.now, writable=False, readable=False), Field('submited_by', db.auth_user, default=auth.user_id, writable=False, readable=False), Field('updated_at', 'datetime', update=request.now, writable=False, readable=False), Field('updated_by', db.auth_user, update=auth.user_id, writable=False, readable=False), Field('exports_wants_to', 'list:reference countries', label='Domina šalys'), # Field('exports_or_not', 'boolean', label = 'Ar eksportuoja?'), Field('exports_to', 'list:reference countries', label='Eksportuoja į', required=False), # Field('imports_or_not', 'boolean', label = 'Ar Importuoja?'), Field('imports_from', 'list:reference countries', label='Importuoja iš', required=False), format = '%(title)s') in order to test the selection, I use web2py DB environment. Query: db.company.workers40 acts like comparing strings.. wonder why :/ On Tuesday, July 17, 2012 9:37:20 AM UTC+3, pbreit wrote: Looks like it is comparing them as strings. As others noted, need to see code. --
[web2py] Re: Need a little help with DAL
I've tried to erase all fields, but still with no success :( yep, SQLite On Tuesday, July 17, 2012 11:15:02 AM UTC+3, Anthony wrote: Are you using SQLite? Did you initially forget to define workers as an integer field, enter some data, and then convert it to an integer field? What happens if you start with a fresh db? Anthony On Tuesday, July 17, 2012 3:55:35 AM UTC-4, Aurelijus Useckas wrote: Yes, it really acts like str. I'm using the nightly build 1.99.7 dev. Could it be because of dev? here's all of the db definition: db.define_table('company', Field('title', label='Pavadinimas', unique=True), Field('CEO', label='Generalinis dir.'), Field('code', 'integer', label='Įmonės kodas',unique=True, default=None), Field('revenue', 'integer', label='Metinė apyvarta'), Field('workers', 'integer', label='Darbuotojų skaičius'), # Field('logo', 'upload', label='Įmonės logo'), Field('produce_tag', db.tag, 'list:string', label='Produkcija', default=None), Field('produce', label='Produkcija (smulkiau)'), Field('Email', default=None, notnull=False), Field('Tel'), Field('Fax'), Field('www'), Field('City', db.city, 'list:reference city', label='Miestas'), Field('address', label='Adresas'), Field('extra_contacts', 'boolean', label='Pridėti kontakt. duomenų'), Field('extra_contacts_2', 'boolean', label='Pridėti kontakt. duomenų'), Field('name_1', label='Vardas'), Field('pareigos_1', label='Pareigos'), Field('tel_1', label='Papildomas tel.'), Field('email_1', label='Papildomas el. paštas'), Field('name_2', label='Vardas'), Field('pareigos_2', label='Pareigos'), Field('tel_2', label='Papildomas tel.'), Field('email_2', label='Papildomas el. paštas'), Field('Association', db.asoc, label='Priklauso asociacijai'), Field('other', 'text', label='Papildoma info'), Field('submited_at', 'datetime', default=request.now, writable=False, readable=False), Field('submited_by', db.auth_user, default=auth.user_id, writable=False, readable=False), Field('updated_at', 'datetime', update=request.now, writable=False, readable=False), Field('updated_by', db.auth_user, update=auth.user_id, writable=False, readable=False), Field('exports_wants_to', 'list:reference countries', label='Domina šalys'), # Field('exports_or_not', 'boolean', label = 'Ar eksportuoja?'), Field('exports_to', 'list:reference countries', label='Eksportuoja į', required=False), # Field('imports_or_not', 'boolean', label = 'Ar Importuoja?'), Field('imports_from', 'list:reference countries', label='Importuoja iš', required=False), format = '%(title)s') in order to test the selection, I use web2py DB environment. Query: db.company.workers40 acts like comparing strings.. wonder why :/ On Tuesday, July 17, 2012 9:37:20 AM UTC+3, pbreit wrote: Looks like it is comparing them as strings. As others noted, need to see code. --
[web2py] Need a little help with DAL
Hi, I have declared a table 'company' and the Field 'workers' which expects the number of workers in the company: db.define_table('company', (...) Field('workers', 'integer'), The problem arrises when I want to do some computations with this field, for instance select some row. Strange stuff happens. Let's say I have 4 entries/rows: db.compny.workers id 1 5 id 2 6 id 3 12 id 4 40 When I run a query *db.company.workers0 *the results are fine (4 displayed), When I run *db.company.workers38 *only the id 3 (12 workers) is shown. *db.company.workers100 *gives *none* results. *db.company.workers5 *gives only 6 I have absolutely no clue what is going on. Thnx
[web2py] Bootstrap.min.js
Hi, The Bootstrap.min.js in the Trunk layout.html is included in the beginning HEAD section. This didn't allow me to make use of the most, if not all of Bootstrap functions which required .js. Moving the inclusion to the end of the file solved the problem.
[web2py] Re: Bootstrap.min.js
I'm not sure if it is intended that way, haven't read about it in the docs. It's just the only solution that has worked for me. On Sunday, May 6, 2012 5:53:57 PM UTC+3, Massimo Di Pierro wrote: Is that how it is intended to be used? Can you point me to an example in the docs? On Sunday, 6 May 2012 06:05:58 UTC-5, Aurelijus Useckas wrote: Hi, The Bootstrap.min.js in the Trunk layout.html is included in the beginning HEAD section. This didn't allow me to make use of the most, if not all of Bootstrap functions which required .js. Moving the inclusion to the end of the file solved the problem.
Re: [web2py] Re: Bootstrap.min.js
Yes, bootstrap-min.js includes all the goodies, but as a skeleton suggests it has to be included in the end of a document. On Sun, May 6, 2012 at 9:03 PM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: the web2py bootstrap.min.js should include of the other boostrap-*.js On Sunday, 6 May 2012 12:56:50 UTC-5, pbreit wrote: Well, here's the base Bootstrap skeleton: !DOCTYPE htmlhtml lang=en head meta charset=utf-8 titleBootstrap, from Twitter/title meta name=viewport content=width=device-width, initial-scale=1.0 meta name=description content= meta name= author content= !-- Le styles -- link href=../assets/css/bootstrap.**csshttp://twitter.github.com/bootstrap/assets/css/bootstrap.css rel=stylesheet style body { padding-top: 60px; /* 60px to make the container go all the way to the bottom of the topbar */ } /style link href=../assets/css/bootstrap-**responsive.csshttp://twitter.github.com/bootstrap/assets/css/bootstrap-responsive.css rel=stylesheet !-- Le HTML5 shim, for IE6-8 support of HTML5 elements -- !--[if lt IE 9] script src=http://html5shim.**googlecode.com/svn/trunk/** html5.js http://html5shim.googlecode.com/svn/trunk/html5.js/script ![endif]-- !-- Le fav and touch icons -- link rel=shortcut icon href= ../assets/ico/favicon.**icohttp://twitter.github.com/bootstrap/assets/ico/favicon.ico link rel=apple-touch-icon-**precomposed sizes=144x144 href= ../assets/ico/apple-**touch-icon-144-precomposed.pnghttp://twitter.github.com/bootstrap/assets/ico/apple-touch-icon-144-precomposed.png ** link rel=apple-touch-icon-**precomposed sizes=114x114 href= ../assets/ico/apple-**touch-icon-114-precomposed.pnghttp://twitter.github.com/bootstrap/assets/ico/apple-touch-icon-114-precomposed.png ** link rel=apple-touch-icon-**precomposed sizes=72x72 href= ../assets/ico/apple-**touch-icon-72-precomposed.pnghttp://twitter.github.com/bootstrap/assets/ico/apple-touch-icon-72-precomposed.png ** link rel=apple-touch-icon-**precomposed href= ../assets/ico/apple-**touch-icon-57-precomposed.pnghttp://twitter.github.com/bootstrap/assets/ico/apple-touch-icon-57-precomposed.png ** /head body div class=navbar navbar-fixed-top div class=navbar-inner div class=container a class=btn btn-navbar data-toggle=collapse data-target=.nav-collapse span class=icon-bar/span span class= icon-bar/span span class=icon-bar/span /a a class=brand href=#http://twitter.github.com/bootstrap/examples/starter-template.html# Project name/a div class=nav-collapse ul class=nav li class =activea href=#http://twitter.github.com/bootstrap/examples/starter-template.html# Home/a/li lia href=#abouthttp://twitter.github.com/bootstrap/examples/starter-template.html#about About/a/li lia href=#contacthttp://twitter.github.com/bootstrap/examples/starter-template.html#contact Contact/a/**li /ul /div!--/.nav-collapse -- /div /div /div div class=container h1Bootstrap starter template/h1 pUse this document as a way to quick start any new project.br All you get is this message and a barebones HTML document./p /div !-- /container -- !-- Le javascript ==** -- !-- Placed at the end of the document so the pages load faster -- script src=../assets/js/jquery.jshttp://twitter.github.com/bootstrap/assets/js/jquery.js **/script script src=../assets/js/bootstrap-**transition.jshttp://twitter.github.com/bootstrap/assets/js/bootstrap-transition.js /script script src=../assets/js/bootstrap-**alert.jshttp://twitter.github.com/bootstrap/assets/js/bootstrap-alert.js /script script src=../assets/js/bootstrap-**modal.jshttp://twitter.github.com/bootstrap/assets/js/bootstrap-modal.js /script script src=../assets/js/bootstrap-**dropdown.jshttp://twitter.github.com/bootstrap/assets/js/bootstrap-dropdown.js /script script src=../assets/js/bootstrap-**scrollspy.jshttp://twitter.github.com/bootstrap/assets/js/bootstrap-scrollspy.js /script script src=../assets/js/bootstrap-**tab.jshttp://twitter.github.com/bootstrap/assets/js/bootstrap-tab.js /script script src=../assets/js/bootstrap-**tooltip.jshttp://twitter.github.com/bootstrap/assets/js/bootstrap-tooltip.js /script script src=../assets/js/bootstrap-**popover.jshttp://twitter.github.com/bootstrap/assets/js/bootstrap-popover.js /script script src=../assets/js/bootstrap-**button.jshttp://twitter.github.com/bootstrap/assets/js/bootstrap-button.js /script script src=../assets/js/bootstrap-**collapse.jshttp://twitter.github.com/bootstrap/assets/js/bootstrap-collapse.js /script script src=../assets/js/bootstrap-**carousel.jshttp://twitter.github.com/bootstrap/assets/js/bootstrap-carousel.js /script script src=../assets/js/bootstrap-**typeahead.jshttp://twitter.github.com/bootstrap/assets/js/bootstrap-typeahead.js /script /body/html
[web2py] Re: CMS question
I'm sorry if my question is lame, but I seem to get this error on execution: define_tables() got an unexpected keyword argument 'signature' Maybe you could suugest what I'm doing wrong? Many thanx On Friday, May 4, 2012 7:11:20 AM UTC+3, Massimo Di Pierro wrote: This is what I have so far. https://github.com/mdipierro/w2cms requires beautifulsoup still requires some work, specifically testing and usability. In order to edit-in-place you must click on the text then edit it. If you cut and part a link to you a youtube page, it will embed the video. If you cut and paste a link to an image, it will embed the image. Same for audio, video, flickr pages, etc. The download of remote pages mostly works but if they use an old version of jQuery, it may break the page and the ability to edit it. If you edit raw html for a page and add a class editable to one or more elements, only those elements will be editable, not the entire page. It lack a way to create groups and join groups. It only creates a group per person (same name as username) and virtual group everybody. There are lots of small details which I have not explained because I am not sure myself this works as I want or that I know how I want it to work.
Re: [web2py] Re: CMS question
A couple comments/questions/suggestions on w2cms, if I may. 1. Definately hackasaurus could be utilised. Great stuff. User friendliness you were looking for. 2. Would it be possible to not only point to the link of an object (picture), but upload it as well (Jquery or smth). There is a function to upload files, but I cannot manage to execute them. Extensions are not recognized. 3. Is it possible to grab pictures together with layout? 4. Smthing's wrong with the encoding, because text in grabed sites (in lithuanian for instance) looked distorted, some letters are not recognised. But I don't know if it matters much, because the text is wiped out anyways. 5. What does menu order stand for? 6. I'm experiencing problems while toggling the HTML edit function. thank you On Friday, May 4, 2012 4:27:14 PM UTC+3, Massimo Di Pierro wrote: Nice, did not know about it. On Friday, 4 May 2012 08:15:38 UTC-5, yamandu wrote: Sorry, I had not read all the messages neither tested it but I am interested as I was think on a similar project. Maybe I am going off topic but my idea was to use the hackasaurus.org as an user interface editor. It looks fine. But I am not aware of license issues or integrability. Has anyone any idea on use it? 2012/5/4 Albert Abril albert.ab...@gmail.com: Same for me, but i didn't check the code yet (i'm at work). 2012/5/4 Aurelijus Useckas aurelijus.usec...@gmail.com I'm sorry if my question is lame, but I seem to get this error on execution: define_tables() got an unexpected keyword argument 'signature' Maybe you could suugest what I'm doing wrong? Many thanx On Friday, May 4, 2012 7:11:20 AM UTC+3, Massimo Di Pierro wrote: This is what I have so far. https://github.com/mdipierro/w2cms requires beautifulsoup still requires some work, specifically testing and usability. In order to edit-in-place you must click on the text then edit it. If you cut and part a link to you a youtube page, it will embed the video. If you cut and paste a link to an image, it will embed the image. Same for audio, video, flickr pages, etc. The download of remote pages mostly works but if they use an old version of jQuery, it may break the page and the ability to edit it. If you edit raw html for a page and add a class editable to one or more elements, only those elements will be editable, not the entire page. It lack a way to create groups and join groups. It only creates a group per person (same name as username) and virtual group everybody. There are lots of small details which I have not explained because I am not sure myself this works as I want or that I know how I want it to work. -- Carlos J. Costa Cientista da Computação Esp. Gestão em Telecom EL MELECH NEEMAN! אָמֵן
[web2py] Re: CMS question
First of all it looks very promissing. I would just consider including some more options into the editing toolbar. *Underline* for instance, or perhaps even some additional fonts? Or do we want the style to be in line with the CSS only? That's a reasonable idea too. What about if I want to edit different div's? Is there an option to choose which part of a page I want to edit at the certain moment or if I press EDIT, all zones become active for input at once? But overall it trully looks The only CMS you need. Can't wait to put my hands on the beta :) Thnx On Tuesday, May 1, 2012 11:35:28 PM UTC+3, Massimo Di Pierro wrote: This is what I have so far... http://dl.dropbox.com/u/18065445/Tmp/w2cms.pdf you can try some of it here but you cannot login. You can edit the content of the white box. http://tests.web2py.com/w2cms/default/index - can clone any existing web site (copies, html, css, js, images and fixes all links) - comes with may layouts (supports all joomla, drupal, worldpress layouts) - can edit pages in place using html5 contentEditable (true wysiwyg) but can also edit raw html - users can limit which page areas are editable - injects scripts into pages which display 3 drawers on every page and are content dependent - pages have tags and read-write attributes. You can find tags and groups using autocomplete. - @{page.menu} inserts a menu, @{page.title} inserts title etc, @{widget.whatever.you.define} - If you cut and paste in the page a link to a youtube page, it embeds the video on the page. Same with vimeo and other oembed services. I use my own library for this which is similar to django-oembed and micawber (in fact it supports more services than them and I have submitted a patch to micawber). - supports latex via mathjax It still needs some work before I can release it. What else would you like to see in a CMS? massimo