[SQL-CVS] r876 - in trunk/SQLObject/docs: . web
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: <sub...@co...> - 2005-08-01 05:56:24
|
Author: ianb Date: 2005-08-01 05:56:10 +0000 (Mon, 01 Aug 2005) New Revision: 876 Added: trunk/SQLObject/docs/index.txt trunk/SQLObject/docs/rebuild trunk/SQLObject/docs/web/ trunk/SQLObject/docs/web/community.txt trunk/SQLObject/docs/web/default-site.css trunk/SQLObject/docs/web/index.txt trunk/SQLObject/docs/web/links.txt trunk/SQLObject/docs/web/repository.txt trunk/SQLObject/docs/web/site.js trunk/SQLObject/docs/web/style.css Log: Added files and documents for building the entire site Added: trunk/SQLObject/docs/index.txt =================================================================== --- trunk/SQLObject/docs/index.txt 2005-08-01 05:55:51 UTC (rev 875) +++ trunk/SQLObject/docs/index.txt 2005-08-01 05:56:10 UTC (rev 876) @@ -0,0 +1,27 @@ +SQLObject Documentation +======================= + +`SQLObject Documentation <SQLObject.html>`_: + This covers the core of SQLObject in detail. + +`SQLBuilder Documentation <SQLBuilder.html>`_: + This covers the ``sqlobject.sqlbuilder`` module, which is used + to build SQL queries. + +`Inheritance <Inheritance.html>`_: + This covers ``InheritableSQLObject``, a more useful way of doing + inheritance with SQLObject classes/tables. + +`interface.py <interface.py.html>`_: + A somewhat-formal interface for SQLObject classes and related + objects. + +`News <News.html>`_: + What's new in SQLObject, by version. + +`Frequently Asked Questions <FAQ.html>`_: + Q & A + +`Developer's Guide <DeveloperGuide.html>`_: + Guidelines for contributing code to SQLObject. + Added: trunk/SQLObject/docs/rebuild =================================================================== --- trunk/SQLObject/docs/rebuild 2005-08-01 05:55:51 UTC (rev 875) +++ trunk/SQLObject/docs/rebuild 2005-08-01 05:56:10 UTC (rev 876) @@ -0,0 +1,22 @@ +#!/bin/sh + +here=`pwd` +parent=`dirname $here` +DOCDIR=~/co/SQLObject/docs/ +echo "Adding $parent to \$PYTHONPATH" +export PYTHONPATH=$parent:$PYTHONPATH + +NORMAL="Authors DeveloperGuide FAQ Inheritance News SQLBuilder + SQLObject TODO web/index web/links web/repository web/community + index" + +for NAME in $NORMAL ; do + if [ -e "$NAME.html" -a ! "$NAME.html" -ot "$NAME.txt" ] ; then + echo "$NAME is up to date." + continue + fi + echo "Building $NAME." + rst2html.py --no-toc-backlinks -- "$NAME.txt" > "$NAME.html" +done + +source-highlight -f html interface.py Property changes on: trunk/SQLObject/docs/rebuild ___________________________________________________________________ Name: svn:executable + * Property changes on: trunk/SQLObject/docs/web ___________________________________________________________________ Name: svn:ignore + *.html Added: trunk/SQLObject/docs/web/community.txt =================================================================== --- trunk/SQLObject/docs/web/community.txt 2005-08-01 05:55:51 UTC (rev 875) +++ trunk/SQLObject/docs/web/community.txt 2005-08-01 05:56:10 UTC (rev 876) @@ -0,0 +1,24 @@ +SQLObject Community +=================== + +SQLObject questions and discussion happens on the `sqlobject-discuss +mailing list +<http://lists.sourceforge.net/mailman/listinfo/sqlobject-discuss>`_. +You may want to view the `searchable archives +<http://pythonpaste.org/archives/list/sqlobject-discuss.en.html>`_. +`Gmane <http://www.gmane.org/>`_ also has the list in +`gmane.comp.python.sqlobject +<news://news.gmane.org/gmane.comp.python.sqlobject>`_. + +Bugs should be submitted to the `bug tracker +<http://sourceforge.net/tracker/?group_id=74338&atid=540672>`_, and +`patches to the patch tracker +<http://sourceforge.net/tracker/?group_id=74338&atid=540674>`_. + +Development takes place in the `subversion repository +<repository.html>`_. If you are interested in contributing you should +read the `Developer Guide <docs/DeveloperGuide.html>`_. + +The `Author List <docs/Authors.html>`_ tries to list all the major +contributors. + Added: trunk/SQLObject/docs/web/default-site.css =================================================================== --- trunk/SQLObject/docs/web/default-site.css 2005-08-01 05:55:51 UTC (rev 875) +++ trunk/SQLObject/docs/web/default-site.css 2005-08-01 05:56:10 UTC (rev 876) @@ -0,0 +1,391 @@ +/* +:Author: David Goodger, Ian Bicking +:Contact: ia...@co... +:date: $Date: 2003/11/01 20:35:45 $ +:version: $Revision: 1.3 $ +:copyright: This stylesheet has been placed in the public domain. + +A modification of the default cascading style sheet (v.1.3) for the +HTML output of Docutils. +*/ + +pre em, pre i { + font-family: monospace; +} + +em, i { + /* Typically serif fonts have much nicer italics */ + font-family: Times New Roman, Times, serif; +} + +ul li { + list-style-type: circle; +} + +a.toc-backref { + text-decoration: none; + color: black; +} + +a.toc-backref:hover { + background-color: inherit; +} + +h1 a:hover, h2 a:hover, h3 a:hover, h4 a:hover, h5 a:hover, h6:hover { + background-color: inherit; +} + +cite { + font-style: normal; + font-family: monospace; + font-weight: bold; +} + +dd { + margin-bottom: 0.5em; +} + +div.abstract { + margin: 2em 5em; +} + +div.abstract p.topic-title { + font-weight: bold; + text-align: center; +} + +div.attention, div.caution, div.danger, div.error, div.hint, +div.important, div.note, div.tip, div.warning { + background-color: #ccc; + width: 40%; + border: medium outset; + padding: 3px; + float: right +} + +div.attention p.admonition-title, div.caution p.admonition-title, +div.danger p.admonition-title, div.error p.admonition-title, +div.warning p.admonition-title { + color: #c00; + font-weight: bold; + font-family: sans-serif; + text-align: center; + background-color: #999; + display: block; + margin: 0; +} + +div.hint p.admonition-title, div.important p.admonition-title, +div.note p.admonition-title, div.tip p.admonition-title { + font-weight: bold; + font-family: sans-serif; + text-align: center; + background-color: #999; + display: block; + margin: 0; +} + +div.dedication { + margin: 2em 5em; + text-align: center; + font-style: italic; +} + +div.dedication p.topic-title { + font-weight: bold; + font-style: normal; +} + +div.figure { + margin-left: 2em; +} + +div.footer, div.header { + font-size: smaller; +} + +div.system-messages { + margin: 5em; +} + +div.system-messages h1 { + color: red; +} + +div.system-message { + border: medium outset; + padding: 1em; +} + +div.system-message p.system-message-title { + color: red; + font-weight: bold; +} + +div.topic { + margin: 2em; +} + +h3 a.toc-backref, h4 a.toc-backref, h5 a.toc-backref, +h6 a.toc-backref { + color: #000; +} + +h1.title { + text-align: center; +} + +h2.subtitle { + text-align: center; +} + +hr { + width: 75%; +} + +ol.simple, ul.simple { + margin-bottom: 1em; +} + +ul.contents li { + list-style: none; + margin: 0; + padding: 0; +} + +ul.contents { + position: fixed; + top: 0px; + right: 0px; + background-color: #9df; + border-left: 1px solid #07f; + border-bottom: 1px solid #07f; + width: 300px; + padding: 0; + margin: 0; +} + +ul.contents a { + padding: 2px 1em 2px 1em; + display: block; + text-decoration: none; + color: #024; +} + +ul.contents a:hover { + background-color: #085; + color: #fff; +} + +ul.contents li.header { + padding: 5px 1px 3px 0; + font-weight: bold; +} + +ul.contents li ul { + margin: 0.5em; + padding: 0; +} + +ol.arabic { + list-style: decimal; +} + +ol.loweralpha { + list-style: lower-alpha; +} + +ol.upperalpha { + list-style: upper-alpha; +} + +ol.lowerroman { + list-style: lower-roman; +} + +ol.upperroman { + list-style: upper-roman; +} + +p.caption { + font-style: italic; +} + +p.credits { + font-style: italic; + font-size: smaller; +} + +p.first { + margin-top: 0; +} + +p.label { + white-space: nowrap; +} + +p.topic-title { + font-weight: bold; +} + +pre.address { + margin-bottom: 0; + margin-top: 0; + font-family: serif; + font-size: 100%; +} + +pre.line-block { + font-family: serif; + font-size: 100%; +} + +pre.literal-block, pre.doctest-block { + margin-left: 2em; + margin-right: 2em; + background-color: #eee; + border: thin black solid; + padding: 5px; +} + +span.classifier { + font-family: sans-serif; + font-style: oblique; +} + +span.classifier-delimiter { + font-family: sans-serif; + font-weight: bold; +} + +span.interpreted { + font-family: sans-serif; +} + +span.option-argument { + font-style: italic; +} + +span.pre { + white-space: pre; +} + +span.problematic { + color: red; +} + +table { + margin-top: 0.5em; + margin-bottom: 0.5em; +} + +table.citation { + border-left: solid thin gray; + padding-left: 0.5ex +} + +table.docinfo { +} + +table.footnote { + border-left: solid thin black; + padding-left: 0.5ex; +} + +td, th { + padding-left: 0.5em; + padding-right: 0.5em; + vertical-align: top; +} + +td > p:first-child, th > p:first-child { + margin-top: 0em; +} + +th.docinfo-name, th.field-name { + font-weight: bold; + text-align: left; + white-space: nowrap; +} + +h1 tt, h2 tt, h3 tt, h4 tt, h5 tt, h6 tt { + font-size: 100%; +} + +code, tt { + color: #006; +} + +ul.auto-toc { + list-style-type: none; +} + +/***************************************** + * Doctest embedded examples + *****************************************/ + +span.doctest-url { + background-color: #eee; + border-top: 2px outset #666; + border-left: 2px outset #666; + border-right: 2px outset #666; + padding: 0.25em; +} + +div.doctest-example { + border: outset 5px #666; + background-color: #eee; + font-family: default; + padding: 0.5em; +} + +div.doctest-example h1 { + background-color: inherit; + border: none; + color: inherit; + font-family: default; +} + +div.doctest-example tt { + color: inherit; +} + +div.doctest-status { + background-color: #060; + color: #fff; +} + +span.doctest-header { + background-color: #ccc; + font-family: monospace; +} + +pre.doctest-errors { + border: none; + background-color: #333; + color: #600; +} + +div.source-code { + background-color: #000; + border: inset #999 3px; + overflow: auto; +} + +pre.source-code { + background-color: #000; + border: inset #999 3px; + overflow: auto; + font-family: monospace; + color: #fff; +} + +span.source-filename { + background-color: #000; + border-top: 2px outset #999; + border-left: 2px outset #999; + border-right: 2px outset #999; + padding: 0.25em; + color: #fff +} + Copied: trunk/SQLObject/docs/web/index.txt (from rev 870, Websites/sqlobject.org/index.txt) =================================================================== --- Websites/sqlobject.org/index.txt 2005-08-01 00:13:36 UTC (rev 870) +++ trunk/SQLObject/docs/web/index.txt 2005-08-01 05:56:10 UTC (rev 876) @@ -0,0 +1,181 @@ ++++++++++ +SQLObject ++++++++++ + +News +==== + +26-Jan-2005: + SQLObject 0.6.1_ is released (bugfixes). +22-Sep-2004: + SQLObject 0.6_ is released (major updates). +21-Sep-2004: + SQLObject 0.5.3_ is released (bugfixes). +14-Apr-2004: + SQLObject has wiki at http://wiki.sqlobject.org +8-Mar-2004: + SQLObject `0.5.2`_ is released (significant bugfixes). + SQLObject is now in a `Subversion repository`_. +12-Nov-2003: + SQLObject 0.5.1 is released (minor bugfixes) +1-Nov-2003: + SQLObject 0.5 is released. + +.. _0.5.2: docs/News.html#sqlobject-0-5-2 +.. _0.5.3: docs/News.html#sqlobject-0-5-3 +.. _0.6: docs/News.html#sqlobject-0-6 +.. _0.6.1: docs/News.html#sqlobject-0-6-1 + +Introduction +============ + +SQLObject is an *object-relational mapper*. It allows you to +translate RDBMS table rows into Python objects, and manipulate those +objects to transparently manipulate the database. + +In using SQLObject, you will create a class definition that will +describe how the object connects to the database (in addition to any +other methods you may wish to add to the class). SQLObject will +produce the code to access the database, and update the database with +your changes. The interface to the database is meant to be +indistinguishable from other interfaces you may add to the object. + +SQLObject also includes a novel feature to generate WHERE clauses +using Python syntax and objects (intead of generating SQL using string +substitution, as is traditional). + +Example +======= + +I love examples. Examples give a feel for the aesthetic of the API, +which matters to me a great deal. This is just a snippet that creates +a simple class that wraps a table:: + + from SQLObject import * + + __connection__ = MySQLConnection( + host='localhost', db='sqlobject_test', + user='sqlobject_test', passwd='sqltest') + + class Person(SQLObject): + + firstName = StringCol(length=100) + middleInitial = StringCol(length=1, default=None) + lastName = StringCol(length=100) + +Here's the (MySQL) ``CREATE`` statement for that class:: + + CREATE TABLE person ( + id INT PRIMARY KEY AUTO_INCREMENT, + first_name VARCHAR(100) NOT NULL, + middle_initial CHAR(1), + last_name VARCHAR(100) NOT NULL + ); + +SQLObject supports most database schemas that you already have, and +can also issue the ``CREATE`` statement for you. Postgres and SQLite +are also supported (with Sybase and Firebird in the working), and +SQLObject provides an abstraction layer that helps make your +application much more portable between these databases. + +Here's how you'd use the object:: + + >>> p = Person.new(firstName="John", lastName="Doe") + >>> p + <Person 1 firstName='John' middleInitial=None lastName='Doe'> + >>> p.firstName + 'John' + >>> p.middleInitial = 'Q' + >>> p.middleInitial + 'Q' + >>> p2 = Person(1) + >>> p2 + <Person 1 firstName='John' middleInitial='Q' lastName='Doe'> + >>> p is p2 + True + +Community +========= + +`Join the mailing list`__ or visit the `sqlobject-discuss archives`_. + +The SQLObject mailing list is also available through Gmane_, through +both a `web interface`_ or a `NNTP (news) interface`_. This also is a +good source for searchable archives. + +.. _gmane: http://www.gmane.org +.. _`web interface`: http://dir.gmane.org/gmane.comp.python.sqlobject +.. _`NNTP (news) interface`: news://news.gmane.org/gmane.comp.python.sqlobject + +.. __: http://lists.sourceforge.net/lists/listinfo/sqlobject-discuss + +.. _sqlobject-discuss archives: http://sourceforge.net/mailarchive/forum.php?forum=sqlobject-discuss + +.. _`subversion repository`: + +If you are tracking changes, keeping up with the most recent changes +is helpful. To access the Subversion repository:: + + svn co http://svn.colorstudy.com/trunk/SQLObject + +For the 0.5 branch:: + + svn co http://svn.colorstudy.com/branches/SQLObject/0.5 + +The author sometimes hangs out in IRC on ``#webware`` on +``irc.freenode.net``. + +Bugs, patches, etc +================== + +Please submit bugs and patches to the `SourceForge bug tracker`_. You +might want to send mail to the mailing list before generating patches. +For simple bug fixes it's just as easy for me to get a line number and +the fixed line -- submitting patches is more overhead than it's worth +for small changes. But again, **bug reports should go to the bug +tracker**, so that I don't lose anything. + +.. _SourceForge bug tracker: http://sourceforge.net/tracker/?atid=540672&group_id=74338&func=browse + +Download +======== + +SQLObject-0.6.1.tar.gz__ + +__ http://prdownloads.sourceforge.net/sqlobject/SQLObject-0.6.1.tar.gz?download + +SQLObject-0.6.1-1.noarch.rpm__ + +__ http://prdownloads.sourceforge.net/sqlobject/SQLObject-0.6.1-1.noarch.rpm?download + +SQLObject-0.6.1.win32.exe__ + +__ http://prdownloads.sourceforge.net/sqlobject/SQLObject-0.6.1.win32.exe?download + +You can also use the `Subversion repository`_ to access the latest +files. + +Documentation +============= + +`FAQ`__ + +__ docs/FAQ.html + +`New in 0.6.1`__ + +__ docs/News.html + +`SQLObject documentation`__ + +.. __: docs/SQLObject.html + +`SQLBuilder documentation`__ + +.. __: docs/SQLBuilder.html + +.. image:: http://sourceforge.net/sflogo.php?group_id=74338&type=4 + :height: 37 + :width: 125 + :alt: Hosted by SourceForge + Added: trunk/SQLObject/docs/web/links.txt =================================================================== --- trunk/SQLObject/docs/web/links.txt 2005-08-01 05:55:51 UTC (rev 875) +++ trunk/SQLObject/docs/web/links.txt 2005-08-01 05:56:10 UTC (rev 876) @@ -0,0 +1,37 @@ +SQLObject Links +=============== + +If you have a link you'd like added to this page, please `submit a bug +report with the link and title +<http://sourceforge.net/tracker/?atid=540672&group_id=74338&func=browse>`_. + +Open Source Projects +-------------------- + +* `sqlos Zope 3 SQLObject integration + <http://codespeak.net/z3/sqlos/>`_. + +* `Subway <http://subway.python-hosting.com/>`_ Web Framework; + integrates tightly with SQLObject for its models. + +* `Nabu <http://furius.ca/nabu/>`_, a publishing system. + +* `Ultra Gleeper <http://www.crummy.com/software/UltraGleeper/>`_, a + Recommendation Engine for Web Pages. + +Articles and Documentation +-------------------------- + +* `Canonical's SQLObject guide + <https://wiki.launchpad.canonical.com/SQLObjectGuide>`_. + +* `Webware/Paste + SQLObject Tutorial + <http://pythonpaste.org/docs/TodoTutorial.html>`_. + +* `SQLObject and CherryPy + <http://www.cherrypy.org/wiki/SQLObjectThreadPerConnection>`_. + +* `SQLObject & Database Programming in Python + <http://ianbicking.org/docs/sqlobject-presentation/sqlobject-and-database-programming.html>`_; + slides from a presentation on SQLObject. + Added: trunk/SQLObject/docs/web/repository.txt =================================================================== --- trunk/SQLObject/docs/web/repository.txt 2005-08-01 05:55:51 UTC (rev 875) +++ trunk/SQLObject/docs/web/repository.txt 2005-08-01 05:56:10 UTC (rev 876) @@ -0,0 +1,14 @@ +SQLObject Repository +==================== + +SQLObject is kept in a `Subversion <http://subversion.tigris.org/>`_ +repository at http://svn.colorstudy.com/trunk/SQLObject + +If you are using a command-line Subversion client, you can check +it out like:: + + svn co http://svn.pythonpaste.org/trunk/SQLObject + +If you are on Windows you may want to use `TortoiseSVN +<http://tortoisesvn.tigris.org/>`_. + Added: trunk/SQLObject/docs/web/site.js =================================================================== --- trunk/SQLObject/docs/web/site.js 2005-08-01 05:55:51 UTC (rev 875) +++ trunk/SQLObject/docs/web/site.js 2005-08-01 05:56:10 UTC (rev 876) @@ -0,0 +1,69 @@ +function setup_dropdowns() { + var els = document.getElementsByTagName('UL'); + for (var i = 0; i < els.length; i++) { + var el = els[i]; + if (el.className.search(/\bcontents\b/) > -1) { + enable_dropdown(el); + } + } +} + +function enable_dropdown(el) { + var title = el.getElementsByTagName('LI')[0]; + var plus_minus = document.createTextNode(' [-]'); + if (title.childNodes[0].tagName != 'A') { + anchor = document.createElement('A'); + while (title.childNodes.length) { + anchor.appendChild(title.childNodes[0]); + } + anchor.setAttribute('href', '#'); + anchor.style.padding = '1px'; + title.appendChild(anchor); + } else { + anchor = title.childNodes[0]; + } + anchor.appendChild(plus_minus); + function show_hide() { + if (el.sub_hidden) { + set_sub_li(el, ''); + anchor.removeChild(plus_minus); + plus_minus = document.createTextNode(' [-]'); + anchor.appendChild(plus_minus); + } else { + set_sub_li(el, 'none'); + anchor.removeChild(plus_minus); + plus_minus = document.createTextNode(' [+]'); + anchor.appendChild(plus_minus); + } + el.sub_hidden = ! el.sub_hidden; + return false; + } + anchor.onclick = show_hide; + show_hide(); +} + +function set_sub_li(list, display) { + var sub = list.getElementsByTagName('LI'); + for (var i = 1; i < sub.length; i++) { + sub[i].style.display = display; + } +} + +function add_onload(func) { + if (window.onload) { + var old_onload = window.onload; + function new_onload() { + old_onload(); + func(); + } + window.onload = new_onload; + } else { + window.onload = func; + } +} + +add_onload(setup_dropdowns); + + + + Added: trunk/SQLObject/docs/web/style.css =================================================================== --- trunk/SQLObject/docs/web/style.css 2005-08-01 05:55:51 UTC (rev 875) +++ trunk/SQLObject/docs/web/style.css 2005-08-01 05:56:10 UTC (rev 876) @@ -0,0 +1,95 @@ +body { + font-family: Helvetica,Arial,sans-serif; + margin: 0; + background-color: #fff; + color: #000; +} + +i, em { + font-family: Times New Roman,Times,serif; +} + +a:link { + color: #037; +} + +a:visited { + color: #204; +} + +a:hover { + background-color: #8df; +} + +div#header { + display: block; + background-color: #039; + color: #6df; + border-bottom: 3px solid #07f; + padding: 3px; + font-size: 30px; +} + +div#header h1 { + padding: 0; + margin: 0; + font-size: 1.5em; +} + +div#header a { + color: inherit; + text-decoration: none; +} + +div#nav { + float: left; + background-color: #9df; + border: 1px solid #07f; + margin-right: 1em; + border-bottom: 1px solid #07f; + width: 200px; +} + +div#nav ul { + padding: 0; + margin: 0; +} + +div#nav li { + list-style: none; + margin: 0; +} + +div#nav ul li ul li a { + padding: 2px 2em 2px 2em; + font-weight: normal; +} + +div#nav a { + display: block; + padding: 2px 1em 2px 1em; + text-decoration: none; + color: #024; + font-weight: bold; +} + +div#nav a:hover { + background-color: #085; + color: #fff; +} + +/* If I ever do menus that show the "current" page, that would be + by marking some "links" as selected */ +div#nav span.selected { + display: block; + font-weight: bold; + padding: 2px 1em 2px 1em; +} + +div#body { + padding: 1em; +} + +h1.page-title { + margin-top: 0; +} \ No newline at end of file |