Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add django 1.5 support #5

Open
coagulant opened this issue Feb 10, 2013 · 1 comment
Open

Add django 1.5 support #5

coagulant opened this issue Feb 10, 2013 · 1 comment
Assignees
Labels

Comments

@coagulant
Copy link
Member

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

@ghost ghost assigned coagulant Feb 10, 2013
@coagulant
Copy link
Member Author

I'm thikning second solution is better, because it does not imply altering existing code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant