Skip to content

developersociety/django-findreplace

Repository files navigation

Django Find Replace

A Django management command which will replace all instances of a string throughout a database with another - useful for bulk content changes.

Installation

Using pip:

$ pip install django-findreplace

Edit your Django project's settings module, and add the application to INSTALLED_APPS:

INSTALLED_APPS = [
    # ...
    "findreplace",
    # ...
]

Usage

To replace all instances of foo with bar:

$ ./manage.py findreplace foo bar

To use this command without being asked for confirmation:

$ ./manage.py findreplace --noinput foo bar