Codemod to help upgrading to newer versions of Django.
- Free software: MIT license
- Documentation: https://django-codemod.readthedocs.io.
This is based on libCST and implements codemods for it. This is currently very limited but the aim is to add more for helping with upcoming deprecations.
Currently implemented:
django_codemod.commands.django_40.ForceTextToForceStrCommand
: migrate deprecatedforce_str()
function toforce_str()
.django_codemod.commands.django_40.SmartTextToForceStrCommand
: migrate deprecatedsmart_str()
function tosmart_str()
.django_codemod.commands.django_40.UGetTextToGetTextCommand
: migrate deprecatedugettext()
function togettext()
.django_codemod.commands.django_40.UGetTextLazyToGetTextLazyCommand
: migrate deprecatedugettext_lazy()
function togettext_lazy()
.django_codemod.commands.django_40.UGetTextNoopToGetTextNoopCommand
: migrate deprecatedugettext_noop()
function togettext_noop()
.django_codemod.commands.django_40.UNGetTextToNGetTextCommand
: migrate deprecatedungettext()
function tongettext()
.django_codemod.commands.django_40.UNGetTextLazyToNGetTextLazyCommand
: migrate deprecatedungettext_lazy()
function tongettext_lazy()
.
Not finding what you need? I'm open to contributions, please send me a pull request.
This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.