{"id":20228285,"url":"https://github.com/andrewpetrochenkov/django-command-exception.py","last_synced_at":"2026-05-13T02:32:06.987Z","repository":{"id":249410112,"uuid":"821307284","full_name":"andrewpetrochenkov/django-command-exception.py","owner":"andrewpetrochenkov","description":"Django python exception model, admin, logging handler, middleware and excepthook","archived":false,"fork":false,"pushed_at":"2024-07-20T15:10:00.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-12T07:33:18.383Z","etag":null,"topics":["django","error-handling","exceptions","logging"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andrewpetrochenkov.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-28T08:49:48.000Z","updated_at":"2024-07-20T15:10:03.000Z","dependencies_parsed_at":"2024-07-20T16:28:04.033Z","dependency_job_id":null,"html_url":"https://github.com/andrewpetrochenkov/django-command-exception.py","commit_stats":null,"previous_names":["andrewpetrochenkov/django-command-exception.py"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/andrewpetrochenkov/django-command-exception.py","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewpetrochenkov%2Fdjango-command-exception.py","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewpetrochenkov%2Fdjango-command-exception.py/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewpetrochenkov%2Fdjango-command-exception.py/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewpetrochenkov%2Fdjango-command-exception.py/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andrewpetrochenkov","download_url":"https://codeload.github.com/andrewpetrochenkov/django-command-exception.py/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewpetrochenkov%2Fdjango-command-exception.py/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32965213,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-12T23:30:32.555Z","status":"online","status_checked_at":"2026-05-13T02:00:07.132Z","response_time":115,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["django","error-handling","exceptions","logging"],"created_at":"2024-11-14T07:29:25.320Z","updated_at":"2026-05-13T02:32:06.970Z","avatar_url":"https://github.com/andrewpetrochenkov.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"### Installation\n```bash\n$ pip install django-command-exception\n```\n\n#### `settings.py`\n```python\nINSTALLED_APPS+=['django_command_exception']\n```\n\n#### `migrate`\n```bash\n$ python manage.py migrate\n```\n\n### Models\nmodel|table|columns/fields\n-|-|-\n`CommandException`|`django_command_exception`|id,command,exc_class,exc_message,exc_traceback,created_at\n\n### Examples\n`call_command`\n```python\nfrom django_command_exception.models import CommandException\n\ntry:\n    call_command(name)\nexcept Exception as e:\n    CommandException(command=name).save()\n```\n\n`BaseCommand`\n```python\nfrom django_command_exception.models import CommandException\n\nclass BaseCommand(BaseCommand):\n    def execute(self, *args, **options):\n        try:\n            return super().execute(*args, **options)\n        except Exception as e:\n            CommandException(command=type(self).__module__.split('.')[-1]).save()\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrewpetrochenkov%2Fdjango-command-exception.py","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandrewpetrochenkov%2Fdjango-command-exception.py","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrewpetrochenkov%2Fdjango-command-exception.py/lists"}