#pyramid

/

      • evagelos
        That extension should make tag {% trans %} available but im not sure how im supposed to use it in order to pass the msgid, default=.., mapping={}...
      • (and i installed of course pyramid_jinja2)
      • dowwie
        wiggy: ping
      • wiggy
        pong
      • dowwie
        wiggy: by any chance do you have sql alchemy core scaffolding? essentially, the alternative to the sqlalchemy orm alchemy scaffolding
      • wiggy: I'm not positive whether zope transaction is necessary if I'm not using sessions and don't mind committing manually
      • wiggy
        I don't
      • my scaffolding is config.include('pyramid_sqlalchemy')
      • and same for pyramid_tm
      • if you commit manually than you don't need zope transactions
      • dowwie
        thx for confirming that
      • xurb has left the channel
      • tiwula joined the channel
      • Lcaracol joined the channel
      • moo-_-
        evagelos: hmm
      • evagelos: please let me know if you figure out as I might face this issue soon
      • hvelarde is now known as hvelarde|lunch
      • behold, my pyramid based blog engine https://tokenmarket.net/blog/ - tonight the days of wordpress are outnumbered
      • chris___ joined the channel
      • wiggy has quit
      • chris___ has quit
      • Charlie_X applauds moo-_-
      • MrTango joined the channel
      • rodfersou|lunch is now known as rodfersou
      • cmaloney
        outnumbered days for Wordpress
      • stevepi_
        evagelos did you read the example in the docs? http://docs.pylonsproject.org/projects/pyramid_...
      • what do you observe?
      • raydeo
        eew, those docs differ from pyramid's i18n docs
      • this is why we can't have nice things
      • stevepi_
        raydeo and pyramid's i18n docs also have issues with i18n
      • and neither of us have done i18n, so we don't know how to fix it :(
      • we need more taco trucks on every corner
      • hvelarde|lunch is now known as hvelarde
      • davisagli joined the channel
      • npilon joined the channel
      • stevepi_ has quit
      • stevepiercy joined the channel
      • raspi
        ok, finally i18n .pot files are created. only took 4 days. so setup.py extract_messages is not used. so this should be removed from the docs.
      • next how to use the .mo files :)
      • evagelos
        moo-_-: it worked the 1st attempt i did by doing this: env = jinja2.Environment(..); env.globals['_'] = my_translate_function; And inside templates im setting variables where i call the function _
      • moo-_-: example inside template: {% default_title = _('string-id', default='my string that needs translate') %}
      • stevepi_: couldnt figure out from docs and the example wants me to create a project in order to see how it works :O no thanks
      • im noob i dont know pyramid im trying to learn it i hate docs its so freaking frustrating to learn pyramid i dont want to insult anyone cause im noob and people say pyramid is awesome and scales and stuff but for noobs like me aaaaa i want to smash my screen everytime i go to docs
      • i appreciate u all and the work u have done my opinoon doesnt matter i dont want to insult anyone its cause im frustrated when i search for pyramid resources + i hate docs
      • pls make for videos in conferences etc i searched entire youtube to find english pyramid videos
      • dowwie
        evagelos: that is the fault of event organizers, mostly
      • evagelos
        iv seen mister mc d.. dont remember his name with the "pyramid auth is hard lets ride bikes" and it was cool even though when he started talking advances time ran out :(
      • NotreDev
        I’ve got a model that I’d like to serialize which includes a URL that I’d like to build from a request.route_url. Unfortunately, I can’t pass a request object to it (using a framework). It seems my options are to grab the thread’s request, or to inject a route_url builder into a global object. Any thoughts?
      • evagelos
        and also another guy i think from Mexico anyway i wish more content can be produces :|
      • Spanktar joined the channel
      • sry for my unrelated chat im off to rest thanks everyone
      • evagelos has quit
      • NotreDev
        man, I love the pyramid docs.
      • chreide joined the channel
      • gavinc joined the channel
      • ronnix joined the channel
      • stevepiercy
        "i hate docs"
      • i don't even...
      • raydeo
        I think you can hate docs or examples but you're going to have a bad time if you hate both
      • mr_jolly has quit
      • "I only learn via video"
      • moo-_-
        NotreDev: don't do that
      • NotreDev: separate serialization from model code
      • blaflamme
        stevepiercy you're the doc master
      • moo-_-
        documeister
      • NotreDev
        moo-_-: i’m using marshmallow_sqlalchemy. by and far it’s productive. i’ve got a bookmark in my brain to figuring out if I can pass it a “request” as context.
      • raydeo
        NotreDev: marshmallow lets you bind stuff to the context, so that should be the way to do it
      • mr_jolly joined the channel
      • Adniel has quit
      • agitator joined the channel
      • El_Rolando has quit
      • rodfersou is now known as rodfersou|afk
      • mr_jolly has quit
      • chreide has quit
      • chris___ joined the channel
      • disko has quit
      • chris___ has quit
      • chreide joined the channel
      • chrisrossi
        docs are what roped me in.
      • of course, that was in '08. the docs were a lot shorter.
      • agitator joined the channel
      • mr_jolly joined the channel
      • bochecha has quit
      • mr_jolly has quit
      • ztane
        was there any discussion on this:
      • fixed in Django recently
      • is pyramid_debugtoolbar vulnerable
      • waveform has quit
      • agitator joined the channel
      • raydeo
        ztane: I'm pretty sure we're vulnerable
      • it's come up in the past
      • gavinc
        I don't think there's any great mitigation other than DON'T ENABLE DEBUGTOOLS in web facing systems :\
      • mr_jolly joined the channel
      • chrisw_ joined the channel
      • kiorky joined the channel
      • mr_jolly has quit
      • ztane
        gavinc: ... you didn't realize what is the vulnerability
      • the vulnerability is "do not browse the web while you're developing"
      • i.e. while you're developing, do not connect to the internet.
      • davisagli has quit
      • evilbungle has quit
      • gavinc
        mmm
      • chrisrossi
        i'm pretty sure you can tell debugtoolbar to only talk to localhost
      • in fact, that's probably the default.
      • look it up, though, to make sure.
      • gavinc
        (amusinglyly that would only help if it's by hostname not by IP)
      • chrisrossi
        you know what i mean.
      • raydeo
        dns rebinding is quite tricky
      • pauleveritt joined the channel
      • because it's all about localhost
      • ztane: it'd be swell if you were that someone
      • chrisw_ has quit
      • teix has quit
      • waigani joined the channel
      • monokrome
        Does anyone know a way to make a view_config that handles all options requests? I thought this would work: @view.view_config(request_method='OPTIONS', path_info='.*', renderer='json')
      • That apparently only works for requests to the root
      • raydeo
        yep, that won't work
      • monokrome
        Thanks, raydeo! I was trying to avoid a custom predicate but maybe that's the only way?
      • raydeo
        there's a lot more there than just a custom predicate
      • but yes it's a good way to go to intercept all options requests
      • monokrome
        We already have all of the header logic and stuff, but the OPTIONS requests need served :)
      • raydeo
        well that gist I pasted you works, so make sure your stuff is similar ;-)
      • monokrome
        thanks :)
      • raydeo
        there's also the response subscriber for non-preflight requests
      • chris___ joined the channel
      • agitator joined the channel
      • yleclanche has quit
      • chreide has quit
      • stevepi_ joined the channel
      • nilo joined the channel
      • chreide joined the channel
      • stevepiercy has quit
      • nilo has quit
      • nilo joined the channel
      • nilo has quit
      • davisagli joined the channel
      • rodfersou|afk is now known as rodfersou
      • chreide has quit
      • chreide joined the channel
      • Dead_Thinker joined the channel
      • benhitz has left the channel
      • benhitz joined the channel
      • Charlie_X has quit
      • npilon has quit
      • Lcaracol has quit
      • zupo joined the channel
      • davisagli has quit
      • MrTango has quit