#pyramid

/

      • erasmas has quit
      • marplatense has quit
      • kamalgill has quit
      • marplatense joined the channel
      • mejymejy joined the channel
      • ricoalpha joined the channel
      • _julian_ joined the channel
      • _julian__ has quit
      • zepolen_ has quit
      • gustavofonseca joined the channel
      • gustavofonseca has quit
      • zepolen joined the channel
      • marplatense has quit
      • marplatense joined the channel
      • marplatense has quit
      • driti joined the channel
      • Thorn joined the channel
      • cguardia has quit
      • rickmak_ joined the channel
      • cguardia joined the channel
      • mejymejy has quit
      • zepolen has quit
      • tisto joined the channel
      • zepolen joined the channel
      • otter768 joined the channel
      • mejymejy joined the channel
      • gustavofonseca joined the channel
      • gustavofonseca has quit
      • rickmak_ joined the channel
      • d9k_
        hmm. I use `pyramid.includes = ... pyramid_mailer.debug` but email are still sent, not saved to file http://docs.pylonsproject.org/projects/pyramid-...
      • mail.queue_path = %(here)s/data/mail
      • the folder data/mail exists
      • I use production mail.{host, port, password} but what for is `pyramid_mailer.debug`?
      • `config.registry['mailer'] = Mailer.from_settings(settings)` in __init__
      • x58
        Do you have a config.include('pyramid_mailer') somewhere in your code?
      • That is overriding the debug one?
      • otter768 joined the channel
      • rickmak_ joined the channel
      • mejymejy has quit
      • ramteid joined the channel
      • zepolen has quit
      • d9k_
        x58, no, I don't have include override. Does there any kind of autoload possible?
      • tisto has quit
      • *I don't have manual include override
      • x58
        Then unfortunately I don't know what's going on.
      • inklesspen
        use the debug toolbar and look at the globals tab
      • and see what's loaded and what's configured
      • d9k_
        pyramid-mailer/debug.py file is definitely loaded (breakpoint is hitted)
      • inklesspen, I openned debug toolbar (red icon) at local site in browser. I clicked Global tab but I don't know where can I see loaded modules.
      • inklesspen
        you have to make a request first before the global tab fills in. it's weird.
      • d9k_
        second row tabs: Introspection Routes Settings Tweens Versions
      • no `pyramid_mailer` word at Introspection tab
      • inklesspen, what do you mean?
      • which request?
      • thanks for your guidance, btw
      • x58
        d9k_: For debug purposes I personally run python -m Smtp or whatever it is, and point pyramid_mailer at that.
      • cguardia has quit
      • d9k_
        x58, ok, that will be my last resort.
      • Something strange is going on. Why is there `404` near `GET /_debug_toolbar` at the left pane in debug toolbar? http://imgur.com/DMpnPSo
      • the toolbar opens at new tab
      • http://imgur.com/621uWAS here is Global/Introspection tab. There is no "mailer" word
      • c0le joined the channel
      • Zart
        switch to settings tab
      • look for pyramid.includes
      • d9k_
        pyramid.includes '\npyramid_mailer.debug\npyramid_debugtoolbar\npyramid_tm\npyramid_beaker\npyramid_jinja2'
      • thanks!
      • debug works, but there is pyramid_mailer.debug in list
      • there no other "mailer" word at the page
      • is `pyramid.includes` value correct?
      • what statement can I execute in IDE to see which modules are actually loaded?
      • x58
        pyramid.includes is correct. It gets parsed, and include() gets called on them.
      • d9k_
        in IDE's "evaluate expression" debugger window I mean
      • there is `config.registry.registerUtility(mailer, IMailer)` at pyramid_mailer/debug.py
      • but I use manual `config.registry['mailer'] = Mailer.from_settings(settings)` in my_test_app.__init__
      • x58
        That may break it...
      • d9k_
        oh...
      • x58
        Were is Mailer coming from?
      • from pyramid_mailer import Mailer?
      • You'd have to replace that with from pyramid_mailer.debug import Mailer I would assume
      • d9k_
        yes
      • x58
        or something similar.
      • You don't have to do Mailer.from_settings(settings) though
      • if you pyramid.includes it.
      • Since it will do that for yo.
      • d9k_
        pyramid makes me to look at it's insides so often..
      • ztane
        d9k_: why?
      • x58
        I don't think that fair:
      • Configuration
      • If you configure a Mailer using from_settings() or via config.include('pyramid_mailer'), you can pass the settings from your Paste .ini file. For example:
      • Is in the documentation.
      • ztane
        yes...?
      • x58
        It states there are two ways to create a Mailer. You were trying to use both.
      • ztane: ?
      • ztane
        ah sorry :P
      • cguardia joined the channel
      • thought you were d9k_ :P
      • d9k_
        x58m, ok, I got it
      • thanks a lot :)
      • ztane
        anyway, I've found that pyramid and addons are one of the libs where I need to peek the source the least
      • s/one/some/
      • just wondering
      • x58
        There are some things that I wish were documented better. I should start writing them down when I do dive into the source code.
      • d9k_
        It's just wild opensource world :) I must become get used to thought that everything may happen
      • and fix it by myself..
      • I came from Yii background, Yii is popular so that's easy to google tons of threads solving almost any possible problem on yii forums.
      • x58
        Same thing with Zend Framework, or CakePHP or What's that other one, Composer something or other.
      • d9k_
        But I must confess that I already like Pyramid :) And this conference is great. Thanks!
      • Zart
        pyramid employs number of other packages.. and most of the problems that people have with pyramid have nothing to do with pyramid itself 8)
      • x58
        Yeah, you'll need to dive into the source code more, but that will give you a much better understanding of what is going on, and why.
      • Thereby hopefully allowing you to architect your application in a simpler and easier fashion.
      • d9k_
        I'll do my best)
      • Zart
        working with request is handled by webob. deploy settings and middleware/app composition - pastedeploy. templating - whatever you have choosen. database - whatever you have choosen. form handling - ditto...
      • x58
        Speaking of which, I really need to fix the one last bug I wanted to fix and then release 1.5.0 of WebOb.
      • Zart
        pyramid itself handles app configuration, request routing, security and view invocation
      • d9k_
        the bug is fixed, thanks to all!
      • *the bug in my code
      • mail debug mode works
      • rickmak_ joined the channel
      • tokra100 joined the channel
      • gustavofonseca joined the channel
      • truedon joined the channel
      • gustavofonseca has quit
      • ztane
        ah just remembered... wonder what is the rationale of using 0.0.0.0 for the development.ini in scaffolds
      • d9k_ joined the channel
      • tokra100 has left the channel
      • Zart
        some servers default to 127.0.0.1
      • d9k_ has quit
      • x58
        0.0.0.0 means bind to all available IPv4 addresses
      • Whereas 127.0.0.1 only binds to localhost.
      • frispete joined the channel
      • frispete_ has quit
      • atomekk joined the channel
      • ztane
        yes... I've known that since the last millennium, but that is like the most annoying default for a dev server.
      • Zart
        why?
      • yvl joined the channel
      • El_Rolando joined the channel
      • x58
        Personally I think it is an awesome default, so when I type in my "hostname.local" into my browser things just work (127.0.0.1 is not advertised over mDNS)
      • ztane
        because if I am devving on a laptop then by default that exposes my pyramid services to whoever.
      • x58
        You don't have an appropriate firewall up and running?
      • Zart
        you know, binding to localhost still exposes them to whoever...
      • unless you're on bsd
      • x58
        It does what now?
      • If you bind to 127.0.0.1 it is not exposed to the internet.
      • Zart
        it still is
      • x58
        Prove it.
      • ztane
        yeah could be possible that with IP forwarding, you can get a packet to 127.0.0.1
      • not that it will be very useful
      • x58
        Not by default.
      • atomekk joined the channel
      • atomekk has quit