Skip to main content

Collections of libCST codemodders to upgrade Django

Project description

https://img.shields.io/pypi/v/django-codemod.svg https://img.shields.io/travis/browniebroke/django-codemod.svg Documentation Status Updates

Codemod to help upgrading 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:

  • django_codemod.commands.django_40.ForceTextToForceStrCommand: migrate deprecated force_str() function to force_str().

  • django_codemod.commands.django_40.SmartTextToForceStrCommand: migrate deprecated smart_str() function to smart_str().

  • django_codemod.commands.django_40.UGetTextToGetTextCommand: migrate deprecated ugettext() function to gettext().

  • django_codemod.commands.django_40.UGetTextLazyToGetTextLazyCommand: migrate deprecated ugettext_lazy() function to gettext_lazy().

  • django_codemod.commands.django_40.UGetTextNoopToGetTextNoopCommand: migrate deprecated ugettext_noop() function to gettext_noop().

  • django_codemod.commands.django_40.UNGetTextToNGetTextCommand: migrate deprecated ungettext() function to ngettext().

  • django_codemod.commands.django_40.UNGetTextLazyToNGetTextLazyCommand: migrate deprecated ungettext_lazy() function to ngettext_lazy().

Not finding what you need? I’m open to contributions, please send me a pull request.

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

Uploaded Source

Built Distribution

django_codemod-0.2.1-py2.py3-none-any.whl (5.7 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

  • Download URL: django-codemod-0.2.1.tar.gz
  • Upload date:
  • Size: 10.9 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.2.1.tar.gz
Algorithm Hash digest
SHA256 5170672be6e6c18df348145603906558155570680c12fba57cee9912adf32c14
MD5 4f22aa8e8b90248b060bd3eb5f896c79
BLAKE2b-256 ceaa9d357fd7d0ed3262d994f02b66496eaf51c1534863352414f155047a9ba1

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for django_codemod-0.2.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 18ac9f4c1ce09cf4f32b6b8417365fd0e3dca9c7a83f5fc513a04bd1d2e07e45
MD5 452b7340dda89fcfd4e7bbe94b4db493
BLAKE2b-256 d60d3c0e749349bfcae0916336954ce47b1b324c6918c9a35cb9071f7d4a78c6

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