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.

Django 4.0

All these are in the module django_codemod.commands.django_40:

  • ForceTextToForceStrCommand: migrate deprecated force_text() function to force_str().
  • SmartTextToForceStrCommand: migrate deprecated smart_text() function to smart_str().
  • UGetTextToGetTextCommand: migrate deprecated ugettext() function to gettext().
  • UGetTextLazyToGetTextLazyCommand: migrate deprecated ugettext_lazy() function to gettext_lazy().
  • UGetTextNoopToGetTextNoopCommand: migrate deprecated ugettext_noop() function to gettext_noop().
  • UNGetTextToNGetTextCommand: migrate deprecated ungettext() function to ngettext().
  • UNGetTextLazyToNGetTextLazyCommand: migrate deprecated ungettext_lazy() function to ngettext_lazy().
  • URLToRePathCommand: migrate deprecated url() function to re_path().

Django 3.2

All these are in the module django_codemod.commands.django_32:

Nothing these yet!

Django 3.1

All these are in the module django_codemod.commands.django_31:

Nothing these yet!

Django 3.0

All these are in the module django_codemod.commands.django_30:

Nothing these yet!

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.3.0.tar.gz (12.4 kB view details)

Uploaded Source

Built Distribution

django_codemod-0.3.0-py2.py3-none-any.whl (7.2 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

  • Download URL: django-codemod-0.3.0.tar.gz
  • Upload date:
  • Size: 12.4 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.1.3 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.0

File hashes

Hashes for django-codemod-0.3.0.tar.gz
Algorithm Hash digest
SHA256 682b362188496ef7871577590a48108338e1eeaa2f524ed299c6411864674c1b
MD5 36bf690573e09833f95952b02ec73873
BLAKE2b-256 0a5ae30fb1b446d8117bda9e6c54c7db71371ac41308ec99b828f720474e91aa

See more details on using hashes here.

File details

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

File metadata

  • Download URL: django_codemod-0.3.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 7.2 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.1.3 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.0

File hashes

Hashes for django_codemod-0.3.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 54a65f9272f68059a7de8f4a4b85112e687e02e4e3a4020d14dfbcdfce6407fd
MD5 f6f6e57d992d547929e190a20d1d0057
BLAKE2b-256 6b1d62ca85c1931e1b2b80bffffd905efb82a25615791f136f51f426f3d31389

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