I recently tried using Mako templating in Flask, and quickly came upon tzellman's extension on Github. However, this extension seemed incomplete (not available on PyPI, no tests, no examples, etc) and did not appear to follow the extension development process detailed in Flask's documentation. Therefore, I spent a little time whipping up a version that (hopefully) conforms to the ideal described. Git Repository: https://github.com/AnIrishDuck/flask-mako PyPI Page: http://pypi.python.org/pypi?:action=display&name=Flask-Mako The included test suite passes on Flask 0.8 and 0.9. Any and all feedback is welcome. I'd like to get this extension approved eventually. My goal is to see it added to the extension registry, and I'm willing to fix any issues to do so. Thanks, Frank
I made one as well : https://github.com/benselme/flask-makotemplates/ We should join our efforts ! Have a nice day, Béranger On Mon, Jul 2, 2012 at 6:04 PM, Frank Murphy <fmurphy@arbor.net> wrote: > I recently tried using Mako templating in Flask, and quickly came upon > tzellman's extension on Github. However, this extension seemed > incomplete (not > available on PyPI, no tests, no examples, etc) and did not appear to > follow the > extension development process detailed in Flask's documentation. > > Therefore, I spent a little time whipping up a version that (hopefully) > conforms to the ideal described. > > Git Repository: https://github.com/AnIrishDuck/flask-mako > PyPI Page: http://pypi.python.org/pypi?:action=display&name=Flask-Mako > > The included test suite passes on Flask 0.8 and 0.9. Any and all feedback > is > welcome. > > I'd like to get this extension approved eventually. My goal is to see it > added > to the extension registry, and I'm willing to fix any issues to do so. > > Thanks, > Frank > >
Would love to see this as an official extension. Maybe you guys got the smarts to plug in the exception handling so the correct line #'s and error details are shown when using mako? Here are some posts I made awhile ago regarding this: http://librelist.com/browser//flask/2012/5/30/how-to-set-up-mako-templates-with-flask-to-yield-decipherable-exceptions/#38e46db6dd287769074161841a91f456 - chrickso On Jul 2, 2012 6:30 PM, "Bérenger Enselme" <berenger@enselme.com> wrote: > I made one as well : > https://github.com/benselme/flask-makotemplates/ > > We should join our efforts ! > > Have a nice day, > Béranger > > On Mon, Jul 2, 2012 at 6:04 PM, Frank Murphy <fmurphy@arbor.net> wrote: > >> I recently tried using Mako templating in Flask, and quickly came upon >> tzellman's extension on Github. However, this extension seemed >> incomplete (not >> available on PyPI, no tests, no examples, etc) and did not appear to >> follow the >> extension development process detailed in Flask's documentation. >> >> Therefore, I spent a little time whipping up a version that (hopefully) >> conforms to the ideal described. >> >> Git Repository: https://github.com/AnIrishDuck/flask-mako >> PyPI Page: http://pypi.python.org/pypi?:action=display&name=Flask-Mako >> >> The included test suite passes on Flask 0.8 and 0.9. Any and all feedback >> is >> welcome. >> >> I'd like to get this extension approved eventually. My goal is to see it >> added >> to the extension registry, and I'm willing to fix any issues to do so. >> >> Thanks, >> Frank >> >> >
My extension does provide error handling, but it's a little wonky (the Mako error traceback is embedded into the error message). I haven't found a better way to do this, and am unhappy with the current approach as it feels kind of hackey. Exceptions shouldn't have multi-line messages in my opinion. Any better ideas are of course welcome. Béranger, I have no objections to a joint effort. It appears that our extensions have overlapping features that could (should) be merged. I'll begin merging our extensions over the next couple days. Your extension already appears to solve many of the issues I had before, and I like the overall approach better than mine. However, it was not in a cursory google search or anywhere on PyPI (hence I was unaware it existed). I'm willing to maintain my package on PyPI, as that's one of the conditions for addition to the extension registry. My extension already shows up prominently when searching via Google or PyPI. I have no idea why this is true, but it will directly affect which solution new Flask users choose. Unfortunately, the #1 google search for "flask mako" right now is tzellman's outdated extension. Hopefully this will change, especially if the new extension gets approved and added to the extension registry. Once the extension is ready to be approved (adheres to all 0-10 guidelines on http://flask.pocoo.org/docs/extensiondev/), what do I need to do to get it approved? Thanks, Frank <http://flask.pocoo.org/docs/extensiondev/> > > Would love to see this as an official extension. Maybe you guys got > the smarts to plug in the exception handling so the correct line #'s > and error details are shown when using mako? > > Here are some posts I made awhile ago regarding this: > > http://librelist.com/browser//flask/2012/5/30/how-to-set-up-mako-templates-with-flask-to-yield-decipherable-exceptions/#38e46db6dd287769074161841a91f456 > > - chrickso > > On Jul 2, 2012 6:30 PM, "Bérenger Enselme" <berenger@enselme.com > <mailto:berenger@enselme.com>> wrote: > > I made one as well : > https://github.com/benselme/flask-makotemplates/ > > We should join our efforts ! > > Have a nice day, > Béranger > > On Mon, Jul 2, 2012 at 6:04 PM, Frank Murphy <fmurphy@arbor.net > <mailto:fmurphy@arbor.net>> wrote: > > I recently tried using Mako templating in Flask, and quickly > came upon > tzellman's extension on Github. However, this extension seemed > incomplete (not > available on PyPI, no tests, no examples, etc) and did not > appear to > follow the > extension development process detailed in Flask's documentation. > > Therefore, I spent a little time whipping up a version that > (hopefully) > conforms to the ideal described. > > Git Repository: https://github.com/AnIrishDuck/flask-mako > PyPI Page: > http://pypi.python.org/pypi?:action=display&name=Flask-Mako > > The included test suite passes on Flask 0.8 and 0.9. Any and > all feedback is > welcome. > > I'd like to get this extension approved eventually. My goal is > to see it > added > to the extension registry, and I'm willing to fix any issues > to do so. > > Thanks, > Frank > >
Hi Frank, To become listed you should first have a documentation hosted online. I recommend you to use Sphinx for creating docs and ReadTheDocs for hosting. Both have a great quickstart section that will allow you to start immediately. Sphinx: http://sphinx.pocoo.org/ ReadTheDocs: http://readthedocs.org/ Next you should send a pull request adding your extension to list here: https://github.com/mitsuhiko/flask/blob/website/flask_website/listings/extensions.py Mark it as unapproved. You don't need to meet all the rules for extension to become listed. When the extension is ready to become approved(meets all the rules), create an issue "Review flask-make" in flask repo on github and wait for someone to review it. If you have any further questions you can find me as alekzvik on #pocoo -- Alex Vykalyuk On Tue, Jul 3, 2012 at 9:56 PM, Frank Murphy <fmurphy@arbor.net> wrote: > My extension does provide error handling, but it's a little wonky (the > Mako error traceback is embedded into the error message). I haven't found a > better way to do this, and am unhappy with the current approach as it feels > kind of hackey. Exceptions shouldn't have multi-line messages in my > opinion. Any better ideas are of course welcome. > > Béranger, I have no objections to a joint effort. It appears that our > extensions have overlapping features that could (should) be merged. I'll > begin merging our extensions over the next couple days. > > Your extension already appears to solve many of the issues I had before, > and I like the overall approach better than mine. However, it was not in a > cursory google search or anywhere on PyPI (hence I was unaware it existed). > I'm willing to maintain my package on PyPI, as that's one of the conditions > for addition to the extension registry. > > My extension already shows up prominently when searching via Google or > PyPI. I have no idea why this is true, but it will directly affect which > solution new Flask users choose. Unfortunately, the #1 google search for > "flask mako" right now is tzellman's outdated extension. Hopefully this > will change, especially if the new extension gets approved and added to the > extension registry. > > Once the extension is ready to be approved (adheres to all 0-10 guidelines > on http://flask.pocoo.org/docs/extensiondev/), what do I need to do to > get it approved? > > Thanks, > Frank > > <http://flask.pocoo.org/docs/extensiondev/> > > Would love to see this as an official extension. Maybe you guys got the > smarts to plug in the exception handling so the correct line #'s and error > details are shown when using mako? > > Here are some posts I made awhile ago regarding this: > > > http://librelist.com/browser//flask/2012/5/30/how-to-set-up-mako-templates-with-flask-to-yield-decipherable-exceptions/#38e46db6dd287769074161841a91f456 > > - chrickso > On Jul 2, 2012 6:30 PM, "Bérenger Enselme" <berenger@enselme.com> wrote: > >> I made one as well : >> https://github.com/benselme/flask-makotemplates/ >> >> We should join our efforts ! >> >> Have a nice day, >> Béranger >> >> On Mon, Jul 2, 2012 at 6:04 PM, Frank Murphy <fmurphy@arbor.net> wrote: >> >>> I recently tried using Mako templating in Flask, and quickly came upon >>> tzellman's extension on Github. However, this extension seemed >>> incomplete (not >>> available on PyPI, no tests, no examples, etc) and did not appear to >>> follow the >>> extension development process detailed in Flask's documentation. >>> >>> Therefore, I spent a little time whipping up a version that (hopefully) >>> conforms to the ideal described. >>> >>> Git Repository: https://github.com/AnIrishDuck/flask-mako >>> PyPI Page: http://pypi.python.org/pypi?:action=display&name=Flask-Mako >>> >>> The included test suite passes on Flask 0.8 and 0.9. Any and all >>> feedback is >>> welcome. >>> >>> I'd like to get this extension approved eventually. My goal is to see it >>> added >>> to the extension registry, and I'm willing to fix any issues to do so. >>> >>> Thanks, >>> Frank >>> >>> >> > >