Changeset 826 for branches/4.x

Feb 6, 2016, 2:27:09 PM (4 years ago)

Make Sphinx docs work without the Cloud theme

Our custom navigation bar on the page header works only with the Cloud theme,
so we use a toc as the start page when creating the docs without Cloud theme.

2 added
4 edited


  • branches/4.x/docs/about.rst

    r779 r826  
    1 **PyGreSQL** is an *open-source* `Python <>`_ module
    2 that interfaces to a `PostgreSQL <>`_ database.
    3 It embeds the PostgreSQL query library to allow easy use of the powerful
    4 PostgreSQL features from a Python script.
     1About PyGreSQL
    6     | This software is copyright © 1995, Pascal Andre.
    7     | Further modifications are copyright © 1997-2008 by D'Arcy J.M. Cain.
    8     | Further modifications are copyright © 2009-2016 by the PyGreSQL team.
    9     | For licensing details, see the full :doc:`copyright`.
    11 **PostgreSQL** is a highly scalable, SQL compliant, open source
    12 object-relational database management system. With more than 20 years
    13 of development history, it is quickly becoming the de facto database
    14 for enterprise level open source solutions.
    15 Best of all, PostgreSQL's source code is available under the most liberal
    16 open source license: the BSD license.
    18 **Python** Python is an interpreted, interactive, object-oriented
    19 programming language. It is often compared to Tcl, Perl, Scheme or Java.
    20 Python combines remarkable power with very clear syntax. It has modules,
    21 classes, exceptions, very high level dynamic data types, and dynamic typing.
    22 There are interfaces to many system calls and libraries, as well as to
    23 various windowing systems (X11, Motif, Tk, Mac, MFC). New built-in modules
    24 are easily written in C or C++. Python is also usable as an extension
    25 language for applications that need a programmable interface.
    26 The Python implementation is copyrighted but freely usable and distributable,
    27 even for commercial use.
    29 **PyGreSQL** is a Python module that interfaces to a PostgreSQL database.
    30 It embeds the PostgreSQL query library to allow easy use of the powerful
    31 PostgreSQL features from a Python script.
    33 PyGreSQL is developed and tested on a NetBSD system, but it also runs on
    34 most other platforms where PostgreSQL and Python is running.  It is based
    35 on the PyGres95 code written by Pascal Andre (
    36 D'Arcy ( renamed it to PyGreSQL starting with
    37 version 2.0 and serves as the "BDFL" of PyGreSQL.
    39 The current version PyGreSQL 4.2 needs PostgreSQL 8.3 or newer and Python 2.5
    40 to 2.7. If you are using Python 3.x, you will need PyGreSQL 5.0 or newer.
     4.. include:: about.txt
  • branches/4.x/docs/

    r752 r826  
    1616import shlex
    18 # import Cloud theme
    19 # this will also automatically add the theme directory
    20 import cloud_sptheme
     18# Import Cloud theme (this will also automatically add the theme directory).
     19# Note: We add a navigation bar to the cloud them using a custom layout.
     21    import cloud_sptheme
     22    use_cloud_theme = True
     23except ImportError:
     24    use_cloud_theme = False
    2226# If extensions (or modules to document with autodoc) are in another directory,
    3640# Add any paths that contain templates here, relative to this directory.
    37 templates_path = ['_templates']
     41templates_path = ['_templates'] if use_cloud_theme else []
    3943# The suffix(es) of source filenames.
    4751# The master toctree document.
    48 master_doc = 'index'
     52master_doc = 'index' if use_cloud_theme else 'toc'
    5054# General information about the project.
    8084# List of pages which are included in other pages and therefore should
    8185# not appear in the toctree.
    82 exclude_patterns += ['about.rst',
     86exclude_patterns += [
    8387    'download/download.rst', 'download/files.rst',
    8488    'community/mailinglist.rst', 'community/source.rst',
    8589    'community/bugtracker.rst', 'community/support.rst',
    8690    'community/homes.rst']
     91if use_cloud_theme:
     92    # We use a naviagtion bar instead of the table of contents
     93    # and we include the about page on the index page.
     94    exclude_patterns += ['toc.rst', 'about.rst']
     96    exclude_patterns += ['index.rst']
    8898# The reST default role (used for this markup: `text`) for all documents.
    117127# The theme to use for HTML and HTML Help pages.  See the documentation for
    118128# a list of builtin themes.
    119 html_theme = 'cloud'
     129html_theme = 'cloud' if use_cloud_theme else 'default'
    121131# Theme options are theme-specific and customize the look and feel of a theme
    122132# further.  For a list of options available for each theme, see the
    123133# documentation.
    124 html_theme_options = {
    125     'roottarget': 'contents/index',
    126     'defaultcollapsed': True,
    127     'shaded_decor': True}
     134if use_cloud_theme:
     135    html_theme_options = {
     136        'roottarget': 'contents/index',
     137        'defaultcollapsed': True,
     138        'shaded_decor': True}
     140    html_theme_options = {}
    129142# Add any paths that contain custom themes here, relative to this directory.
  • branches/4.x/docs/download/download.rst

    r758 r826  
    1 Download PyGreSQL here:
    2 -----------------------
     1Current PyGreSQL versions
    44You can find PyGreSQL on the **Python Package Index** at
    1919  *
    2020  *
     22Older PyGreSQL versions
     25You can look for older PyGreSQL versions at
     26  *
  • branches/4.x/docs/index.rst

    r696 r826  
    1313    community/index
    15 .. include:: about.rst
     15.. include:: about.txt
Note: See TracChangeset for help on using the changeset viewer.