You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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
optionIn 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 commandIn 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
The text was updated successfully, but these errors were encountered: