{"id":14978567,"url":"https://github.com/dldevinc/ssi-views","last_synced_at":"2026-02-06T13:45:01.694Z","repository":{"id":57470873,"uuid":"336991802","full_name":"dldevinc/ssi-views","owner":"dldevinc","description":"A simple Django application to process SSI includes","archived":false,"fork":false,"pushed_at":"2024-12-23T07:26:00.000Z","size":69,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-12-23T08:27:13.656Z","etag":null,"topics":["django","nginx","ssi"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit-0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dldevinc.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","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-02-08T07:20:38.000Z","updated_at":"2024-12-20T13:05:16.000Z","dependencies_parsed_at":"2023-12-20T14:28:58.710Z","dependency_job_id":"ef9aa939-470b-40a9-989c-7c6a7263045d","html_url":"https://github.com/dldevinc/ssi-views","commit_stats":{"total_commits":44,"total_committers":3,"mean_commits":"14.666666666666666","dds":"0.40909090909090906","last_synced_commit":"7296cfec3c90cfe90b80668d28fbd1871d53c168"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dldevinc%2Fssi-views","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dldevinc%2Fssi-views/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dldevinc%2Fssi-views/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dldevinc%2Fssi-views/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dldevinc","download_url":"https://codeload.github.com/dldevinc/ssi-views/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":233794922,"owners_count":18731360,"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","nginx","ssi"],"created_at":"2024-09-24T13:57:55.508Z","updated_at":"2025-09-21T20:32:28.791Z","avatar_url":"https://github.com/dldevinc.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ssi-views\n\nA simple Django application to process SSI includes.\n\n[![PyPI](https://img.shields.io/pypi/v/ssi-views.svg)](https://pypi.org/project/ssi-views/)\n[![Build Status](https://github.com/dldevinc/ssi-views/actions/workflows/tests.yml/badge.svg)](https://github.com/dldevinc/ssi-views)\n[![Software license](https://img.shields.io/pypi/l/ssi-views.svg)](https://pypi.org/project/ssi-views/)\n\n## Compatibility\n\n-   `python` \u003e= 3.9\n-   `django` \u003e= 3.2\n\n## Features\n\n-   Supported Function-Based and Class-Based Views\n-   One URL pattern ~~to rule them all~~ for all SSI views\n-   Jinja2 support\n\n## Installation\n\nInstall the latest release with pip:\n\n```shell\npip install ssi-views\n```\n\nAdd `ssi_views` to your INSTALLED_APPS in django's `settings.py`:\n\n```python\nINSTALLED_APPS = [\n    \"ssi_views\",\n]\n```\n\nAdd `ssi_views.urls` to your URLconf:\n\n```python\nfrom django.urls import include, path\n\nurlpatterns = [\n    path(\"ssi/\", include(\"ssi_views.urls\")),\n]\n```\n\n## Usage\n\n#### @ssi_view(\"name\")\n\nUse this decorator to register your views (Function-Based or Class-Based).\n\n```python\nfrom ssi_views.decorators import ssi_view\n\n@ssi_view(\"myapp.form\")\ndef form_view(request):\n    ...\n\n@ssi_view(\"myapp.form_cbv\")\nclass SSIFormView(FormView):\n    ...\n```\n\n**NOTE**: The specified name has to be unique.\n\nYou can combine `ssi_view` with other decorators:\n\n```python\n@csrf_exempt\n@require_POST\n@ssi_view(\"myapp.contact_form\")\ndef csrf_exempt_view(request):\n    # ...\n```\n\n#### {% ssi_include %}\n\nTemplate tag to render `\u003c!--# include virtual=\"...\" --\u003e` directive.\n\n```djangotemplate\n{% load ssi_views %}\n\n{% ssi_include \"myapp.form\" %}\n```\n\nOutput:\n\n```html\n\u003c!--# include virtual=\"/ssi/myapp.form/\" --\u003e\n```\n\n#### {% ssi_url %}\n\nThis tag is used to add SSI URLs in the template files:\n\n```djangotemplate\n{% load ssi_views %}\n\n\u003c!--# include virtual=\"{% ssi_url 'myapp.form' %}\" --\u003e\n```\n\n#### Multiple names\n\nYou can have multiple names for the same view:\n\n```python\nfrom ssi_views.decorators import ssi_view\n\n@ssi_view([\"myapp.form\", \"myapp.fallback\"])\ndef example_view(request):\n    ...\n```\n\n## Jinja2 support\n\nEnable Jinja2 extension\n\n```python\nTEMPLATES = [\n    {\n        \"BACKEND\": \"django.template.backends.jinja2.Jinja2\",\n        \"OPTIONS\": {\n            \"extensions\": [\n                ...\n                \"ssi_views.templatetags.ssi_views.SSIIncludeExtension\",\n            ]\n        }\n    }\n]\n```\n\n**NOTE**: If you are using [django-jinja](https://niwinz.github.io/django-jinja/latest/), you don't need to do this.\n\nThe usage is similar to Django, except that `ssi_url` is a global function:\n\n```jinja2\n\u003c!--# include virtual=\"{{ ssi_url('myapp.form') }}\" --\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdldevinc%2Fssi-views","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdldevinc%2Fssi-views","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdldevinc%2Fssi-views/lists"}