Skip to content

Add django 1.5 support #5

@coagulant

Description

@coagulant

Right now it's assumed we're migrating Django 1.3-1.4 templates.
They both support "old syntax" and "new syntax" via compatibility tag {% load url form future %}.

However, when Django 1.5 is released, there will be no need in this compatibility tag anymore. This means, we need to alter library behavior to support Django 1.5. Now it adds {% load url from future %} in each template, having {% url %} tag without compatibility tag on top.

Solutions:

Add --target==1.5 option

In this mode all templates are assumed to be old style or new style with mandatory {% load url from future %}. After conversion both will become new-style templates with no compatibility load tag.

Drawback of this solution is that it can break templates if it runs against modern Django 1.5 templates (where url arguments can be resolved as varaibles).

Add remove-compat sub command

In this mode we simply remove all `{% load url from future %}`` compatibility tags. Users can run this subcommand after the first one has finished.

Any other suggestions?

/cc @olevinsky

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions