> ## Documentation Index
> Fetch the complete documentation index at: https://algolia.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Upgrade the Django integration

If you have been using AlgoliaSearch for Django versions 1, 2, or 3,
upgrade to version 4 by running the following command:

```sh Command line icon=square-terminal theme={"system"}
pip install -U algoliasearch_django>=4.0
```

Version 4 includes these **breaking changes**:

* Increased required minimal versions to Python 3.8 and Django 4

* **Upgrade the Python API client to version 4**

  If you used earlier versions of the Django integration and **directly used the Python API client**,
  you need to [upgrade your code](/doc/libraries/sdk/upgrade/python).
  If you didn't interact with the Python API client directly in your code, you don't have to do anything.

* **Remove deprecated method `clear_index`**

  Replace any call to `clear_index` with `clear_objects`

  ```python Python icon=code theme={"system"}
  from algoliasearch_django import clear_index # [!code --]
  from algoliasearch_django import clear_objects # [!code ++]

  clear_index(model) # [!code --]
  clear_objects(model) # [!code ++]
  ```
