After quick check on GAE i found out a small error in output.xsl please edit
output.xsl or patch it with included patch.

Boris

On Mon, Sep 14, 2009 at 8:56 PM, Boris Manojlovic <
[email protected]> wrote:

> Hello community,
>
>  after few months I'm happy to announce that new version of SQL WWW
> Developer is possible to integrate into web2py without need to patch web2py
> nor www sql designer code.
> Attached files in web2py-backend.tar.gz should replace default files in
> wwwsqldesigner-2.3.3.zip<http://wwwsqldesigner.googlecode.com/files/wwwsqldesigner-2.3.3.zip>
> in folder <unpacked_wwwsqldesigner>/db/web2py.
> Process of integration into web2py is following:
>
> 1. Download web2py <http://web2py.com/examples/static/web2py_src.zip> and
> unpack (doh)
> 2. create application named designer for example (no hard-coding of names
> needed anymore)
> 3. change dir to <application_name>/static/
> 4. Download and unpack wwwsqldesigner-2.3.3.zip and rename folder to
> designer (  that is needed if you don't want to change default.py code)
> 5. cd designer/db/web2py and unpack web2py-backend.tar.gz file from this
> email.
> 6. cd designer/js/ and edit it so it looks like this snipper bellow
>
> ---------------------------------------------------------------------------------------------------------
> var CONFIG = {
>     AVAILABLE_DBS:["mysql","sqlite","web2py","mssql","postgresql"],
>     DEFAULT_DB:"*web2py*",
>
>     AVAILABLE_LOCALES:["en","fr","de","cs","pl","pt_BR","es", "ru","eo"],
>     DEFAULT_LOCALE:"en",
>
>     AVAILABLE_BACKENDS:["php-mysql","php-blank","php-file","php-sqlite","*
> web2py*"],
>     DEFAULT_BACKEND:["*web2py*"],
>
>     RELATION_THICKNESS:2,
>     RELATION_SPACING:15,
>
>     STATIC_PATH: "",
>     XHR_PATH: "*../../default/*"
> }
>
> ---------------------------------------------------------------------------------------------------------
>
> 7. edit ( from web gui or from console ) *models/db.py* and add table
> definition:
>
> ---------------------------------------------------------------------------------------------------------
> db.define_table("tbldata",
>     Field("tblname", "string", default="tabela"),
>     Field("changed", "datetime", default=request.now),
>     Field("xmldata", "blob"))
>
> ---------------------------------------------------------------------------------------------------------
> 8. replace *controllers/default.py* with code attached ( default.py) -
> adding backend for web2py and redirection to static/designer/index.html
> 9a. Go to http://<YOUR_IP>/<appname>/ and enjoy creating tables visually
> 9b. Buy beer or some cocktail to me when in Belgrade, Serbia :) (and to
> Ondrej as he created this great tool)
>
> FIXES:
> data types fixes (removal of timestamp),
> many XSL fixes;
>         - relations are working now as they should - no need to remove
> anything from "relations" line if you are lazy it should just work :),
>         - tables without relation will be first on list of created tables
> as needed by web2py - when this is not a case web2py will error out.
>         - password fields will not be mapped to select box by design!!
>         - some defaults are mapped correctly - still watch out for single
> quotes!
>
>
> Boris Manojlovic
>
> --
> "Only two things are infinite, the universe and human stupidity, and I'm
> not sure about the former."-Albert Einstein
>



-- 
"Only two things are infinite, the universe and human stupidity, and I'm not
sure about the former."-Albert Einstein

for words in '' clean up forwarded e-mail before forwarding it to your
friends '';do BR=$(($( od -N 2 -t o2 /dev/urandom |grep -v 0000002|cut -d "
"  -f 2|cut -b 3) + 1)) ; printf "%0.${BR}s %s\n" ">>>>>" ${words} ;done

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

--- /home/steki/web2py/applications/designer/static/designer/db/web2py/output.xsl	2009-09-14 20:01:16.000000000 +0200
+++ output.xsl	2009-09-14 23:48:13.000000000 +0200
@@ -116,8 +116,8 @@
 	<xsl:template match="/sql">
 		<xsl:text>""" database class object creation (initialization) """&#xa;</xsl:text>
 		<xsl:text>if request.env.web2py_runtime_gae:            # if running on Google App Engine &#xa;</xsl:text>
-		<xsl:text>    db = DAL('gae')                           # connect to Google BigTable &#xa;</xsl:text>
-		<xsl:text>    session.connect(request, response, db=db) # and store sessions and tickets there &#xa;</xsl:text>
+		<xsl:text>    dbOBJECT = DAL('gae')                           # connect to Google BigTable &#xa;</xsl:text>
+		<xsl:text>    session.connect(request, response, db=dbOBJECT) # and store sessions and tickets there &#xa;</xsl:text>
 		<xsl:text>else:                                           # else use a normal relational database &#xa;</xsl:text>
 		<xsl:text>    dbOBJECT = SQLDB("sqlite://dbOBJECT.db")&#xa;&#xa;</xsl:text>
 		<!-- doing two pass: first ignore tables with relations as they will raise exception if table referenced still does not exist (not instantiated) -->

Reply via email to