{"id":15655429,"url":"https://github.com/tfranzel/django-seriously","last_synced_at":"2025-09-01T08:49:41.783Z","repository":{"id":57421857,"uuid":"437527012","full_name":"tfranzel/django-seriously","owner":"tfranzel","description":"Opinionated collection of Django and Django REST framework tools that came in handy time and again.","archived":false,"fork":false,"pushed_at":"2023-08-19T23:48:20.000Z","size":640,"stargazers_count":28,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-08-25T02:38:49.125Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tfranzel.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-12-12T11:32:34.000Z","updated_at":"2025-07-23T20:29:41.000Z","dependencies_parsed_at":"2024-10-23T04:54:30.047Z","dependency_job_id":"fe0b6b70-1a0f-4bd6-a432-90dacffeff82","html_url":"https://github.com/tfranzel/django-seriously","commit_stats":{"total_commits":27,"total_committers":1,"mean_commits":27.0,"dds":0.0,"last_synced_commit":"520c271ebe4998507ab75fc9ca6c23dcd3dea093"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/tfranzel/django-seriously","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tfranzel%2Fdjango-seriously","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tfranzel%2Fdjango-seriously/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tfranzel%2Fdjango-seriously/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tfranzel%2Fdjango-seriously/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tfranzel","download_url":"https://codeload.github.com/tfranzel/django-seriously/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tfranzel%2Fdjango-seriously/sbom","scorecard":{"id":875948,"data":{"date":"2025-08-11","repo":{"name":"github.com/tfranzel/django-seriously","commit":"15bb1abc18b7d86b06860fd7c0887f45fd3a9798"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.8,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/ci.yml:1","Warn: no topLevel permission defined: .github/workflows/publish.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/tfranzel/django-seriously/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/tfranzel/django-seriously/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:27: update your workflow using https://app.stepsecurity.io/secureworkflow/tfranzel/django-seriously/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:28: update your workflow using https://app.stepsecurity.io/secureworkflow/tfranzel/django-seriously/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:32: update your workflow using https://app.stepsecurity.io/secureworkflow/tfranzel/django-seriously/ci.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:39: update your workflow using https://app.stepsecurity.io/secureworkflow/tfranzel/django-seriously/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/tfranzel/django-seriously/publish.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/tfranzel/django-seriously/publish.yml/master?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/ci.yml:15","Warn: pipCommand not pinned by hash: .github/workflows/ci.yml:37","Warn: pipCommand not pinned by hash: .github/workflows/publish.yml:19","Warn: pipCommand not pinned by hash: .github/workflows/publish.yml:20","Info:   0 out of   7 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned","Info:   0 out of   4 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: BSD 3-Clause \"New\" or \"Revised\" License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":0,"reason":"32 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2024-48 / GHSA-fj7x-q9j7-g6q6","Warn: Project is vulnerable to: PYSEC-2022-190 / GHSA-2gwj-7jmv-h26r","Warn: Project is vulnerable to: PYSEC-2023-13 / GHSA-2hrw-hx67-34x6","Warn: Project is vulnerable to: PYSEC-2022-1 / GHSA-53qw-q765-4fww","Warn: Project is vulnerable to: PYSEC-2021-98 / GHSA-68w8-qjq3-2gfm","Warn: Project is vulnerable to: PYSEC-2022-20 / GHSA-6cw3-g6wv-c2xv","Warn: Project is vulnerable to: PYSEC-2023-225 / GHSA-7h4p-27mh-hmrw","Warn: Project is vulnerable to: GHSA-7xr5-9hcq-chf9","Warn: Project is vulnerable to: PYSEC-2022-2 / GHSA-8c5j-9r9f-c6w8","Warn: Project is vulnerable to: PYSEC-2022-245 / GHSA-8x94-hmjh-97hq","Warn: Project is vulnerable to: PYSEC-2022-19 / GHSA-95rw-fx8r-36v6","Warn: Project is vulnerable to: PYSEC-2023-226 / GHSA-h8gc-pgj2-vjm3","Warn: Project is vulnerable to: PYSEC-2023-100 / GHSA-jh3w-4vvf-mjgr","Warn: Project is vulnerable to: PYSEC-2022-3 / GHSA-jrh2-hc4r-7jwx","Warn: Project is vulnerable to: PYSEC-2022-213 / GHSA-p64x-8rxx-wf6q","Warn: Project is vulnerable to: PYSEC-2021-99 / GHSA-p99v-5w3c-jqq9","Warn: Project is vulnerable to: PYSEC-2023-12 / GHSA-q2jf-h9jm-m7p4","Warn: Project is vulnerable to: PYSEC-2021-8 / GHSA-qm57-vhq3-3fwf","Warn: Project is vulnerable to: PYSEC-2023-222 / GHSA-qmf9-6jqf-j8fq","Warn: Project is vulnerable to: PYSEC-2022-304 / GHSA-qrw5-5h28-6cmg","Warn: Project is vulnerable to: PYSEC-2023-61 / GHSA-r3xc-prgr-mg9p","Warn: Project is vulnerable to: GHSA-rrqc-c2jx-6jgv","Warn: Project is vulnerable to: PYSEC-2021-7 / GHSA-rxjp-mfm9-w4wr","Warn: Project is vulnerable to: PYSEC-2021-439 / GHSA-v6rh-hp5x-86rv","Warn: Project is vulnerable to: PYSEC-2024-47 / GHSA-vm8q-m57g-pff3","Warn: Project is vulnerable to: PYSEC-2022-191 / GHSA-w24h-v9qh-8gxj","Warn: Project is vulnerable to: PYSEC-2021-109 / GHSA-xpfp-f569-q3p2","Warn: Project is vulnerable to: PYSEC-2024-28 / GHSA-xxj9-f6rv-m3x4","Warn: Project is vulnerable to: GHSA-gw84-84pc-xp82","Warn: Project is vulnerable to: PYSEC-2021-47 / GHSA-5jqp-qgf6-3pvh","Warn: Project is vulnerable to: GHSA-mr82-8j83-vxmv","Warn: Project is vulnerable to: PYSEC-2022-43017 / GHSA-qwmp-2cf2-g9g6"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-24T05:59:45.081Z","repository_id":57421857,"created_at":"2025-08-24T05:59:45.082Z","updated_at":"2025-08-24T05:59:45.082Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273094630,"owners_count":25044533,"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","status":"online","status_checked_at":"2025-09-01T02:00:09.058Z","response_time":120,"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":[],"created_at":"2024-10-03T12:59:11.502Z","updated_at":"2025-09-01T08:49:41.728Z","avatar_url":"https://github.com/tfranzel.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"================\ndjango-seriously\n================\n\n|build-status| |pypi-version|\n\n    ... wait what? no seriously, why isn't that part of Django/DRF?\n\nOpinionated collection of `Django`_ and `Django REST framework`_ tools that came in handy time and again.\n\n- ``AdminItemAction``\n    - Allow triggering context-aware custom admin operations in model list views.\n\n- ``admin_navigation_link``\n    - Allow navigation from the admin list view to other related models via links.\n\n- ``MinimalUser`` (abstract model)\n    - Bare minimum user model ready for customization.\n    - Removes the username and auxiliary fields like ``first_name`` and ``last_name``.\n    - Allow creating users without a valid password (unusable password)\n    - Abstract since its highly recommended to subclass the user model anyway.\n\n- ``ValidatedJSONField`` (model field)\n    - validate the structure of JSON fields with Pydantic models.\n\n- ``TokenAuthentication``\n    - When OAuth2 adds too much complexity, DRF's TokenAuthentication is too simple, and\n      `django-rest-knox`_ does not quite fit the permissioning.\n    - No plain passwords in database (PBKDF2, i.e. hashed and salted)\n    - Enabled for permission scoping\n    - Easy (one-time-view) token creation in Django admin\n\n- ``BaseModel`` (abstract model)\n    - Reusable base model with automatic ``created_at``, ``updated_at`` fields.\n    - Primary key is a random UUID (``uuid4``).\n    - Ensure validation logic (``full_clean()``) always runs, not just in a subset of cases.\n\n- ``AppSettings``\n    - A settings container with defaults and string importing inspired by DRF's ``APISettings``\n\n\nLicense\n-------\n\nProvided by `T. Franzel \u003chttps://github.com/tfranzel\u003e`_, `Licensed under 3-Clause BSD \u003chttps://github.com/tfranzel/django-seriously/blob/master/LICENSE\u003e`_.\n\nRequirements\n------------\n\n-  Python \u003e= 3.6\n-  Django \u003e= 3.0\n-  Django REST Framework (optional)\n\nInstallation\n------------\n\n.. code:: bash\n\n    $ pip install django-seriously\n\n\nDemo\n----\n\nShowcasing ``AdminItemAction``, ``admin_navigation_link``, ``MinimalUser`` and ``TokenAuthentication``\n\n.. image:: https://github.com/tfranzel/django-seriously/blob/master/docs/demo.gif\n\nUsage\n-----\n\n``AdminItemAction``\n===================\n\n.. code:: python\n\n    # admin.py\n    from django_seriously.utils.admin import AdminItemAction\n\n\n    class UserAdminAction(AdminItemAction[User]):\n        model_cls = User\n        actions = [\n            (\"reset_invitation\", \"Reset Invitation\"),\n        ]\n\n        @classmethod\n        def is_actionable(cls, obj: User, action: str) -\u003e bool:\n            # check whether action should be shown for this item\n            if action == \"reset_invitation\":\n                return is_user_resettable_check(obj) # your code\n            return False\n\n        def perform_action(self, obj: User, action: str) -\u003e Any:\n            # perform the action on the item\n            if action == \"reset_invitation\":\n                perform_your_resetting(obj)  # your code\n                obj.save()\n\n\n    @admin.register(User)\n    class UserAdmin(ModelAdmin):\n        # insert item actions into a list view column\n        list_display = (..., \"admin_actions\")\n\n        def admin_actions(self, obj: User):\n            return UserAdminAction.action_markup(obj)\n\n.. code:: python\n\n    # urls.py\n    from django_seriously.utils.admin import AdminItemAction\n\n    urlpatterns = [\n        ...\n        # item actions must precede regular admin endpoints\n        path(\"admin/\", AdminItemAction.urls()),\n        path(\"admin/\", admin.site.urls),\n    ]\n\n\n``admin_navigation_link``\n=========================\n\n.. code:: python\n\n    # admin.py\n    from django_seriously.utils.admin import admin_navigation_link\n\n    @admin.register(Article)\n    class ArticleAdmin(ModelAdmin):\n        # insert item actions into a list view column\n        list_display = ('id', \"name\", \"author_link\")\n\n        def author_link(self, obj: Article):\n            return admin_navigation_link(obj.author, obj.author.name)\n\n\n``TokenAuthentication``\n=======================\n\n.. code:: python\n\n    # settings.py\n    INSTALLED_APPS = [\n        ...\n        # only required if auth token is not extended by you\n        'django_seriously.authtoken',\n        ...\n    ]\n\n    SERIOUSLY_SETTINGS = {\n        \"AUTH_TOKEN_SCOPES\": [\"test-scope\", \"test-scope2\"]\n    }\n\n    # views.py\n    from django_seriously.authtoken.authentication import TokenAuthentication, TokenHasScope\n\n    class TestViewSet(viewsets.ModelViewSet):\n        ...\n        permission_classes = [TokenHasScope]\n        authentication_classes = [TokenAuthentication]\n        required_scopes = ['test-scope']\n\n\n``MinimalUser``\n===============\n\n.. code:: python\n\n    # models.py\n    from django_seriously.minimaluser.models import MinimalAbstractUser\n    from django_seriously.utils.models import BaseModel\n\n    # BaseModel is optional but adds useful uuid, created_at, updated_at\n    class User(BaseModel, MinimalAbstractUser):\n        pass\n\n    # admin.py\n    from django_seriously.minimaluser.admin import MinimalUserAdmin\n\n    @admin.register(User)\n    class UserAdmin(MinimalUserAdmin):\n        pass\n\n\n.. _Django: https://www.djangoproject.com/\n.. _Django REST framework: https://www.django-rest-framework.org/\n.. _django-rest-knox: https://github.com/James1345/django-rest-knox\n\n.. |pypi-version| image:: https://img.shields.io/pypi/v/django-seriously.svg\n   :target: https://pypi.python.org/pypi/django-seriously\n.. |build-status| image:: https://github.com/tfranzel/django-seriously/actions/workflows/ci.yml/badge.svg\n   :target: https://github.com/tfranzel/django-seriously/actions/workflows/ci.yml","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftfranzel%2Fdjango-seriously","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftfranzel%2Fdjango-seriously","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftfranzel%2Fdjango-seriously/lists"}