#pyramid

/

      • davisagli has quit
      • github joined the channel
      • github
        [pyramid] stevepiercy pushed 3 new commits to style-guide: https://git.io/v1qU8
      • 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.
      • travis-ci has left the channel
      • nilo has quit
      • disko joined the channel
      • davisagli joined the channel
      • nilo joined the channel
      • tibi has quit
      • mr_jolly joined the channel
      • tibi joined the channel
      • Charlie_X joined the channel
      • yleclanche joined the channel
      • bochecha joined the channel
      • agitator|hpeter joined the channel
      • mr_jolly has quit
      • davisagli has quit
      • ronnix joined the channel
      • waigani joined the channel
      • waigani has quit
      • rodfersou joined the channel
      • waigani joined the channel
      • teix joined the channel
      • RchrdB joined the channel
      • slav0nic joined the channel
      • uralbash joined the channel
      • uralbash has left the channel
      • evilbungle joined the channel
      • rickmak_ joined the channel
      • pcdummy joined the channel
      • pcdummy joined the channel
      • hvelarde|busy joined the channel
      • nilo has quit
      • rodfersou is now known as rodfersou|afk
      • nilo joined the channel
      • hvelarde|busy is now known as hvelarde
      • ronnix_ joined the channel
      • jhauser joined the channel
      • ronnix joined the channel
      • rodfersou|afk is now known as rodfersou
      • ljosberinn joined the channel
      • mage_
        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
      • rweir
        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
      • looks interesting
      • blaflamme
        same for me, last time I used ckeditor
      • and the one in kendoui (commercial)
      • Ergo
        ckeditor requires commecial licenses
      • at least for anything saas
      • blaflamme
        at first quill looks cool
      • mage_
        is there a built-in "file-like" browser ?
      • Ergo
        blaflamme: prosemirror is interesting - it can output markdown if needed
      • mage_: all of those solutions require you to extend them afaik
      • but they seem powerful
      • like you can put in custom blocks like tweets or whatever
      • blaflamme
        last I've came across is draft https://facebook.github.io/draft-js/
      • but a react thing
      • Ergo
        blaflamme: yeah that looks good but react only
      • i think it also operates same way as the others mentioned above
      • blaflamme
        at first quill seems interesting
      • chrismay joined the channel
      • mage_
        choosing a WYSIWYG editor is almost as hard as choosing a react ui library nowadays :(
      • blaflamme
        yeah... react is slowly becoming a mess...
      • Ergo
        mage_: i decided on polymer instead
      • its awesome
      • blaflamme
        mage_ js.coach is a good place to find some good stuff
      • Ergo
        YT is getting rewritten in it
      • vue.js also looks interesting
      • blaflamme
        I'm now looking at aurelia
      • mage_
        yep vue.js looks good
      • thanks for the js.coach link
      • Ergo
        mage_: ive migrated some parts of rhodecode to polymer
      • we've been very happy with the results
      • mage_: https://www.polymer-project.org/1.0/ - worth looking at
      • mage_
        it's difficult to choose one
      • blaflamme
        use multiple
      • Ergo
        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
      • mage_
        does polymer works on Internet Explorer ?
      • blaflamme
        probably with polyfills
      • evilbungle has quit
      • Ergo
        mage_: yes - even with IE9 (on some stuff we tested)
      • but it can break any moment - normally ie10+ is supported
      • chrismay
        I can also vouch for vue.js. It's learning curve is lower than the other frameworks. Seems to have a passionate following.
      • Ergo
        mage_: btw - parts of chrome - the browser are built in polymer
      • download page, settings, dev tools
      • mage_
        what are the reasons to *not* choose polymer?
      • Ergo
        mage_: less hype ;-) polyfills
      • chrismay
        That makes sense, Chrome is eating Goggle's food, since polymer is a Google framework