{"id":17720171,"url":"https://github.com/gregschmit/django-purge","last_synced_at":"2025-05-06T19:46:36.241Z","repository":{"id":57421400,"uuid":"159266398","full_name":"gregschmit/django-purge","owner":"gregschmit","description":null,"archived":false,"fork":false,"pushed_at":"2021-01-04T00:01:26.000Z","size":58,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-09-17T05:51:04.414Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gregschmit.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":["gregschmit"],"custom":["https://www.paypal.me/schmitgreg"]}},"created_at":"2018-11-27T02:50:28.000Z","updated_at":"2022-11-13T01:14:18.000Z","dependencies_parsed_at":"2022-09-13T15:11:52.886Z","dependency_job_id":null,"html_url":"https://github.com/gregschmit/django-purge","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregschmit%2Fdjango-purge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregschmit%2Fdjango-purge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregschmit%2Fdjango-purge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregschmit%2Fdjango-purge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gregschmit","download_url":"https://codeload.github.com/gregschmit/django-purge/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229559921,"owners_count":18092222,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-25T15:26:29.311Z","updated_at":"2024-12-13T14:44:09.026Z","avatar_url":"https://github.com/gregschmit.png","language":"Python","funding_links":["https://github.com/sponsors/gregschmit","https://www.paypal.me/schmitgreg"],"categories":[],"sub_categories":[],"readme":"Purge\n#####\n\n.. inclusion-marker-do-not-remove\n\n.. image:: https://travis-ci.org/gregschmit/django-purge.svg?branch=master\n    :alt: Build Status\n    :target: https://travis-ci.org/gregschmit/django-purge\n\n.. image:: https://readthedocs.org/projects/django-purge/badge/?version=latest\n    :alt: Documentation Status\n    :target: https://django-purge.readthedocs.io/en/latest/?badge=latest\n\n.. image:: https://img.shields.io/pypi/v/django-purge\n    :alt: PyPI\n    :target: https://pypi.org/project/django-purge/\n\n.. image:: https://coveralls.io/repos/github/gregschmit/django-purge/badge.svg?branch=master\n    :alt: Coverage Report\n    :target: https://coveralls.io/github/gregschmit/django-purge?branch=master\n\nDocumentation: https://django-purge.readthedocs.io\n\nSource: https://github.com/gregschmit/django-purge\n\nPyPI: https://pypi.org/project/django-purge/\n\nPurge is a reusable Django app for regularly purging old database entries, like\nlogs.\n\n**The Problem**: Tables/models like sessions and logs can grow without limit.\n\n**The Solution**: This app allows you to schedule database purging of old\nrecords. You can also make ``FilePurgers`` which can purge old files based on\ndatestamps in the filename or timestamps in the meta-data (atime/mtime/ctime).\n\nHow to Use\n##########\n\n.. code-block:: shell\n\n    $ pip install django-purge\n\nInclude ``purge`` in your ``INSTALLED_APPS``. Then, create your database\npurgers or file purgers in the admin interface.\n\nThen, either periodically call the ``purge`` management command (e.g., via a\nsystem cronjob), or install and configure ``django-cron`` (add ``purge.cron``\nto your ``CRON_CLASSES`` in your ``settings.py``). The builtin ``CronJob``\nclass is set to run every 4 hours. You can change this by altering your\n``settings.py`` and adding ``PURGE_CRON_RUN_AT_TIMES`` to an array of times you\nwant to run the job at (e.g., ``['1:00']`` to run at 1am).\n\nContributing\n############\n\nCreate a pull request if you want to contribute. You must only contribute code\nthat you have authored or otherwise hold the copyright to, and you must\nmake any contributions to this project available under the MIT license.\n\nTo collaborators: don't push using the ``--force`` option.\n\nDev Quickstart\n##############\n\nPurge comes with a ``settings.py`` file, technically making it a Django project\nas well as a Django app. First clone, the repository into a location of your\nchoosing:\n\n.. code-block:: shell\n\n    $ git clone https://github.com/gregschmit/django-purge\n\nThen you can go into the ``django-purge`` directory and do the initial\nmigrations and run the server (you may need to type ``python3`` rather than\n``python``):\n\n.. code-block:: shell\n\n    $ cd django-purge\n    $ python manage.py makemigrations\n    $ python manage.py migrate\n    $ python manage.py createsuperuser\n    ...\n    $ python manage.py runserver\n\nThen you can see the models at http://127.0.0.1:8000/admin.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgregschmit%2Fdjango-purge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgregschmit%2Fdjango-purge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgregschmit%2Fdjango-purge/lists"}