#pyramid

/

      • gustavofonseca joined the channel
      • dstufft
        hmm
      • time to figure out the best way to integrate raven/sentry with Pyramid
      • gustavofonseca has quit
      • cguardia
        Ergo: almost have a cookiecutter ready with those options
      • _julian__ joined the channel
      • _julian_ has quit
      • joules joined the channel
      • RaFromBRC has quit
      • markm has quit
      • natim joined the channel
      • RaFromBRC joined the channel
      • plantian joined the channel
      • gustavofonseca joined the channel
      • gustavofonseca has quit
      • digitalsatori joined the channel
      • penna__ joined the channel
      • penna_ has quit
      • tamarin_ joined the channel
      • tamarin_ is now known as tamarin
      • inklesspen
        currently i have some views with a json renderer, in which i return model objects that have a __json__ method.
      • what's the sanest way of being able to have different renderings of the model objects depending on the view (like, a summary rendering and a detail rendering)?
      • since __json__ takes the request object, i could set some property on request saying i want the fooModel to render in summary mode or in detail mode, i suppose
      • but it seems like there should be a better way
      • uralbash has quit
      • uralbash joined the channel
      • uralbash has quit
      • uralbash joined the channel
      • uralbash has quit
      • plantian
        inklesspen: Not quite sure I understand the question but seems like one option would be to have a property on the object return another proxy object with the data you want, such as `return user.with_details()`. But I usually define a method such as to_dict/to_dicts that handles the serialization of models and takes an include param that determines what I want in the serialization. For example, Sale.to_dicts(sales, request, include=None) ... Sal
      • rickmak_ joined the channel
      • gustavofonseca joined the channel
      • rickmak joined the channel
      • rickmak_ joined the channel
      • gustavofonseca has quit
      • eatkin has quit
      • rickmak_ joined the channel
      • eatkin joined the channel
      • kusut joined the channel
      • Wu has quit
      • eatkin has quit
      • eatkin joined the channel
      • Wu joined the channel
      • frispete_ joined the channel
      • cyraxjoe joined the channel
      • gustavofonseca joined the channel
      • gustavofonseca has quit
      • cguardia has quit
      • afidegnum joined the channel
      • afidegnum
        hello, anyone online?
      • offby1
        nobody here but us zombie processes.
      • tamarin
        In defunct process land no one can hear you ctrl-G.
      • cguardia joined the channel
      • tamarin has quit
      • rickmak_ joined the channel
      • afidegnum
        in pyramid or application development, when do we use sqlalchemy and when do we use ZODB?
      • rickmak joined the channel
      • rickmak has quit
      • betabug
        whenever it's appropriate and we feel like it ;-)
      • Charlie_X
        afidegnum: that depends entirely on what you want to do.
      • phira
        afidegnum: typically you use sqlalchemy. You would seriously consider ZODB when you have a dataset that matches very strongly to objects - content management systems often meet this criteria, as they contain a diverse range of user-driven entities and templates that don't match well to a strong set of relations.
      • betabug
        tree-ish stuff works well with zodb, table-ish stuff works well with sql
      • Charlie_X
        The "tyranny of choice"
      • betabug
        let someone else choose it for you, and you can always blame them
      • phira grins
      • atomekk joined the channel
      • gustavofonseca joined the channel
      • gustavofonseca has quit
      • areski joined the channel
      • afidegnum
        ok
      • but what is the best to choose for large and complex database records with complex relations?
      • Charlie_X
        That question answers itself. Stick with the DB
      • afidegnum
        i m told db can handle that,
      • zodb I mean
      • Wu has quit
      • Wu joined the channel
      • Zart
        zodb doesn't deal with records
      • afidegnum
        can you please explain more of zodb utility ?
      • Charlie_X
        If you already have data in a relational DB, just use SQLa and stick with it.
      • Please ask specific questions related to something you want to do.
      • afidegnum
        I am building complex application which will interract a lot with the database as well such as saving and retrieving entires... the applicaiton will be social oriented,
      • that's why I want to find out about the appropriate database tool to use,
      • Charlie_X
        Then use a relational DB
      • Zart
        afidegnum, check http://zodborg.readthedocs.org/en/latest/docume... for basic info on zodb. pay attention to chapter about search
      • +1 to relational db for your case
      • possibly with some caching in mongo for speed
      • afidegnum has quit
      • tjt263 joined the channel
      • kissgyorgy joined the channel
      • tinker joined the channel
      • m8 joined the channel
      • markm joined the channel
      • maxvi joined the channel
      • maxvi
        hi everyone! have some question about pyramid. in setup.py we have requires - as I understood - it's require packages for my project doesn't matter production or development and in config file (development.ini) we have pyramid.includes - packages for environment only?
      • maxvi has quit
      • Ergo joined the channel
      • gustavofonseca joined the channel
      • cmk_zzz joined the channel
      • gustavofonseca has quit
      • dowwie joined the channel
      • dowwie joined the channel
      • Ergo
        I've tried hynek's structlog, its quite nice, even got it integrated with app enlights log tag support nicely :-)
      • hynek
        [This message was brought to you by Ziviec at PyCon PL]
      • markm joined the channel
      • Ergo
        ROTFL :P i can see that memory of cheap beer is strong in you my young padawan
      • hynek
        still conflicted about Free vs. Almost Free
      • jhauser joined the channel
      • areski joined the channel
      • cmk_zzz has quit
      • sakal joined the channel
      • TodPunk has quit
      • TodPunk joined the channel
      • _julian_ joined the channel
      • wwitzel3 has quit
      • wwitzel3 joined the channel
      • plamut_ has quit
      • Charlie_X
        Ergo: well go on then, tell us what structlog is.
      • Something is really wrong with my Terminal. Echo keeps disabling.
      • Ergo
        Charlie_X: hyneks project - http://www.structlog.org/en/stable/
      • hynek
      • (timestamped to the relevant part)
      • dowwie
        [redacted]
      • gustavofonseca joined the channel
      • Ergo
        dowwie: whatever you find valuable for you i guess
      • gustavofonseca has quit
      • hynek
        obvious things are remote ips and users. but depends on your context. a scientist once wrote me how they use it to do some science shit. he just logged into a list.
      • stevepie_
        bah! why does the US telecom industry suck donkey nards so hard?
      • my ISP's upstream provider (AT&T) has been jacking up its rates for shitty DSL service, and they finally had to pass it along to its customers
      • meanwhile the only viable option to DSL is Comcast, a soulless media giant
      • and they want $70 for 16/3Mbs plus $20 for a static IP
      • i could go residential instead of business service, but then i can't have a static IP
      • and they throttle
      • Ergo
        stevepie_: i think the only answer is they can do this and people pay :D
      • stevepie_
        damn me for giving a shit about this stuff
      • almost makes me want to move into an urban environment
      • i'm in suburbia without the benefits of modern technology
      • effing copper
      • and AT&T no longer maintains its copper wires. ditto for verizon. let it rot on the poles!
      • and they don't provide a replacement other than DishTV
      • rickmak_ joined the channel
      • sgflt joined the channel
      • Charlie_X
        stevepie_: don't you just love "free markets"!
      • stevepie_
        Charlie_X it's not even a "market"
      • Charlie_X
        I know
      • USD 70 for 3 MB upload is pretty good, to be honest but 16 MB downlink is poor.
      • Here in socialist Europe most countries have open access to the incumbent's network with a regulator setting wholesale prices.
      • Some exceptions where the incumbent is investing heavily such as FTTH.
      • My cable company put up charges by about 2% this year but that's the first time in four years. I could switch from 50MB/2MB to 100MB/4MB for a couple of Euros more a month but I just don't need it.
      • stevepie_
        i'd welcome fiber here
      • Charlie_X
        This is residential but no one caps in Germany, competition is too fierce.