pyramid_formalchemy's Introduction
FormAlchemy eliminates boilerplate by autogenerating HTML input fields from a given model. FormAlchemy will try to figure out what kind of HTML code should be returned by introspecting the model's properties and generate ready-to-use HTML code that will fit the developer's application. Of course, FormAlchemy can't figure out everything, i.e, the developer might want to display only a few columns from the given model. Thus, FormAlchemy is also highly customizable. Please visit the FormAlchemy's homepage for documentation and more information: http://docs.formalchemy.org/ You can subscribe to FormAlchemy's mailing list: http://groups.google.com/group/formalchemy
pyramid_formalchemy's People
Forkers
mcdonc amleczko camptocamp disko aodag mmariani tonthon wassname makinacorpus tahajahangir laarmen alex-python brandonjschwartz timgates42pyramid_formalchemy's Issues
ImportError: cannot import name exceptions
Using SQLAlchemy==0.8.0b2 with pyramid-formalchemy==0.4.3 , I get the following error:
File "/.../lib/python2.7/site-packages/pyramid_formalchemy/resources.py", line 4, in <module>
from sqlalchemy import exceptions as sqlalchemy_exceptions
ImportError: cannot import name exceptions
The exception module has been moved to sqlalchemy.exc, so the following
from sqlalchemy import exc as sqlalchemy_exceptions
makes it work
Custom Form is not instanciated.
I declare custom form UserAdd
for User
class.
But, I got below error.
File "C:\Users\aodag\Documents\works\rebecca\lib\site-packages\pyramid_formalchemy\views.py", line 251, in get_fieldset
fs = id and fs.bind(model) or fs.copy()
TypeError: unbound method copy() must be called with UserAdd instance as first argument (got nothing instead)
maybe fs
is UserAdd
class. I expect fs
is UserAdd
instance.
Distribution package don't contain "pyramid_formalchemy/paster_templates" folder :(
This distribution package don't contain "pyramid_formalchemy/paster_templates" folder :(
http://pypi.python.org/packages/source/p/pyramid_formalchemy/pyramid_formalchemy-0.4.tar.gz
Regards,
Stephane
I cannot delete this
accidentally added this while moving my computer.
pyramid autocomplete renderer - where has it gone?
Hi,
The changelogs indicate that the pyramid autocomplete renderer was moved out of pyramid_formalchemy at some point - but its not clear where it has gone to? I can't find it in fa.jquery or anywhere else i've looked?
Thanks,
Damian
release pyramid_formalchemy 0.4.2 on pypi
fa.bootstrap 0.2.1 depends on > 0.4.2 pyramid_formalchemy
AttributeError: 'module' object has no attribute 'FieldSet'
Accordingly docs for run pyramid_formalchemy needs to add an empty forms.py module at the root of your project. But in this case get an error "AttributeError: 'module' object has no attribute 'FieldSet'. Workaround: add "from formalchemy import FieldSet, Grid" to this file.
/admin panel jquery issues - documentation change
There is incorrect documentation at http://docs.formalchemy.org/pyramid_formalchemy/.
If you are experiencing issues were the admin panel is missing css, js and jquery, make the following changes...
For the part of "Itβs better to enable the jquery features like this:"
In the documentation they state...
config.include('pyramid_formalchemy')
config.include('fa.jquery')
Make sure to do this...
config.include('pyramid_formalchemy')
config.include('pyramid_fanstatic')
config.include('fa.jquery')
`resources.Base.get_instance` returns an `i18n.I18NModel`.
Hi,
I get the following error trying to view a model I've created through fa.bootstrap's pyramid_formalchemy UI. request.model_class
is an i18n.I18NModel
instance, which causes get_instance
to bork, as it should be trying to query the i18n.I18NModel
instance's context
.
Thanks,
James.
Traceback (most recent call last):
File "/Users/thruflo/Development/sandbox/fa/lib/python2.6/site-packages/pyramid_debugtoolbar-0.9.8-py2.6.egg/pyramid_debugtoolbar/toolbar.py", line 115, in toolbar_tween
response = _handler(request)
File "/Users/thruflo/Development/sandbox/fa/lib/python2.6/site-packages/pyramid_debugtoolbar-0.9.8-py2.6.egg/pyramid_debugtoolbar/panels/performance.py", line 55, in resource_timer_handler
result = handler(request)
File "/Users/thruflo/Development/sandbox/fa/lib/python2.6/site-packages/pyramid-1.3a6-py2.6.egg/pyramid/tweens.py", line 20, in excview_tween
response = handler(request)
File "/Users/thruflo/Development/sandbox/fa/lib/python2.6/site-packages/pyramid_tm-0.3-py2.6.egg/pyramid_tm/__init__.py", line 61, in tm_tween
response = handler(request)
File "/Users/thruflo/Development/sandbox/fa/lib/python2.6/site-packages/pyramid-1.3a6-py2.6.egg/pyramid/router.py", line 164, in handle_request
response = view_callable(context, request)
File "/Users/thruflo/Development/sandbox/fa/lib/python2.6/site-packages/pyramid-1.3a6-py2.6.egg/pyramid/config/views.py", line 564, in __call__
return view(context, request)
File "/Users/thruflo/Development/sandbox/fa/lib/python2.6/site-packages/pyramid-1.3a6-py2.6.egg/pyramid/config/views.py", line 290, in attr_view
return view(context, request)
File "/Users/thruflo/Development/sandbox/fa/lib/python2.6/site-packages/pyramid-1.3a6-py2.6.egg/pyramid/config/views.py", line 263, in predicate_wrapper
return view(context, request)
File "/Users/thruflo/Development/sandbox/fa/lib/python2.6/site-packages/pyramid-1.3a6-py2.6.egg/pyramid/config/views.py", line 316, in rendered_view
result = view(context, request)
File "/Users/thruflo/Development/sandbox/fa/lib/python2.6/site-packages/pyramid-1.3a6-py2.6.egg/pyramid/config/views.py", line 416, in _class_view
response = getattr(inst, attr)()
File "/Users/thruflo/Development/sandbox/fa/lib/python2.6/site-packages/pyramid_formalchemy-0.4.3-py2.6.egg/pyramid_formalchemy/actions.py", line 77, in wrapped
return func(self, *args, **kwargs)
File "/Users/thruflo/Development/sandbox/fa/lib/python2.6/site-packages/pyramid_formalchemy-0.4.3-py2.6.egg/pyramid_formalchemy/views.py", line 348, in show
return self.render(fs=fs, id=id)
File "/Users/thruflo/Development/sandbox/bootstrap/bootstrap/forms.py", line 19, in render
result = super(ModelView, self).render(**kwargs)
File "/Users/thruflo/Development/sandbox/fa/lib/python2.6/site-packages/pyramid_formalchemy-0.4.3-py2.6.egg/pyramid_formalchemy/views.py", line 175, in render
breadcrumb=self.breadcrumb(**kwargs),
File "/Users/thruflo/Development/sandbox/fa/lib/python2.6/site-packages/pyramid_formalchemy-0.4.3-py2.6.egg/pyramid_formalchemy/views.py", line 146, in breadcrumb
items.append((request.fa_url(model_name, id), u'%s' % self.context.get_instance(), 'instance_url'))
File "/Users/thruflo/Development/sandbox/fa/lib/python2.6/site-packages/pyramid_formalchemy-0.4.3-py2.6.egg/pyramid_formalchemy/resources.py", line 76, in get_instance
return session.query(model).get(self.request.model_id)
File "build/bdist.macosx-10.6-universal/egg/sqlalchemy/orm/session.py", line 979, in query
return self._query_cls(entities, self, **kwargs)
File "build/bdist.macosx-10.6-universal/egg/sqlalchemy/orm/query.py", line 107, in __init__
self._set_entities(entities)
File "build/bdist.macosx-10.6-universal/egg/sqlalchemy/orm/query.py", line 114, in _set_entities
entity_wrapper(self, ent)
File "build/bdist.macosx-10.6-universal/egg/sqlalchemy/orm/query.py", line 3117, in __init__
"expected - got '%r'" % (column, )
InvalidRequestError: SQL expression, column, or mapped entity expected - got '<pyramid_formalchemy.i18n.I18NModel object at 0x1044292d0>'
Creating a fresh project requires chameleon
Following the tutorial:
$ pip install pyramid_formalchemy pyramid_fanstatic fa.jquery
$ pcreate -s alchemy -s pyramid_fa myapp
Warning: could not load entry point pyramid_fa (ImportError: No module named chameleon.zpt.template)
Unavailable scaffolds: ['pyramid_fa']
Templates broken with pa.jquery
Using pa.jquery on an otherwise working site results in:
/eggs/Chameleon-2.14-py2.7.egg/chameleon/py26.py", line 13, in lookup_attr
return get(key)
TypeError: list indices must be integers, not str
- Expression: "breadcrumb.render(request)"
- Filename: ... uery-0.9.5-py2.7.egg/fa/jquery/templates/admin/master.pt
- Location: (line 37: col 77)
- Source: ... :content="structure breadcrumb.render(request)" />
^^^^^^^^^^^^^^^^^^^^^^^^^^ - Arguments: fs: <FieldSet - at 0x109ac2e90>
model_plural: Milestone
actions: {...} (1)
model_label: Milestone
breadcrumb: <list - at 0x10aad34d0>
repeat: {...} (0)
renderer_name: pyramid_formalchemy:templates/admin/edit.pt
F_: <function translate at 0x10983eb18>
id: 1
req: <Request - at 0x109abc090>
renderer_info: <RendererHelper - at 0x109a249d0>
request: <Request - at 0x109abc090>
context: <MilestoneCustomModel_admin_edit_GET 1 at 0x109abcb10>
model_class: <I18NModel Milestone at 0x109ac25d0>
main: <PyramidPageTemplateFile - at 0x10aad2490>
model_name: Milestone
view: <ModelView - at 0x109ac2c50>
By removing:
config.include('fa.jquery')
The site works fine using the default old skin.
remove zope.component dependencie
pyramid not longer depend on zope.component but pyramid_formalchemy do. We may try to avoid this dependencie
Problem with latest version of fanstatic
Following documented install procedure gives this error:
[...]lib/python2.7/site-packages/pyramid_fanstatic/__init__.py", line 63, in __call__
result = needed.render_topbottom_into_html(response.body)
AttributeError: 'NeededResources' object has no attribute 'render_topbottom_into_html'
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.