Hi,

2013/8/27 Gallien Labeyrie <labeyrie.gall...@gmail.com>

> Hello,
>
> Coming from a PHP background, I've recently discovered Web2Py framework
> and I am amazed Its embed functionalities.
> However I'm wondering If someone among the community could enlighten me :
>
> - What's the easiest way to debbug in web2py ? (=> what would be the
> equivalent to dump variable content such as print_r() in php ?)
> I tried PDB but I don't find It really convinient...
>

see this:
http://stackoverflow.com/questions/2187821/what-is-the-equivalent-of-phps-print-r-in-python


> - How to connect an external MySQL database ?
> According to the official docs I tried the script given*
>  extract_mysql_models.py *
> but It only gives me a one line script like with the string connection.
> (It doesn't generate the model ?)
>
> legacy_db = DAL('mysql://password@somewebsite/dbname')
>
> You lost the username and check that somewebsite are the host name of your
MySQL Server.

legacy_db = DAL('mysql://username:password@somewebsite/dbname

where:

username = the name of the database user
password = the password of the database
somewebsite = is the host name of your server
dbname = The name of your database

See that the DAL is inside legacy_db, you need to change every  concidence
on the web2py docs of "db." to "legacy_db."

http://www.web2py.com/book/default/chapter/06#Connection-strings

> I put that line in a model file, but It doesn't seems to work. Plus I
> still have to declare all the tables manually which is a bit boring ...
>
> - Except the official website, are there any other useful resources online
> ?
>

Yes, you can check here: http://www.web2pyslices.com

>
> Thanks for the help,
>
> Gallien LABEYRIE
>
> --
>
> ---
> 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.
>

-- 

--- 
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.

Reply via email to