hi guys, i have a pyramid application and i downloaded some bootstrap themes to incorporate into my app. for some reason the pictures/styles weren't rendering when i had them in my app/assets/img/1.jpg folder
themsay joined the channel
i am using pycharm IDE to run it... when i put them in my static folder it seemed to render better, but still not completely. I was wondering if someone here might be able to help me as to why... when i link the img src="/static/ it seems to work but when i do img src="/assets/" it doesnt seem to register that directory
Pumukel joined the channel
monchi_ has quit
Boobuigi joined the channel
Pumukel has quit
themsay has quit
themsay joined the channel
mejymejy joined the channel
ztane_ joined the channel
gxti_ joined the channel
santonel- joined the channel
ztane has quit
santonelli has quit
gxti has quit
bchhun has quit
bchhun joined the channel
Thorn has quit
Method joined the channel
breezy_ joined the channel
breezy_
hi, anyone here know if pycharm automatically looks to render images/js/css from the static/templates folder? I downloaded a bootstrap theme and it had an "assets" folder and it was just not rendering for me.
rickmak_ joined the channel
raydeo
breezy_: what do you mean the "assets" folder is not rendering for you
where did you put the folder? how are you serving it? what urls are you using?
breezy_
hi raydeo, well, i put the folder in my package under the pyramid app. I'm also using chameleon templates w/ cookiecutter
or are you assuming pyramid will just magically serve data that you put there
breezy_
i noticed in the __init__.py there was a config.add_static_view('static', 'static') function, and i was wondering if that had anything to do with how images/templates were viewed
raydeo
it's a pretty significant reason, yes ;-)
that call is mounting the "static" folder at the "/static" url prefix
normally you'd put bootstrap stuff into that folder as well
breezy_
but why then, when i have img src="/assets/img/1.jpg" it wouldnt render even though i was pointing directly to it?
Pumukel joined the channel
raydeo
do you have an add_static_view for the assets folder?
breezy_
raydeo, that's what i ended up doing and it worked,
no i didnt add_static_view for the assets folder... do i have to do that?
raydeo
I mean... yes
breezy_
would that also be important to render the CSS/JS?
raydeo
you mean the css/js in the assets folder?
breezy_
yes
raydeo
unless you add a static view for it, then pyramid is not serving it... you have to map the folder to a url
breezy_
ok got it, thanks raydeo
Pumukel has quit
Method has quit
rickmak_ joined the channel
Method joined the channel
rickmak_ joined the channel
mejymejy has quit
mejymejy joined the channel
mejymejy has quit
Pumukel joined the channel
rickmak_ joined the channel
Pumukel has quit
christophler
Hello #Pyrmid.
im looking to generate some complex forms. IS there a community standard tool for this?
x58
You can take a look at deform
that can generate forms from colander schema's
christophler
thank you :)
sohailkhandev joined the channel
plone used to have support for generating highly complex interfaces from UML diagrams. What happened to that?
x58
Plone is still around, but you are asking the wrong people :-)
christophler
oh ... aye, fair enough :)
stevepiercy
breezy_ i suggest reading the docs about adding static assets
aye, I used to develop on plone in 2008... I never understood how the UML thing didnt catch on. Absolutely game changing... I think the deform will do nicely for what I Have in mind at the moment.
Thank you :)
munch_ joined the channel
davisagli has left the channel
Hi. Its not at all clear to me how Deform is integrated in Pyramid. I assume I need to add a directive to the project to include it. Is it the latest version?> Should I Just include it myself?
oh, I found it i think...
so I see that deform doesnt support conditional field display? This is done by custom javascript normally?
oh, its just occured to me, I can probabaly use a client side formengine instead
breezy_ the overview is a good launch point, giving you an example and links to further reading
christophler you need to add it to setup.py, run `pip install -e .`, and all the usual things to install and configure pyramid add-ons
there are several good examples in the wiki tutorial
and in the Quick Tutorial
Pumukel joined the channel
christophler
stevepiercy: thanks
Pumukel has quit
stevepiercy
christophler as far as conditional field display, do you mean something like a user clicks a radio button "Is Your Life Awful?" Yes/No, and if they select Yes, then display a textarea with the label "Describe How Awful Is Your Life"