Skip to main content

TurboGears Genshi quickstart template

Project description

gsquickstart is a TurboGears quickstart template plug-in for Genshi templates.
It will install a paste template which can be used with TurboGears'
``tg-admin quickstart`` command.


Installation
------------

Installation with setuptools::

$easy_install gsquickstart


Usage
-----

Creating a project
~~~~~~~~~~~~~~~~~~

The gsquickstart template is used like any other quickstart template with
tg-admin quickstart, you just have to specify the template name, which is
"tggenshi" (for TurboGears Genshi) with the ``-t`` option template instead
of the default kid template::

$tg-admin quickstart -t tggenshi [project name]

This will install three basic Genshi tempaltes and set up the project
configuration to use Gensi templates as default.


Updating a project
~~~~~~~~~~~~~~~~~~

For updating a project with the basic Genshi templates, change into your
project directory and run::

tg-admin update -t tggenshi

Since the "turbogears" template already installs Kid templates in
``<package>/templates``, they are removed by gsquickstart in a
post-template-creation step. But when update your project dir, the Kid
templates will be created again. Now gsquickstart can not just delete them
again, because they might have been created earlier and on purpose by the
developer.

What the new code does is: if it is an update command, prompt the user,
if the files ``<package>/templates/{login,master,welcome}.kid`` should
be removed (for each file). The default answer is 'n'.


Notice
------

The TurboGears 1.0 documentation is written with the default setting of
Kid & SQLObject in mind. The syntax of Genshi templates is very similar
to that of Kid but there are some differences to bear in mind.

For example, you need to make some changes to your templates, if you use
widgets with Genshi templates: put ``${ET(myform())}`` instead of
``${myform()}`` as a placeholder for widgets in the template.

You can find more information in the `TurboGears documentation`_ and on
the `Genshi website`_.

.. _TurboGears documentation :http://docs.turbogears.org/1.0/GenshiTemplating
.. _Genshi website: http://genshi.edgewall.org/wiki/GenshiFaq


What's new?
-----------

1.0
---

* The quickstart template was stripped of almost all files shared with the
standard "turbogears" template and now inherits from this template instead
of from "tgbase". The only files that are added/overwritten by "tggenshi"
are ``setup.py``, ``<package>/config/app.cfg`` and the Genshi templates
in ``<package>/templates/*.html``. But see the "Updating a project" section
above.

The new template structure makes it easier to stay synchronized with changes
to the standard turbogears template since most files will just be
inherited from.

* Synchronized ``app.cfg_tmpl` and `setup.py_tmpl`` with the latest
"turbogears" template.


1.0Beta2
--------

* Able to be indexed by turbogears cogbin.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

gsquickstart-1.0.zip (32.6 kB view hashes)

Uploaded Source

gsquickstart-1.0.tar.bz2 (25.5 kB view hashes)

Uploaded Source

Built Distributions

gsquickstart-1.0-py2.5.egg (30.4 kB view hashes)

Uploaded Source

gsquickstart-1.0-py2.4.egg (30.4 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page