Skip to main content

Clean out files in a django app using regular expressions.

Project description


django-clean is a package that lets you specify files or directories that you
would like cleaned up. You can specify regular expressions to define which
files you would like automatically removed.

1. Add 'clean' to your installed apps in your file.


2. Define a PROJECT_PATH in your file.

import os.path, sys
PROJECT_PATH = os.path.dirname(__file__)

3. *OPTIONAL* Define the regular expression patterns you would like to match against in
your file. The default is a regex pattern to remove *.pyc files. (NOTE: The
regex matches against the full qualified path).


From your shell, type:

python clean

This will prompt you to remove files that match the regular expression patterns.

If you are confident in your regex, you can supply a --force option which will not prompt
you before removing pattern matches.

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-clean-0.1.2.tar.gz (3.8 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page