need guidance for Pyramid, Jinja2, deform combination

418 views
Skip to first unread message

kk

unread,
Nov 13, 2015, 7:40:33 AM11/13/15
to pylons-discuss
I guess I said all in my subject line.
I would love if I can have templates in jinja2 and use deform library
together with Pyramid.
Basically I use Eclipse for my programming and I have found out a way to
use Jinja2 (actually the django templating syntax is almost 99% similar ).
I liked deform because it does have support for bootstrap or jquery as I
understand.
So would love to combine this with Pyramid.
Any experience, any pointers or tips?
Happy hacking.
Krishnakant.


Jeff Dairiki

unread,
Nov 20, 2015, 6:52:23 PM11/20/15
to pylons-...@googlegroups.com, kk
On Fri, Nov 13, 2015 at 4:40 AM, kk <krm...@gmail.com> wrote:
I guess I said all in my subject line.
I would love if I can have templates in jinja2 and use deform library together with Pyramid.

I do this. It "just works."  The stock templates which come with deform are Chameleon, not Jinja2, but it doesn't matter.  Deform, using its chameleon templates, produces HTML markup for the form.  This can be interpolated into a Jinja2 template without issue.
 

Krishnakant Mane

unread,
Nov 22, 2015, 3:46:59 AM11/22/15
to Jeff Dairiki, pylons-...@googlegroups.com
Thanks Jeff,
Can you give me an example of how you do this?
Happy hacking.
Krishnakant.

Laurent DAVERIO

unread,
Nov 22, 2015, 5:52:36 AM11/22/15
to pylons-...@googlegroups.com
Hi Krishnakant,

as Jeff pointed out, there's nothing special to do, it just works. Just
include the rendered form in your Jinja2 template.

Laurent.

Tres Seaver

unread,
Nov 22, 2015, 5:34:50 PM11/22/15
to pylons-...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 11/22/2015 03:46 AM, Krishnakant Mane wrote:
> Thanks Jeff, Can you give me an example of how you do this?

http://stackoverflow.com/questions/3206344/passing-html-to-template-using-flask-jinja2


Tres.
- --
===================================================================
Tres Seaver +1 540-429-0999 tse...@palladion.com
Palladion Software "Excellence by Design" http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBAgAGBQJWUkLlAAoJEPKpaDSJE9HYBocP/2C+qW2dfnARj1W1ueCqqR16
WII0n+KsW2PHgIQ8/lncprz5V/ny7GfcJ4iVRbVVLBNAjlA93SuYIMW0vW6xPPs8
uDWtUOkFnzTnwduBNQ+ZV85XZ5IXXnxiQze23BSKKBI6Hc+/EWY4J0ySO+qo3ErP
GEe+IpjUArSU1aRGBcvsRuSFpeeIFVL8YzDB1saSFtBvwO8T6OXy5jfseICwmlnU
YKmnIP2ZSiPRApVMwegNU88Ij9W60Dt2TC8ktRV4dBHiW0LbMTI0Ks4YDEqWhjsA
kYQ8sUg/gU24WgCWPumP/4p0ng/fV6uNNba8P2ToFeZ079sxcl4KNwm49ZgIdj7v
EZJAzD5oJgc71nK7vUR341sISCLn3b1CoQQcJOVe0k/AAODRBvqLWY8ojoeZHr69
f1hQbOO0hj4ZsdV2Je9Jra6JHcOdbzW347FoE3l9lJ2TTI4MIJd52zbn1glicM3v
x/YtjCOOL6zM5qYhsKrm8dckDaiEvB4NDjGYxzZrZp9AUqVYOWle4ebeuZqh6BI0
ogNnCB29d1M3zWbxWdIfCnG/1pOCiDWyrk5o0LAr6faxz78s8vqCNt267N9lQHbk
LvpLXJLFrpCOMv0KJF1+C7pnkDgw++o17xXGW2PE9IfZs+ZuJIy7yR+JFrsEtMkr
xk+zdDt7EABJPG8mVEmP
=5/To
-----END PGP SIGNATURE-----

j.marc...@gmail.com

unread,
Jun 19, 2017, 6:01:13 PM6/19/17
to pylons-discuss, tse...@palladion.com
When you say "it just works", do you mean create a variable containing the rendered form and insert it into the jinja template?

Mikko Ohtamaa

unread,
Jun 19, 2017, 6:04:35 PM6/19/17
to pylons-...@googlegroups.com, tse...@palladion.com

--
You received this message because you are subscribed to the Google Groups "pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscribe@googlegroups.com.
To post to this group, send email to pylons-discuss@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pylons-discuss/17dac5bd-e08c-40cf-bd16-c599377b33ca%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

j.marc...@gmail.com

unread,
Jun 19, 2017, 7:33:11 PM6/19/17
to pylons-discuss, tse...@palladion.com
Thanks a lot for the clarification.  the statement rendered_form = form.render() from the docs example is pretty self explanatory and answers my questions
To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discus...@googlegroups.com.
To post to this group, send email to pylons-...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages