Skip to main content

Allows you to clear Django cache via admin UI or manage.py command

Project description

This is a backport package from @timonweb's ClearCache to Python 2.7.

Django ClearCacheBackport

License Django versions Python versions

Allows you to clear Django cache via admin UI or manage.py command.

demo

Installation

  1. Install using PIP:

    pip install django-clearcache-backport
    
  2. Add clearcache to INSTALLED_APPS, make sure it's above django.contrib.admin:

    INSTALLED_APPS += [
        ...
        'clearcache',
        'django.contrib.admin',
        ...
    ]
    
  3. Add url to the main urls.py right above root admin url:

    ```
    urlpatterns = [
        url(r'^admin/clearcache/', include('clearcache.urls')),
        url(r'^admin/', admin.site.urls),
    ]
    ```
    

Usage

Via Django admin

  1. Go to /admin/clearcache/, you should see a form with cache selector
  2. Pick a cache. Usually there's one default cache, but can be more.
  3. Click the button, you're done!

Via manage.py command

  1. Run the following command to clear the default cache

    python manage.py clearcache
    
  2. Run the command above with an additional parameter to clear non-default cache (if exists):

    python manage.py clearcache cache_name
    

Project details


Download files

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

Source Distribution

django-clearcache-backport-1.0.0.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

django_clearcache_backport-1.0.0-py2.py3-none-any.whl (7.2 kB view details)

Uploaded Python 2Python 3

File details

Details for the file django-clearcache-backport-1.0.0.tar.gz.

File metadata

  • Download URL: django-clearcache-backport-1.0.0.tar.gz
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.6 CPython/2.7.17 Linux/5.4.0-72-generic

File hashes

Hashes for django-clearcache-backport-1.0.0.tar.gz
Algorithm Hash digest
SHA256 937daddd595f675293fceaa22da1b13f961963b2a8bb7c8498735e1528396c3b
MD5 4872927dc075bf699693f72bf946e20a
BLAKE2b-256 1171be340963bccc540c69de92ebf867d11d010a102c116cc9db2dc0baf6b0b6

See more details on using hashes here.

File details

Details for the file django_clearcache_backport-1.0.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for django_clearcache_backport-1.0.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 a9b2f81d1f9898c5cbbd06f64b98040ce043d71f69124e4e1e29fb4232af9013
MD5 bec4180764c619267f98eceb6056d8a0
BLAKE2b-256 d6cca10aa274383a390214d0171145ffe5f8f13a510d54e0ed2fd591db6319ff

See more details on using hashes here.

Supported by

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