Skip to main content

Collections of libCST codemodders to upgrade Django

Project description

Django Codemod

image image Documentation Status Updates

All Contributors

Collections of libCST codemodder to help upgrades to newer versions of Django.

Features

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.

Contributors ✨

Thanks goes to these wonderful people (emoji key):


Bruno Alla

💻 🐛 📖

Adam Johnson

📖

This project follows the all-contributors specification. Contributions of any kind welcome!

Credits

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-codemod-0.5.0.tar.gz (15.1 kB view details)

Uploaded Source

Built Distribution

django_codemod-0.5.0-py2.py3-none-any.whl (9.7 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file django-codemod-0.5.0.tar.gz.

File metadata

  • Download URL: django-codemod-0.5.0.tar.gz
  • Upload date:
  • Size: 15.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.3.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.0

File hashes

Hashes for django-codemod-0.5.0.tar.gz
Algorithm Hash digest
SHA256 54a36975e5a5b6886f60aae8e4537caad20c15d7a7e57694822b74a73d61d560
MD5 0afd6a3088e8ecedbe9df1331067be70
BLAKE2b-256 26bdb56cf50697e3f45fd264a639e28f05c2546ca893cea31d395bb07b588e51

See more details on using hashes here.

File details

Details for the file django_codemod-0.5.0-py2.py3-none-any.whl.

File metadata

  • Download URL: django_codemod-0.5.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 9.7 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.3.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.0

File hashes

Hashes for django_codemod-0.5.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 8c4b2e20bceace9ed459890cce592f0d84de73ca294bad0883c6887f2a27dffa
MD5 db3c8bf80bb15f0b20c4f9c31c982ae3
BLAKE2b-256 1b029e2a3a68f1d4e1fbce62b56cf08575486257bc4b84c00a0aa37c409d48a3

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page