{"id":41587899,"url":"https://github.com/botify-labs/django-readonly-field","last_synced_at":"2026-01-24T09:09:26.379Z","repository":{"id":199976955,"uuid":"699252921","full_name":"botify-labs/django-readonly-field","owner":"botify-labs","description":null,"archived":false,"fork":false,"pushed_at":"2026-01-19T19:11:29.000Z","size":348,"stargazers_count":5,"open_issues_count":1,"forks_count":3,"subscribers_count":5,"default_branch":"master","last_synced_at":"2026-01-20T01:05:08.715Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/botify-labs.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":"CONTRIBUTING.rst","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":"AUTHORS.rst","dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-10-02T08:59:52.000Z","updated_at":"2025-08-20T17:59:19.000Z","dependencies_parsed_at":"2024-01-29T20:19:16.484Z","dependency_job_id":"287e11f7-17df-43ab-8475-b9be31132ff6","html_url":"https://github.com/botify-labs/django-readonly-field","commit_stats":null,"previous_names":["botify-labs/django-readonly-field"],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/botify-labs/django-readonly-field","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/botify-labs%2Fdjango-readonly-field","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/botify-labs%2Fdjango-readonly-field/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/botify-labs%2Fdjango-readonly-field/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/botify-labs%2Fdjango-readonly-field/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/botify-labs","download_url":"https://codeload.github.com/botify-labs/django-readonly-field/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/botify-labs%2Fdjango-readonly-field/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28722223,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-24T08:27:05.734Z","status":"ssl_error","status_checked_at":"2026-01-24T08:27:01.197Z","response_time":89,"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":"2026-01-24T09:09:25.170Z","updated_at":"2026-01-24T09:09:26.373Z","avatar_url":"https://github.com/botify-labs.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"=============================\nDjango Readonly Field\n=============================\n\n|pypi| |version| |github| |ci| |doc| |cov| |license|\n\n.. |pypi| image:: https://img.shields.io/pypi/v/django-readonly-field?logo=pypi\u0026logoColor=white\n    :target: https://pypi.org/pypi/django-readonly-field\n    :alt: Deployed to PyPI\n\n.. |version| image:: https://img.shields.io/pypi/pyversions/django-readonly-field?logo=pypi\u0026logoColor=white\n    :target: https://pypi.org/pypi/django-readonly-field\n    :alt: Python library\n\n.. |github| image:: https://img.shields.io/github/stars/botify-labs/django-readonly-field?logo=github\n    :target: https://github.com/botify-labs/django-readonly-field/\n    :alt: GitHub Repository\n\n.. |ci| image:: https://img.shields.io/github/actions/workflow/status/botify-labs/django-readonly-field/ci.yml?logo=github\u0026branch=main\n    :target: https://github.com/botify-labs/django-readonly-field/actions?workflow=CI\n    :alt: Continuous Integration\n\n.. |doc| image:: https://img.shields.io/readthedocs/django-readonly-field/stable?logo=read-the-docs\u0026logoColor=white\n    :target: https://django-readonly-field.readthedocs.io/\n    :alt: Documentation\n\n.. |cov| image:: https://raw.githubusercontent.com/botify-labs/django-readonly-field/python-coverage-comment-action-data/badge.svg\n    :target: https://github.com/botify-labs/django-readonly-field/tree/python-coverage-comment-action-data\n    :alt: Coverage\n\n.. |license| image:: https://img.shields.io/github/license/botify-labs/django-readonly-field?logo=open-source-initiative\u0026logoColor=white\n    :target: https://github.com/botify-labs/django-readonly-field/blob/master/LICENSE\n    :alt: MIT License\n\nMake some Django model fields readonly. In other words, it lets you tell Django to\nread some fields from your database, but never try to write those back. It can be\nuseful if your fields are populated by triggers or something.\n\nRequirements\n------------\n\n+ **Postgresql only**\n+ Django, tested from 4.2 to 5.1\n+ With Python, tested from 3.8 to 3.12\n\nDocumentation\n-------------\n\nThe full documentation is at https://django-readonly-field.readthedocs.org.\n\nQuickstart\n----------\n\nInstall Django Readonly Field::\n\n    pip install django-readonly-field\n\nIn your ``settings.py`` :\n\n.. code-block:: python\n\n    INSTALLED_APPS = [\n        # ...\n        \"django_readonly_field\",\n    ]\n\nIn the model where you want some fields to be read-only:\n\n.. code-block:: python\n\n    class Spaceship(models.Model):\n        name = models.CharField(max_length=100)\n        color = models.CharField(max_length=16)\n\n        class ReadonlyMeta:\n            readonly = [\"color\"]\n\nThat's it. Now, Django won't try to write the ``color`` field on the database.\n\n\nWarning\n-------\n\nDjango won't try to write those fields. Consequence is that your Database\n**must** be ok with Django not writing those fields. They should either\nbe nullable or have a database default or be filled by a trigger, otherwise\nyou will get an ``IntegrityError``.\n\nDon't forget that Django model field defaults won't become database defaults.\nYou might have to write an SQL migration for this.\n\n\nRunning Tests\n--------------\n\nYou will need a usable Postgresql database in order to test the project.\n\n::\n\n    source \u003cYOURVIRTUALENV\u003e/bin/activate\n    export DATABASE_URL=postgres://USER:PASSWORD@HOST:PORT/NAME\n    (myenv) $ pip install -r requirements.txt\n\nRun tests for a specific version\n\n::\n\n    (myenv) $ pytest\n\n\nRun tests for all versions (if tox is installed globally, you don't need a\nvirtual environment)\n\n::\n\n    $ tox\n\n\nCredits\n---------\n\nThis repository was once available at `peopledoc/django-readonly-field \u003chttps://github.com/peopledoc/django-readonly-field\u003e`_.\n\nTools used in rendering this package:\n\n*  Cookiecutter_\n*  `cookiecutter-djangopackage`_\n\n.. _Cookiecutter: https://github.com/audreyr/cookiecutter\n.. _`cookiecutter-djangopackage`: https://github.com/pydanny/cookiecutter-djangopackage\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbotify-labs%2Fdjango-readonly-field","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbotify-labs%2Fdjango-readonly-field","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbotify-labs%2Fdjango-readonly-field/lists"}