{"id":13463832,"url":"https://github.com/KhaledElAnsari/django-truncate","last_synced_at":"2025-03-25T09:31:08.152Z","repository":{"id":46288895,"uuid":"56967265","full_name":"KhaledElAnsari/django-truncate","owner":"KhaledElAnsari","description":"A simple library to help you truncate your tables with one simple command","archived":false,"fork":false,"pushed_at":"2021-11-01T22:30:08.000Z","size":16,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-29T16:21:43.772Z","etag":null,"topics":["cli","database","django","orm","python","truncate"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/KhaledElAnsari.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-04-24T11:06:48.000Z","updated_at":"2022-12-05T14:57:04.000Z","dependencies_parsed_at":"2022-09-13T15:41:25.341Z","dependency_job_id":null,"html_url":"https://github.com/KhaledElAnsari/django-truncate","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/KhaledElAnsari%2Fdjango-truncate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KhaledElAnsari%2Fdjango-truncate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KhaledElAnsari%2Fdjango-truncate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KhaledElAnsari%2Fdjango-truncate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KhaledElAnsari","download_url":"https://codeload.github.com/KhaledElAnsari/django-truncate/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245435100,"owners_count":20614827,"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":["cli","database","django","orm","python","truncate"],"created_at":"2024-07-31T14:00:29.094Z","updated_at":"2025-03-25T09:31:07.062Z","avatar_url":"https://github.com/KhaledElAnsari.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":["Gists"],"readme":"Django-Truncate\n===============\n\nDjango-Truncate is a simple library that will add the ability to empty\nany given model in any app within your django project, in a more SQL related\nwords it will **TRUNCATE** the **TABLE** with a simple command::\n\n    python manage.py truncate --apps myapp --models model1 model2\n\nInstallation\n------------\n\nAfter you move to your django project main directory follow these simple steps\n\n1. In your terminal/command line run the following command::\n\n        pip install django-truncate\n\n2. Add \"django_truncate\" to your **INSTALLED_APPS** in the settings.py file::\n\n        INSTALLED_APPS = [\n          ...\n          'django_truncate',\n        ]\n\n3. And that's it! you're now ready to use it.\n\nUsage \u0026 Options\n---------------\n\nThere is two simple options that will make it easier for you to truncate your tables:\n\n1. **--apps**: This command will take the name of the apps you want truncate it's data, by default it will truncate all the tables::\n\n        python manage.py truncate --apps appone apptwo\n\n2. **--models**: After you enter the app name enter the Model(s) name(s) If you don't want to truncate all of the tables::\n\n        python manage.py truncate --apps appone --models Model3\n\n   **Note**: if you don't write the name of the app the truncate will stop and you'll see an error message in the terminal\n\nRemember you can always see the instructions by running::\n\n    python manage.py truncate -h\n    \nCompatibility\n-------------\n\nThis project works with Django 1.7, 1.8 and 1.9 using Python 2 (2.7) or Python 3 (3.4 and 3.5).\n\nFor the moment this project is using the Django ORM so django-truncate will work with all of the supported Databases by the Django ORM\n\nLicense\n-------\n\nThis project is under the BSD License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FKhaledElAnsari%2Fdjango-truncate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FKhaledElAnsari%2Fdjango-truncate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FKhaledElAnsari%2Fdjango-truncate/lists"}