{"id":13797829,"url":"https://github.com/edigiacomo/django-statusboard","last_synced_at":"2025-04-09T07:07:50.390Z","repository":{"id":46157955,"uuid":"78775187","full_name":"edigiacomo/django-statusboard","owner":"edigiacomo","description":"A django based status page.","archived":false,"fork":false,"pushed_at":"2025-03-12T13:53:19.000Z","size":1785,"stargazers_count":43,"open_issues_count":4,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-29T02:29:08.766Z","etag":null,"topics":["django","python","web"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/edigiacomo.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2017-01-12T18:35:32.000Z","updated_at":"2025-03-12T13:53:00.000Z","dependencies_parsed_at":"2023-11-28T11:26:58.919Z","dependency_job_id":"ffb187c0-26e6-4f53-91a0-261eb69e5e29","html_url":"https://github.com/edigiacomo/django-statusboard","commit_stats":{"total_commits":612,"total_committers":7,"mean_commits":87.42857142857143,"dds":0.2679738562091504,"last_synced_commit":"845ef1b8a99517fce146bf2aacc8b440a175fef2"},"previous_names":[],"tags_count":60,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edigiacomo%2Fdjango-statusboard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edigiacomo%2Fdjango-statusboard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edigiacomo%2Fdjango-statusboard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edigiacomo%2Fdjango-statusboard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/edigiacomo","download_url":"https://codeload.github.com/edigiacomo/django-statusboard/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247451640,"owners_count":20940939,"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":["django","python","web"],"created_at":"2024-08-04T00:00:34.156Z","updated_at":"2025-04-09T07:07:50.367Z","avatar_url":"https://github.com/edigiacomo.png","language":"Python","funding_links":[],"categories":["Opensource"],"sub_categories":[],"readme":"# statusboard\n\n[![Build Status](https://github.com/edigiacomo/django-statusboard/actions/workflows/build.yml/badge.svg?branch=main)](https://github.com/edigiacomo/django-statusboard/actions/workflows/build.yml)\n[![Pypi](https://img.shields.io/pypi/v/django-statusboard.svg)](https://pypi.python.org/pypi/django-statusboard/)\n[![codecov](https://codecov.io/gh/edigiacomo/django-statusboard/branch/main/graph/badge.svg)](https://codecov.io/gh/edigiacomo/django-statusboard)\n[![Documentation Status](https://readthedocs.org/projects/django-statusboard/badge/?version=stable)](https://django-statusboard.readthedocs.io/en/stable/?badge=stable)\n\nStatus page application with browser and REST API interface.\n\n![screenshot](screenshot.png)\n\n## Installation\n\nInstall the package\n\n```sh\npip install django-statusboard\n```\n\nAdd the following applications to your Django projects\n\n```python\nINSTALLED_APPS += [\n    'django.contrib.humanize',\n    'django.contrib.staticfiles',\n    'rest_framework',\n    'statusboard',\n]\n```\n\nUpdate your urlconf:\n\n```python\n# myproject/urls.py\nurlpatterns += [\n    url(r'^statusboard/$', include('statusboard.urls')),\n]\n```\n\nUpdate your database\n\n```sh\n./manage migrate\n```\n\n## Configuration\n\nYou can configure the app using the dict `STATUSBOARD` in `settings.py`:\n\n```python\nfrom django.templatetags.static import static\n\nSTATUSBOARD = {\n    \"INCIDENT_DAYS_IN_INDEX\": 7,\n    \"OPEN_INCIDENT_IN_INDEX\": True,\n    \"AUTO_REFRESH_INDEX_SECONDS\": 0,\n    \"FAVICON_DEFAULT\": static('statusboard/images/statusboard-icon-default.png'),\n    \"FAVICON_INDEX_DICT\": {\n        0: static('statusboard/images/statusboard-icon-operational.png'),\n        1: static('statusboard/images/statusboard-icon-performance.png'),\n        2: static('statusboard/images/statusboard-icon-partial.png'),\n        3: static('statusboard/images/statusboard-icon-major.png'),\n    },\n}\n```\n\n* `INCIDENT_DAYS_IN_INDEX`: number of days to show in index (1 = today).\n* `OPEN_INCIDENT_IN_INDEX`: show not fixed incidents in index, whether or not\n  the incident is older than `INCIDENT_DAYS_IN_INDEX`.\n* `AUTO_REFRESH_INDEX_SECONDS`: auto refresh home page every N seconds (0 = disabled).\n* `FAVICON_DEFAULT`: default favicon.\n* `FAVICON_INDEX_DICT`: favicon for index, based on the worst status (default:\n  `FAVICON_DEFAULT`). The keys `(0, 1, 2, 3)` are the status values (see `SERVICE_STATUSES` in `statusboard/models.py`).\n\n## Internationalization and localization\n\n`django-statusboard` supports the following languages:\n\n* English\n* Italian\n\n## Customize pages\n\nThe following blocks are customizable in `statusboard/base.html`:\n\n* `title`: title of the page\n* `branding`: branding in fixed navbar\n* `bootstrap_theme`: bootstrap theme\n* `header`: header of the page\n* `userlinks`: links in the header\n* `footer`: footer div\n* `style`: `CSS` files\n* `script`: JavaScript files\n\nTo customize the default style, create the file `statusboard/base.html` that\nextends the original base template and customize some blocks, e.g.:\n\n```\n{% extends \"statusboard/base.html\" %}\n\n{% load static %}\n\n{% block title %}\nA.C.M.E. statuspage\n{% endblock %}\n\n{% block branding %}\n\u003ca class=\"navbar-brand\" href=\"{% url 'statusboard:index' %}\"\u003e\u003cimg src=\"{% static \"/images/logo.png\" %}\"\u003e\u003c/a\u003e\n{% endblock %}\n\n{% block bootstrap_theme %}\n\u003clink rel=\"stylesheet\" href=\"{% static \"/statusboard/css/spacelab-bootstrap.min.css\" %}\" /\u003e\n\u003clink rel=\"stylesheet\" href=\"{% static \"/css/mystyle.css\" %}\" /\u003e\n{% endblock %}\n```\n\n### Example: change branding and title\n\nCreate a `statusboard/base.html` in one of your templates dir:\n\n```\n{% extends `statusboard/base.html %}\n\n{% block title %}\nACME, Inc.\n{% endblock %}\n\n{% block branding %}\n\u003ca class=\"navbar-brand\" href=\"{% url 'statusboard:index' %}\"\u003eACME status\u003c/a\u003e\n{% endblock %}\n```\n\n## Notifications\n\n`django-statusboard` doesn't provide an out-of-the-box notification system, but\nit's easy to implement using [django signals](https://docs.djangoproject.com/en/dev/topics/signals/) or you can use [django-statusboard-notify](https://github.com/edigiacomo/django-statusboard-notify) that provides some builtin notifications (e.g. email, Telegram).\n\nMoreover, `django-statusboard` tracks the previous status of a service\n(`Service._status`).\n\n```python\nfrom django.dispatch import receiver\nfrom django.db.models.signals import post_save\nfrom django.core.mail import mail_admins\n\nfrom statusboard import Service\n\n@receiver(post_save, sender=Service)\ndef notify_service_update(sender, instance, **kwargs):\n    # Send an email to admins if the service is getting worse, otherwise do nothing.\n    if instance.status \u003e instance._status:\n        mail_admins(\"Alert\", \"Service {} is {}\".format(instance.name, instance.get_status_display()))\n```\n\n## REST API\n\n`django-statusboard` comes with a set of REST API to manage its models, based on [Django REST Framework](https://www.django-rest-framework.org/) `ModelViewSet`:\n\n* `/api/v0.1/servicegroup/`\n* `/api/v0.1/service/`\n* `/api/v0.1/incident/`\n* `/api/v0.1/incidentupdate/`\n* `/api/v0.1/maintenance/`\n\n## Development\n\n### Running tests\n\n```\n$ DJANGO_SETTINGS_MODULE=tests.test_settings python manage.py test\n```\n\n### Update i18n\n\n```\n$ cd statusboard \u0026\u0026 django-admin makemessages -l LOCALE\n```\n\n\n\n## Contact and copyright information\n\nCopyright (C) 2019-2023 Emanuele Di Giacomo \u003cemanuele@digiacomo.cc\u003e\n\ndjango-statusboard is licensed under GPLv2+.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedigiacomo%2Fdjango-statusboard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fedigiacomo%2Fdjango-statusboard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedigiacomo%2Fdjango-statusboard/lists"}