Discussion:
[TurboGears] How to add support for deform/colander in TG2
jeetu
2017-12-12 09:41:04 UTC
Permalink
Hi,
I was playing around deform and colander. I could not get to working them
in TG2. Basically i got stuck at the step of how to inject deform
static_files in TG2. This should be somewhat similar to what TG2 already
does with Toscawidget. What should be the equivalent of pyramid's config.
add_static_view('static', 'deform:static') in TG. Can somebody help in
setting up deform with TG2.

Ref:
https://docs.pylonsproject.org/projects/deform/en/latest/basics.html#serving-up-the-rendered-form
--
You received this message because you are subscribed to the Google Groups "TurboGears" group.
To unsubscribe from this group and stop receiving emails from it, send an email to turbogears+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/turbogears.
For more options, visit https://groups.google.com/d/optout.
Mengu
2018-04-18 13:37:40 UTC
Permalink
what the add_static_view function does there is that whenever a request
comes in with a /static/ path, it will try to serve those static assets
from deform package's static folder.

what you can do is you can set turbogears to serve static files and move
the deform assets to your static directory. that'd be the easy way.
toscawidgets registers itself to the middleware directly serving its own
assets.
Post by jeetu
Hi,
I was playing around deform and colander. I could not get to working them
in TG2. Basically i got stuck at the step of how to inject deform
static_files in TG2. This should be somewhat similar to what TG2 already
does with Toscawidget. What should be the equivalent of pyramid's config.
add_static_view('static', 'deform:static') in TG. Can somebody help in
setting up deform with TG2.
https://docs.pylonsproject.org/projects/deform/en/latest/basics.html#serving-up-the-rendered-form
--
You received this message because you are subscribed to the Google Groups "TurboGears" group.
To unsubscribe from this group and stop receiving emails from it, send an email to turbogears+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/turbogears.
For more options, visit https://groups.google.com/d/optout.
Alessandro Molina
2018-04-19 13:25:52 UTC
Permalink
You can just mount a `DirectoryApp` that points to the static directory of
the python package.
That's what tgext.pluggable does to serve assets from pluggable
applications:
https://github.com/TurboGears/tgext.pluggable/blob/master/tgext/pluggable/adapt_statics.py#L37-L41
Post by Mengu
what the add_static_view function does there is that whenever a request
comes in with a /static/ path, it will try to serve those static assets
from deform package's static folder.
what you can do is you can set turbogears to serve static files and move
the deform assets to your static directory. that'd be the easy way.
toscawidgets registers itself to the middleware directly serving its own
assets.
Post by jeetu
Hi,
I was playing around deform and colander. I could not get to working them
in TG2. Basically i got stuck at the step of how to inject deform
static_files in TG2. This should be somewhat similar to what TG2 already
does with Toscawidget. What should be the equivalent of pyramid's config.
add_static_view('static', 'deform:static') in TG. Can somebody help in
setting up deform with TG2.
Ref: https://docs.pylonsproject.org/projects/deform/en/latest/bas
ics.html#serving-up-the-rendered-form
--
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To unsubscribe from this group and stop receiving emails from it, send an
Visit this group at https://groups.google.com/group/turbogears.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "TurboGears" group.
To unsubscribe from this group and stop receiving emails from it, send an email to turbogears+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/turbogears.
For more options, visit https://groups.google.com/d/optout.
Loading...