summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOndrej Zara <ondrej.zara@gmail.com>2013-01-10 13:48:35 +0100
committerOndrej Zara <ondrej.zara@gmail.com>2013-01-10 13:48:35 +0100
commit29815e159ad57f31e8acc7f5355f097ca1e0593f (patch)
tree7e53f050a14222f76b6bec80372782d1513a43af
parent6b1892a5951ad0bb62970bc92c965430615cb867 (diff)
downloadwwwsqldesigner-29815e159ad57f31e8acc7f5355f097ca1e0593f.zip
wwwsqldesigner-29815e159ad57f31e8acc7f5355f097ca1e0593f.tar.gz
wwwsqldesigner-29815e159ad57f31e8acc7f5355f097ca1e0593f.tar.bz2
web2py patch, thanks to Boris Manojlovic
-rw-r--r--db/web2py/output.xsl5
1 files changed, 3 insertions, 2 deletions
diff --git a/db/web2py/output.xsl b/db/web2py/output.xsl
index a1d4c0c..8b2fd03 100644
--- a/db/web2py/output.xsl
+++ b/db/web2py/output.xsl
@@ -85,10 +85,11 @@
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="@name"/>
- <xsl:text>", dbOBJECT.</xsl:text>
+ <xsl:text>", "reference </xsl:text>
<xsl:for-each select="relation">
<xsl:value-of select="@table"/>
</xsl:for-each>
+ <xsl:text>"</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
@@ -119,7 +120,7 @@
<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>
+ <xsl:text> dbOBJECT = DAL("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) -->
<!-- this is not bullet proff but should be sufficient for small projects will be in TODO :) -->
<xsl:for-each select="table">