pyramid/style-guide b99ada6 Steve Piercy: restore Typographical Conventions, an edited and condensed version of the Style Guide
pyramid/style-guide fa84255 Steve Piercy: fix warning about duplicate name
pyramid/style-guide 351a741 Steve Piercy: Merge pull request #2843 from stevepiercy/style-guide...
github has left the channel
NotreDev
there’s a new celery, but i’m going to consider using an alternative scheduling queue because the overhead of celery has always been a pita. anyone have thoughts on apscheduler?
Adniel joined the channel
travis-ci joined the channel
travis-ci
Pylons/pyramid#4462 (style-guide - 351a741 : Steve Piercy): The build passed.
how would you configure a view which should render a Chameleon template, but the template depends of the X-Template header?
would you use a wrapper ? a decorator ? a view predicate ?
or even a custom renderer ?
hvelarde is now known as hvelarde|busy
I'd like to do the following logic: if request content-type is "application/json" then use the json rendered, else if requested content-type is "text/html" then if there is a x-template header then render this template else template:context.entity.content_type.name and render the $template/show.pt template :)
Method__ has quit
c0le has quit
rweir
are you sure you don't want a different set of urls for the json stuff
ronnix joined the channel
Ergo joined the channel
mage_
rweir: no, I plan to use this with a REST interface
ok but are you sure you don't want a different set of urls for the json stuff?
mage_
this idea is to use inheritance with SQLAlchemy (one resource per entity), and use some "defaults"
rweir
rest has anothing to do with that, nor pyramid, it's just about sanity
mage_
like /foo.html and /foo.json ?
rweir
literally anything that makes it clear one is an api
mage_
maybe I could, but I'd like to support /foo too with the accept header
rweir
that would be odd
mage_
why? :)
rweir
e.g. making it annoying to guess what a url does and making curl tedious to use is probably worth avoiding
blaflamme joined the channel
mage_
in my point of view it's "cleaner" to always access the same resource "foo" through /resource/foo and choose the response format based on the preference in the accept header
but I may be wrong
Ergo
any recommendations for modern wsiwyg editors? quill, prosemirror, trix?
mage_
TinyMCE ?
Ergo
mage_: bad licenses
that stuff requires commercial licenses
blaflamme
Ergo you just named 3 I'm not aware of... :P
Ergo
i know about ckeditor etc. but im looking into something that works with a graph instead some sphagetti dom stuff
blaflamme: im doing some research and it turns out that world has changed a lot since last time i needed something like that
mage_: my decision was driven by #usetheplatform - i try to use what is implemented inside browsers themselves :-)
Method__ joined the channel
besides only pure webcomponent solutions are interoperable with legacy codebases
that has a value too
we manipulated webcomponents with jquery
mage_
blaflamme: honnestly I'm a bit tired to learn a new js framework every year :(
Ergo
mage_: thats why its best to use something that lives in browsers - you learn browser APIS
they dont go away/change often
you learned css and html once
same here
blaflamme
mage_ problem is even if you choose one, within a year you have to learn new stuff inside it
Ergo
its just DOM model
Rotonen
in-browser DBs are a fine example for the context
mage_
in "the past" I used to just return html from my backend with and use addEventListener based on data- attributes
Ergo
mage_: you can still do that :-)
no one forces you to adopt new tech
mage_
of course :)
dowwie
as someone who hasn't hung himself yet with frontend development, vue.js seems more intuitive than react.. more, pythonic?
mage_
in fact I'm in the process of converting our main cherrypy app to pyramid, and I wanted to use React too
dowwie
react has really established the most critical mass / community around itself .. and frontend developers are fatigued by the constant change in landscape so maybe react will be around for a while
mage_
anyway, web components are the futur I guess, and polymer looks interresting on this side
dowwie
but if the Alibabas of China are organizing around vue.js , they may quickly develop its ecosystem