Re: Formalizing template loader and debug api's

2015-02-18 Thread Aymeric Augustin
2015-02-17 23:47 GMT+01:00 Preston Timmons : > It depends. The cached loader is what I'm least happy with in my > refactoring. This > internal cache idea I think is simpler, more performant, and easier to > understand. > Adding it makes the cached loader changes unnecessary. > In that case, would

Re: Signature of the allow_migrate database router.

2015-02-18 Thread Aymeric Augustin
2015-02-18 6:34 GMT+01:00 Loïc Bistuer : > Another option would be to make the signature `allow_migrate(self, db, > app_label, model_name=None, **hints)` and to put the model class in the > hints dict, the same way we pass `instance` as hint to the other routers. Yes, that's what I wanted to sug

Re: Feature proposal: Conditional block tags

2015-02-18 Thread Tino de Bruijn
Hi, On Tue, Feb 17, 2015 at 9:04 PM, Preston Timmons wrote: > After looking at this, there's nothing special about blocks compared to > any other node. They could just as well be evaluated at render time. > > Here's a branch that implements this change: > > > https://github.com/prestontimmons/dj

Re: Drop the TEMPLATE_DEBUG setting

2015-02-18 Thread Curtis Maloney
Just to chip in here... when TEMPLATE_DEBUG=True the template engine uses a substantially different Lexer, based on re.finditer() instead of re.split(). There are about 10 hooks in the Parser class, too, that exist almost exclusively to allow the DebugParser to change behavior. If we always store

Re: Signature of the allow_migrate database router.

2015-02-18 Thread Loïc Bistuer
Individual routers don't have a base class but we can add it to the master router `django.db.router`. I've updated the PR with a `router.allow_migrate_model` method. I don't know if we should document this just yet. Internally we now treat anything other than `app_label` as a hint, but I guess

Re: Signature of the allow_migrate database router.

2015-02-18 Thread Marten Kenbeek
Loïc, the model_name is indeed the lower-case version of the object_name: https://github.com/django/django/blob/master/django/db/models/options.py#L203 On Wednesday, February 18, 2015 at 2:07:28 PM UTC+1, Loïc Bistuer wrote: > > Individual routers don't have a base class but we can add it to the

Re: Signature of the allow_migrate database router.

2015-02-18 Thread Aymeric Augustin
2015-02-18 14:07 GMT+01:00 Loïc Bistuer : > Individual routers don't have a base class but we can add it to the master > router `django.db.router`. I've updated the PR with a > `router.allow_migrate_model` method. I don't know if we should document > this just yet. > Good. Unless I missed somethi

Re: Formalizing template loader and debug api's

2015-02-18 Thread Preston Timmons
> In that case, would it be possible to do the caching improvements before > the main > refactoring? I'm trying to keep patches at a reviewable size :-) > > -- > Aymeric. > Maybe. The existing loaders don't provide a nice way to add Origin.uptodate. It would require an informal hack that only

Re: status of 1.8 release blockers

2015-02-18 Thread Tim Graham
3 issues remain. I haven't confirmed with the owners, but it seems to me there may be a good chance to wrap them up tomorrow. #24351 RunPython/RunSQL operations in contrib migrations and multi-db routers.

Re: status of 1.8 release blockers

2015-02-18 Thread Loïc Bistuer
>From my point of view #24351 is ready for a final sanity check and merging. -- Loïc > On Feb 19, 2015, at 10:10, Tim Graham wrote: > > 3 issues remain. I haven't confirmed with the owners, but it seems to me > there may be a good chance to wrap them up tomorrow. > > > #24351 RunPy