kotti / deform_bootstrap Goto Github PK
View Code? Open in Web Editor NEWBootstrap compatible templates for the deform form library. (Merged into deform 2.)
Home Page: http://pypi.python.org/pypi/deform_bootstrap
Bootstrap compatible templates for the deform form library. (Merged into deform 2.)
Home Page: http://pypi.python.org/pypi/deform_bootstrap
bootstrap iconglyphs are not included in the deforms version of bootstrap
Also, because bootstrap.css and .js is not in their respective .js and .css folders dropping the folder in does not help.
deform_bootstrap.css:1782: background-image: url("../img/glyphicons-halflings.png");
deform_bootstrap.css:1793: background-image: url("../img/glyphicons-halflings-white.png");
Solution 1:
Adjust image paths in deform_bootstrap.css
Solution 2:
Possible solution included moving bootstrap css/js into proper subfolders, and using symlinks to keep backward compatability
As bootstrap3 was released long back, i think it will be good if this project is updated to bs3.
Any plans to support Bootstrap 3?
Hi would be nice if we can configure a placeholder for the widgets
widget=TypeaheadInputWidget(
size=60,
min_length=3,
placeholder="Agent",
values='/agents/list.json'),
description='Provide the AgentID or Agent Name')
In the radio choice template, the loop is done on field.widget.values while a normalized version of those values are passed to the template.
Love this project. Lots of goodness added to Bootstrap 2.2. Any plans for upgrading?
It looks like set_*_resources expects each resource as a new positional argument. To fix, change all the .resources.default_resources to sequences and use * as below.
http://deform.readthedocs.org/en/latest/api.html#deform.widget.ResourceRegistry.set_css_resources
deform_bootstrap.init:
def add_resources_to_registry():
"""
Register deform_bootstrap widget specific requirements to deform's
default resource registry
"""
registry = Form.default_resource_registry
for rqrt, versions in default_resources.items():
for version, resources in versions.items():
registry.set_js_resources(rqrt, version, *resources.get('js'))
registry.set_css_resources(rqrt, version, *resources.get('css'))
hi guys,
great afford for such beautiful app. Recently i have come across to this error
404 Not Found !! The resource could not be found. /img/glyphicons-halflings.png
What i found is that there no resource included in deform_boostrap package so i resolved my including these img files manually by placing this glyphicons-halflings.png & glyphicons-halflings-white.png files into static dir of deform_boostap and changed the path in deform_bootstrap.css.
So it will be great if you guys fix this so that everyone will not face the same problem.
At PyCon, we are looking into merging deform_bootstrap into deform and releasing it as deform 2. Would you be OK, with that?
The following error happens when running a form in production environement which includes deform_bootstrap. This login form and all other forms work fine on my development machine with deform_bootstrap.
I tried using development form.pt from development partition and tried commenting out things in form.pt I do not understand enough to figure out. Thanks for any help,
Clemens Herschel
[cherschel@web39 phr]$ more pyramid.log
Starting server in PID 28077.
serving on http://0.0.0.0:42467
2014-02-25 21:50:20,863 ERROR [waitress][Dummy-1] Exception when serving /login
Traceback (most recent call last):
File "/home/cherschel/webapps/phr/lib/python2.7/waitress/channel.py", line 329
, in service
task.service()
File "/home/cherschel/webapps/phr/lib/python2.7/waitress/task.py", line 173, i
n service
self.execute()
File "/home/cherschel/webapps/phr/lib/python2.7/waitress/task.py", line 380, i
n execute
app_iter = self.channel.server.application(env, start_response)
File "/home/cherschel/webapps/phr/lib/python2.7/pyramid/router.py", line 187,
in call
response = self.handle_request(request)
File "/home/cherschel/webapps/phr/lib/python2.7/pyramid/tweens.py", line 20, i
n excview_tween
response = handler(request)
File "/home/cherschel/webapps/phr/lib/python2.7/site-packages/pyramid_tm-0.4-p
y2.7.egg/pyramid_tm/init.py", line 95, in tm_tween
response = handler(request)
File "/home/cherschel/webapps/phr/lib/python2.7/pyramid/router.py", line 164,
in handle_request
response = view_callable(context, request)
File "/home/cherschel/webapps/phr/lib/python2.7/pyramid/config/views.py", line
333, in rendered_view
result = view(context, request)
File "/home/cherschel/webapps/phr/lib/python2.7/pyramid/config/views.py", line
471, in _requestonly_view
response = view(request)
File "/home/cherschel/webapps/phr/Phr-0.0/phr/views/login.py", line 97, in log
in_view
return {'form':login_form.render(),"heading": 'Login'}
File "/home/cherschel/lib/python2.7/deform/field.py", line 433, in render
return self.serialize(cstruct, readonly=readonly)
File "/home/cherschel/lib/python2.7/deform/field.py", line 408, in serialize
return self.widget.serialize(self, cstruct=cstruct, readonly=readonly)
File "/home/cherschel/lib/python2.7/deform/widget.py", line 982, in serialize
null=null)
File "/home/cherschel/lib/python2.7/deform/template.py", line 117, in call
return self.load(template_name)(**kw)
File "/home/cherschel/lib/python2.7/chameleon/template.py", line 125, in cal
l
return self.render(**kwargs)
File "/home/cherschel/lib/python2.7/chameleon/zpt/template.py", line 257, in r
ender
return super(PageTemplate, self).render(*vars)
File "/home/cherschel/lib/python2.7/chameleon/template.py", line 169, in rende
r
self.cook_check()
File "/home/cherschel/lib/python2.7/chameleon/template.py", line 293, in cook
check
self.cook(body)
File "/home/cherschel/lib/python2.7/chameleon/template.py", line 147, in cook
program = self._cook(body, digest, names)
File "/home/cherschel/lib/python2.7/chameleon/template.py", line 218, in _cook
source = self.make(body, builtins)
File "/home/cherschel/lib/python2.7/chameleon/template.py", line 249, in make
program = self.parse(body)
File "/home/cherschel/lib/python2.7/chameleon/zpt/template.py", line 202, in p
arse
trim_attribute_space=self.trim_attribute_space,
File "/home/cherschel/lib/python2.7/chameleon/zpt/program.py", line 145, in __
init
super(MacroProgram, self).init(_args, **kwargs)
File "/home/cherschel/lib/python2.7/chameleon/program.py", line 31, in _init
_
for kind, args in parser:
File "/home/cherschel/lib/python2.7/chameleon/parser.py", line 182, in _iter
_
item = self.parse(token)
File "/home/cherschel/lib/python2.7/chameleon/parser.py", line 190, in parse
return visitor(kind, token)
File "/home/cherschel/lib/python2.7/chameleon/parser.py", line 231, in visit_e
nd_tag
raise ParseError("Unexpected end tag.", token)
ParseError: Unexpected end tag.
vmware partition-development
Ubuntu
python 2.7
pyramid 1.4
deform_bootstrap .2.1
deform .9.5
Mako .5
webfaction production
centos
python 2.75
pyramid 1.3
Mako .7
deform_bootstrap .2.1
There could be some bootstrap modifications made to the readonly templates. For example the readonly textinput could look like this:
<span id="${field.oid}" class="uneditable-input">${cstruct}</span>
Are you open to a pull request related to this? What are other people's thoughts on doing this?
I installed demo. It's not bootstraped.
There is no demo for chosen multiple select widget
http://deformdemo.repoze.org/sequence_of_sequences/
Adding another item won't work.
It would be convenient (for me, at least) to have some of the recent features (Chosen, bootstrap-datepicker.css) in PyPI.
It is not a pressing issue, but here is one vote for a release.
In the mapping.pt template :
<div tal:condition="field.description">
${field.description}
is missing the clausing div.
Example of consequence :
If I introduce the mappingSchema in a sequenceSchema, the appendsequence button is not working.
When some parent (or ancestor) has "row-fluid" class, the Date Parts widget gets its width messed up.
Changing from row to row-fluid in dateparts.pt worked, but only partially.
The following
https://github.com/Kotti/deform_bootstrap/commit/45de9ca8738aabb7314cbfe8ef7f53668edeb0ff
introduced requirements on deform_bootstrap widgets causing the following error
File "/.../lib/python2.7/site-packages/deform-0.9.5-py2.7.egg/deform/widget.py", line 1549, in __call__
'Cannot resolve widget requirement %r' % requirement)
ValueError: Cannot resolve widget requirement 'chosen'
The requirements should be registered in the default_resource_registry.
Is there a specific reason for including bootstrap.min.css instead of depending on the fanstatic based js.bootstrap package (http://pypi.python.org/pypi/js.bootstrap/1.4)?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.