Turbogears2 migration: custom error pages

Thomas De Schampheleire patrickdepinguin at gmail.com
Mon Jun 13 18:41:03 UTC 2016


On Tue, Jun 7, 2016 at 9:20 AM, Thomas De Schampheleire
<patrickdepinguin at gmail.com> wrote:
> On Tue, Jun 7, 2016 at 12:43 AM, Alessandro Molina
> <alessandro.molina at gmail.com> wrote:
>>
>>
>> On Tue, May 31, 2016 at 9:02 AM, Thomas De Schampheleire
>> <patrickdepinguin at gmail.com> wrote:
>>>
>>>
>>> If the dotted notation is more common or a better strategy, we could
>>> also just switch to it?
>>
>>
>> It has some advantages as all template paths are expressed in relation to
>> python packages, so makes easier to reuse parts of the applicaiton.
>> When using /index.html it's not clear where it should be loaded from, while
>> kallithea.templates.index explicitly tells it's the index template from
>> kallithea package.
>>
>> While TG supports templates by path, the best practice is to specify them by
>> package using the dotted notation.
>>
>>>
>>> It produces of course more changes for now, so it could be simpler to
>>> postpone this to the point where we integrated to mainstream? Or use a
>>> temporary hack to support both.
>>
>>
>> I made some minor changes to the Mako renderer in TG to improve support for
>> apps that use custom extension for template files (TG2 by default takes for
>> grnated that mako templates end with .mak extension). Using those the
>> debugbar works correctly in Kallithea, I plan to release those with TG 2.3.9
>> before during June.
>>
>
> Thanks.
>
> Meanwhile I started rebasing the current changes onto the current
> 'default' of Kallithea upstream, which also includes all my changes to
> migrate fully to pytest.
> It was not possible to do a plain rebase due to the merge that
> happened in between, so I had to use some grafting too. I collapsed
> most of the initial changes that all relate to basic bringup of TG2.
>
> I think it makes sense to continue using the kallithea-tg repo,
> obsoleting the original changes. Then everything is still available in
> one place.
>
> I'll let you know when I have something to share.
>

Ok, I have successfully rebased and squashed the commits we currently
have. The remaining patches are:

6030 057cb5938727 default  2016-06-10 Alessandro Molina Turbogears2
migration: base code changes
6041 de6e2b8f4ca8 default  2016-02-18 Alessandro Molina This should
provide a working ErrorController, still missing what it is media_path
6042 b101140fc446 default  2016-02-22 Thomas De Schampheleire
turbogears migration: remove some references to pylons from comments
6043 f673294fb6cd default  2016-02-22 Thomas De Schampheleire
turbogears migration: replace remaining references to pylons.config
6044 32add9b05a0a default  2016-02-22 Thomas De Schampheleire auth:
remove unused import of tg.url
6045 f33abfa1cc61 default  2016-04-25 Alessandro Molina Switch from
custom routing to tgext.routes
6046 5299791862e4 default  2016-06-10 Thomas De Schampheleire
turbogears migration: initial set-up of test suite
6047 5287ae164712 default  2016-05-17 Thomas De Schampheleire
turbogears migration: tests: fix tests using internationalization
6048 f784f584aa78 default  2016-05-29 Thomas De Schampheleire
turbogears migration: make sure 400 errors use the custom error pages
6049 d7399eefadd3 tip default  2016-06-13 Thomas De Schampheleire
Turbogears2 migration: tests: other: fix tests outside of controllers

The first commit (6030) is basically most of the initial commits by
Alessandro but squashed because I think they were more development
iterations than commits that should remain separately.
I also squashed 3 commits related to the switch to tgext.routes into
1, but kept it separately from the first one.
I kept the commit for ErrorController separately, mainly to highlight
Alessandro's comment 'still missing what it is media_path'.
Later we could squash more commits, e.g. my commits fixing tests,
depending on how that proceeds.

Question is now: do you agree with this current split and shall I push
it to kallithea-tg, or do you prefer I make some changes first?

Thanks,
Thomas


More information about the kallithea-general mailing list