Permalink
Browse files

enabled import without mako and added support files

  • Loading branch information...
1 parent a07c112 commit badd418068a811eea38e0c45fe90fd19cf5ba4a3 Tim Parkin committed Jan 5, 2009
Showing with 125 additions and 16 deletions.
  1. +2 −0 AUTHORS
  2. +19 −0 CHANGELOG
  3. +14 −0 FAQ
  4. +35 −0 INSTALL
  5. +10 −0 LICENSE
  6. +5 −0 NEWS
  7. +3 −1 README
  8. +18 −0 TODO
  9. +1 −1 formish.egg-info/PKG-INFO
  10. +2 −1 formish.egg-info/requires.txt
  11. +14 −12 formish/renderer.py
  12. +2 −1 setup.py
View
@@ -0,0 +1,2 @@
+Tim Parkin
+Matt Goodall
View
@@ -0,0 +1,19 @@
+==========
+Changlelog
+==========
+
+0.5.2 (2009-01-05)
+------------------
+
+BUG FIX: Added an import except wrapper around the default mako import
+
+0.5.1 (2009-01-05)
+------------------
+
+BUG FIX: Problem with redisplayed empty checkboxes after validation
+
+
+0.5 (2009-01-05)
+----------------
+
+NOTE: First External Release
View
14 FAQ
@@ -0,0 +1,14 @@
+***
+FAQ
+***
+
+
+Can't locate template
+---------------------
+
+Formish requires Mako in order to render the default template. However, this is not required and hence not installed by default. 'easy_install mako' to possibly get past this.
+
+The required version of setuptools
+----------------------------------
+
+Try 'easy_install -U setuptools' and then try installing again
View
35 INSTALL
@@ -0,0 +1,35 @@
+==========
+Installing
+==========
+
+Requirements
+------------
+
+You will need:
+
+* python 2.4 or later.
+
+* PEAK-rules which can be found here:
+ http://pypi.python.org/pypi/PEAK-Rules
+
+* validatish
+ http://pypi.python.org/pypi/validatish
+
+* convertish
+ http://pypi.python.org/pypi/convertish
+
+* schemaish
+ http://pypi.python.org/pypi/schemaish
+
+Installation
+------------
+
+If you have easy_install, you can run the following
+
+ easy_install formish
+
+This will also bring in all of the requirements.
+
+
+
+
View
10 LICENSE
@@ -0,0 +1,10 @@
+Copyright (c) 2008 Tim Parkin & Matt Goodall
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+ * The names of the contributors may not be used to endorse or promote products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
View
5 NEWS
@@ -0,0 +1,5 @@
+====
+NEWS
+====
+
+2009-01-05 - Project website launched at http://ish.io
View
4 README
@@ -1 +1,3 @@
-NEW API
+See docs/html/index.html
+
+For installation information, see INSTALL
View
18 TODO
@@ -0,0 +1,18 @@
+====
+TODO
+====
+
+
+Adding additional templating languages
+--------------------------------------
+
+* Jinja would be a good start
+
+
+Widgets
+----------
+
+* Select with other widget
+
+
+
@@ -1,6 +1,6 @@
Metadata-Version: 1.0
Name: formish
-Version: 0.5
+Version: 0.5.1
Summary: Formish is a schema backed, templating language agnostic form generation and handling library.
Home-page: http://ish.io/projects/show/formish
Author: Tim Parkin, Matt Goodall
@@ -1,4 +1,5 @@
PEAK-Rules
schemaish
validatish
-convertish
+convertish
+webob
View
@@ -12,21 +12,23 @@
"""
import pkg_resources
-import mako.lookup
+try:
+ import mako.lookup
+ class Renderer(object):
-class Renderer(object):
+ def __init__(self):
+ self.lookup = mako.lookup.TemplateLookup(
+ directories=[pkg_resources.resource_filename('formish', 'templates/mako')],
+ input_encoding='utf-8', output_encoding='utf-8',
+ default_filters=['unicode', 'h']
+ )
- def __init__(self):
- self.lookup = mako.lookup.TemplateLookup(
- directories=[pkg_resources.resource_filename('formish', 'templates/mako')],
- input_encoding='utf-8', output_encoding='utf-8',
- default_filters=['unicode', 'h']
- )
+ def __call__(self, template, args):
+ return self.lookup.get_template(template).render(**args)
- def __call__(self, template, args):
- return self.lookup.get_template(template).render(**args)
+ _default_renderer = Renderer()
-
-_default_renderer = Renderer()
+except ImportEror:
+ _default_renderer = None
View
@@ -1,7 +1,7 @@
from setuptools import setup, find_packages
import sys, os, glob
-version = '0.5.1'
+version = '0.5.2'
setup(name='formish',
version=version,
@@ -35,6 +35,7 @@
'schemaish',
'validatish',
'convertish',
+ 'webob',
],
entry_points="""
# -*- Entry points: -*-

0 comments on commit badd418

Please sign in to comment.