{"id":16417359,"url":"https://github.com/valberg/django-view-decorator","last_synced_at":"2026-01-14T10:24:05.704Z","repository":{"id":160134992,"uuid":"618783783","full_name":"valberg/django-view-decorator","owner":"valberg","description":null,"archived":false,"fork":false,"pushed_at":"2025-12-15T19:06:59.000Z","size":64,"stargazers_count":48,"open_issues_count":6,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-12-19T02:47:39.875Z","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/valberg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-03-25T10:43:49.000Z","updated_at":"2025-11-13T13:39:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"ca551aa7-8618-4b8e-a5e0-30e26c1bdc2a","html_url":"https://github.com/valberg/django-view-decorator","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/valberg/django-view-decorator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valberg%2Fdjango-view-decorator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valberg%2Fdjango-view-decorator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valberg%2Fdjango-view-decorator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valberg%2Fdjango-view-decorator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/valberg","download_url":"https://codeload.github.com/valberg/django-view-decorator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valberg%2Fdjango-view-decorator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28417034,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T10:18:03.274Z","status":"ssl_error","status_checked_at":"2026-01-14T10:16:11.865Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2024-10-11T07:11:28.082Z","updated_at":"2026-01-14T10:24:05.688Z","avatar_url":"https://github.com/valberg.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# Django View Decorator\n\n[![Tests](https://github.com/valberg/django-view-decorator/actions/workflows/test.yml/badge.svg)](https://github.com/valberg/django-view-decorator/actions/workflows/test.yml)\n[![Documentation](https://readthedocs.org/projects/django-view-decorator/badge/?version=latest)](https://django-view-decorator.readthedocs.io/en/latest/?badge=latest)\n[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/valberg/django-view-decorator/main.svg)](https://results.pre-commit.ci/latest/github/valberg/django-view-decorator/main)\n[![PyPI - Version](https://img.shields.io/pypi/v/django-view-decorator.svg)](https://pypi.org/project/django-view-decorator)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/django-view-decorator.svg)](https://pypi.org/project/django-view-decorator)\n\n-----\n\n**django-view-decorator** is decorator aimed at bringing locality of behaviour to the connection between a URL and a view in Django.\n\nRead more about the motivation behind the package in a recent [blogpost](https://valberg.dk/bringing-locality-of-behaviour-to-django-views-and-urls.html).\n\n\n\n**Table of Contents**\n\n- [Installation](#installation)\n- [Usage](#usage)\n- [License](#license)\n\n## Installation\n\n```console\npip install django-view-decorator\n```\n\n## Usage\n\nSetup the project URLconf to include URLs from django-view-decorator:\n\n```python\n# project/urls.py (this is what we point the ROOT_URLCONF setting at)\nfrom django.urls import path\n\nfrom django_view_decorator import include_view_urls\n\nurlpatterns = [\n    path(\"\", include_view_urls()),\n]\n```\n\nUse the decorator like so, for:\n\n### Function-based views\n\n```python\n# foos/views.py\nfrom django_view_decorator import view\n\n@view(paths=\"/foo/\", name=\"foo\")\ndef foo(request: HttpRequest) -\u003e HttpResponse:\n    return HttpResponse(\"foo\")\n```\n\n### Class-based views\n```python\n@view(paths=\"/foo/\", name=\"foo-list\")\nclass FooList(ListView):\n    model = Foo\n```\n\n## Development\n\n```console\ngit clone\ncd django-view-decorator\npip install hatch\nhatch run tests:cov\nhatch run tests:typecheck\n```\n\n## License\n\n`django-view-decorator` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvalberg%2Fdjango-view-decorator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvalberg%2Fdjango-view-decorator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvalberg%2Fdjango-view-decorator/lists"}