Collections of libCST codemodders to upgrade Django
Collections of libCST codemodder to help upgrades to newer versions of Django.
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 codemodders are listed below and grouped by the version of Django where deprecations are removed.
Not finding what you need? I'm open to contributions, please send me a pull request.
Example of use
For example, replace the deprecated
url() function by the newer
re_path() introduced in Django 2.0 as follows by running the appropriate codemodder:
python3 -m libcst.tool codemod django_40.URLToRePathCommand .
Will go through all the files under your local directory
. and apply the code modifications to update imports and function calls.
Check out the documentation for more detail on usage and the full list of codemodders.
Thanks goes to these wonderful people (emoji key):
💻 🐛 📖
This project follows the all-contributors specification. Contributions of any kind welcome!
Release history Release notifications | RSS feed
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size django_codemod-0.5.0-py2.py3-none-any.whl (9.7 kB)||File type Wheel||Python version py2.py3||Upload date||Hashes View|
|Filename, size django-codemod-0.5.0.tar.gz (15.1 kB)||File type Source||Python version None||Upload date||Hashes View|
Hashes for django_codemod-0.5.0-py2.py3-none-any.whl