FormAlchemy/formalchemy — Issue #18: PostgreSQL field CIDR, INET, MACADDR error in formalchemy.ext.pylons
Author: uralbash
Created: 2011-10-19 17:31:30+00:00
State: open

What steps will reproduce the problem?
1. install from formalchemy.ext.pylons Administration interface
2. try to edit model where exist sqlalchemy.databases.postgresql CIDR, INET or MACADDR field

What is the expected output? What do you see instead?
TypeError: No renderer found for field mac. Type MACADDR as no default renderer
11 % endfor
12
13 % for field in fieldset.render_fields.itervalues():
14 % if field.requires_label:
15

16 ${field.label_tag()|n}
17 ${field.render()|n}
18 % if 'instructions' in field.metadata:
19 ${field.metadata['instructions']}
/projects/python/web/pylons/mydevenv/lib/python2.6/site-packages/FormAlchemy-1.4.1-py2.6.egg/formalchemy/fields.py, line 1318:
'Type %s as no default renderer' % (self.name, self.type))
/projects/python/web/pylons/mydevenv/lib/python2.6/site-packages/FormAlchemy-1.4.1-py2.6.egg/formalchemy/fields.py, line 1718:
return AbstractField._get_renderer(self)
/projects/python/web/pylons/mydevenv/lib/python2.6/site-packages/FormAlchemy-1.4.1-py2.6.egg/formalchemy/fields.py, line 1323:
self._renderer = self._get_renderer()
/projects/python/web/pylons/mydevenv/lib/python2.6/site-packages/FormAlchemy-1.4.1-py2.6.egg/formalchemy/fields.py, line 981:
return not isinstance(self.renderer, HiddenFieldRenderer)
/projects/python/web/pylons/myapp_production/myapp/templates/forms/fieldset.mako, line 14:
% if field.requires_label:
/projects/python/web/pylons/mydevenv/lib/python2.6/site-packages/mako/runtime.py, line 711:
callable_(context, *args, **kwargs)
/projects/python/web/pylons/mydevenv/lib/python2.6/site-packages/mako/runtime.py, line 722:
result = template.error_handler(context, error)
/projects/python/web/pylons/mydevenv/lib/python2.6/site-packages/mako/runtime.py, line 713:
_render_error(template, context, e)
/projects/python/web/pylons/mydevenv/lib/python2.6/site-packages/mako/runtime.py, line 692:
_exec_template(inherit, lclcontext, args=args, kwargs=kwargs)
/projects/python/web/pylons/mydevenv/lib/python2.6/site-packages/mako/runtime.py, line 660:
**_kwargs_for_callable(callable_, data))
/projects/python/web/pylons/mydevenv/lib/python2.6/site-packages/mako/template.py, line 311:
as_unicode=True)
/projects/python/web/pylons/mydevenv/lib/python2.6/site-packages/Pylons-1.0-py2.6.egg/pylons/templating.py, line 240:
return literal(template.render_unicode(**globs))
/projects/python/web/pylons/mydevenv/lib/python2.6/site-packages/Pylons-1.0-py2.6.egg/pylons/templating.py, line 218:
return render_func()
/projects/python/web/pylons/mydevenv/lib/python2.6/site-packages/Pylons-1.0-py2.6.egg/pylons/templating.py, line 243:
cache_type=cache_type, cache_expire=cache_expire)
/projects/python/web/pylons/myapp_production/myapp/forms/__init__.py, line 18:
return render_mako('/forms/%s.mako' % name, extra_vars=kwargs)
/projects/python/web/pylons/mydevenv/lib/python2.6/site-packages/FormAlchemy-1.4.1-py2.6.egg/formalchemy/templates.py, line 67:
return self.render(template_name, **kw)
/projects/python/web/pylons/mydevenv/lib/python2.6/site-packages/FormAlchemy-1.4.1-py2.6.egg/formalchemy/forms.py, line 581:
return engine(template, fieldset=self, **kwargs)
/projects/python/web/pylons/myapp_production/myapp/templates/forms/restfieldset.mako, line 83:
${fs.render()|n}
/projects/python/web/pylons/mydevenv/lib/python2.6/site-packages/mako/runtime.py, line 711:
callable_(context, *args, **kwargs)
/projects/python/web/pylons/mydevenv/lib/python2.6/site-packages/mako/runtime.py, line 722:
result = template.error_handler(context, error)
/projects/python/web/pylons/mydevenv/lib/python2.6/site-packages/mako/runtime.py, line 713:
_render_error(template, context, e)
/projects/python/web/pylons/mydevenv/lib/python2.6/site-packages/mako/runtime.py, line 692:
_exec_template(inherit, lclcontext, args=args, kwargs=kwargs)
/projects/python/web/pylons/mydevenv/lib/python2.6/site-packages/mako/runtime.py, line 660:
**_kwargs_for_callable(callable_, data))
/projects/python/web/pylons/mydevenv/lib/python2.6/site-packages/mako/template.py, line 311:
as_unicode=True)
/projects/python/web/pylons/mydevenv/lib/python2.6/site-packages/Pylons-1.0-py2.6.egg/pylons/templating.py, line 240:
return literal(template.render_unicode(**globs))
/projects/python/web/pylons/mydevenv/lib/python2.6/site-packages/Pylons-1.0-py2.6.egg/pylons/templating.py, line 218:
return render_func()
/projects/python/web/pylons/mydevenv/lib/python2.6/site-packages/Pylons-1.0-py2.6.egg/pylons/templating.py, line 243:
cache_type=cache_type, cache_expire=cache_expire)
/projects/python/web/pylons/mydevenv/lib/python2.6/site-packages/FormAlchemy-1.4.1-py2.6.egg/formalchemy/ext/pylons/controller.py, line 122:
return render(self.template, extra_vars=kwargs)
/projects/python/web/pylons/mydevenv/lib/python2.6/site-packages/FormAlchemy-1.4.1-py2.6.egg/formalchemy/ext/pylons/controller.py, line 345:
return self.render(format=format, fs=fs, action='new', id=None)
/projects/python/web/pylons/mydevenv/lib/python2.6/site-packages/Pylons-1.0-py2.6.egg/pylons/controllers/core.py, line 57:
return func(**args)
/projects/python/web/pylons/mydevenv/lib/python2.6/site-packages/Pylons-1.0-py2.6.egg/pylons/controllers/core.py, line 105:
result = self._perform_call(func, args)
/projects/python/web/pylons/mydevenv/lib/python2.6/site-packages/Pylons-1.0-py2.6.egg/pylons/controllers/core.py, line 162:
response = self._inspect_call(func)
/projects/python/web/pylons/mydevenv/lib/python2.6/site-packages/Pylons-1.0-py2.6.egg/pylons/controllers/core.py, line 211:
response = self._dispatch_call()
/projects/python/web/pylons/myapp_production/myapp/lib/base.py, line 26:
return WSGIController.__call__(self, environ, start_response)
/projects/python/web/pylons/mydevenv/lib/python2.6/site-packages/Pylons-1.0-py2.6.egg/pylons/wsgiapp.py, line 312:
return controller(environ, start_response)
/projects/python/web/pylons/mydevenv/lib/python2.6/site-packages/Pylons-1.0-py2.6.egg/pylons/wsgiapp.py, line 107:
response = self.dispatch(controller, environ, start_response)
/projects/python/web/pylons/mydevenv/lib/python2.6/site-packages/Routes-1.12.3-py2.6.egg/routes/middleware.py, line 131:
response = self.app(environ, start_response)
/projects/python/web/pylons/mydevenv/lib/python2.6/site-packages/Beaker-1.5.4-py2.6.egg/beaker/middleware.py, line 152:
return self.wrap_app(environ, session_start_response)
/projects/python/web/pylons/mydevenv/lib/python2.6/site-packages/Beaker-1.5.4-py2.6.egg/beaker/middleware.py, line 73:
return self.app(environ, start_response)
/projects/python/web/pylons/mydevenv/lib/python2.6/site-packages/repoze/who/middleware.py, line 107:
app_iter = app(environ, wrapper.wrap_start_response)
/projects/python/web/pylons/mydevenv/lib/python2.6/site-packages/WebError-0.10.3-py2.6.egg/weberror/evalexception.py, line 431:
app_iter = self.application(environ, detect_start_response)

What version of the product are you using? On what operating system?
fomalchemy: 1.4.1
sqlalchemy: 0.6.8

Please provide any additional information below.
Need to use postgres field CIDR, INET and MACADDR. How to avoid validation?