No description provided.
ExtendsNode.parent_name_expr removed in Django 1.4
Thanks for this pull request.
I'm not really a fan of try...except... where it isn't required, so maybe this should use getattr
Revert "ExtendsNode.parent_name_expr removed in Django 1.4"
This reverts commit e83428127f45c839b40e063dd704805af7460411.
updated - please look again.
Alright. Now had a closer look. Does Django 1.4 just remove that attribute? It's not replaced with anything?
appears to have been removed and not replaced
compare 1.3.1 against trunk:
django_trunk/django$ grep -r parent_name_expr *
Any movement on this?
Not really sure this fix will actually work as it will result in a Variable.resolve or FilterExpression.resolve being called with None. Which will break. What needs to happen is there should be a check for the extend_node being dynamic or not.
I used this patch in a project usign django 1.4 and everything works fine.
Thanks for verifying @AdrianRibao
@tomscytale in the old version, if parent_name_expr the context was set to None but never used. Now with this change in Django and your patch the None context will actually be used and I feared that this might cause issues.
are you sure? as far as I can tell the context is used unless extend_node.partent_name_expr is True. And usually it is False. So in normal circumstances context is None, right?
extend_node.partent_name_expr is True
FWIW this is the change that removed parent_name_expr: django/django@5cedcb4
And the corresponding Django ticket: https://code.djangoproject.com/ticket/17660
Thanks andi, I will still need to actually test this pull request before I can merge it, this will hopefully happen next week when I should have a little more time to work on this.
Is it next week yet? :-)
The patch worked for me and the current code definitely will not work with Django 1.4.
The patch is working here. The old code does not work...
News on testing for merge?
This patch works, it should be merged ASAP. It breaks 1.4 I've been using it for a long time in production enviroments.
I second what @AdrianRibao, @parruc, and @tfmorris said.
Noted, will merge this/make sekizai 1.4 compatible post-djangocon europe
just noticed that this patch actually breaks a test. will investigate
the issue is exactly what I described above, get_parent is called with None on a dynamic extends tag.
Is there a better patch to get this working with Django 1.4?
I merged the patch. sekizai master now supports up to the in-development 1.5 release of Django. (On Python versions up to 3.2).
I just gotta make a proper release for the new version.