{"id":19940702,"url":"https://github.com/ricardofalasca/deep-pages","last_synced_at":"2026-04-14T06:33:04.166Z","repository":{"id":62567444,"uuid":"126093338","full_name":"ricardofalasca/deep-pages","owner":"ricardofalasca","description":"Django's database stored web content processor","archived":false,"fork":false,"pushed_at":"2019-10-18T16:23:39.000Z","size":87,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-30T08:51:20.019Z","etag":null,"topics":["database","deep-pages","django","middleware","pageview","signal","template-tags","templates"],"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/ricardofalasca.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}},"created_at":"2018-03-20T22:58:45.000Z","updated_at":"2019-10-18T16:23:41.000Z","dependencies_parsed_at":"2022-11-03T19:10:29.472Z","dependency_job_id":null,"html_url":"https://github.com/ricardofalasca/deep-pages","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/ricardofalasca/deep-pages","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ricardofalasca%2Fdeep-pages","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ricardofalasca%2Fdeep-pages/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ricardofalasca%2Fdeep-pages/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ricardofalasca%2Fdeep-pages/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ricardofalasca","download_url":"https://codeload.github.com/ricardofalasca/deep-pages/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ricardofalasca%2Fdeep-pages/sbom","scorecard":{"id":774922,"data":{"date":"2025-08-11","repo":{"name":"github.com/ricardofalasca/deep-pages","commit":"d1b2a48f62c31e20d767df5c6345e07e4d05290d"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"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":"Dangerous-Workflow","score":-1,"reason":"no workflows found","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":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"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":"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":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"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":"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":"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":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"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: MIT 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":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"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"}}]},"last_synced_at":"2025-08-23T03:18:20.183Z","repository_id":62567444,"created_at":"2025-08-23T03:18:20.183Z","updated_at":"2025-08-23T03:18:20.183Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31785601,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-14T02:24:21.117Z","status":"ssl_error","status_checked_at":"2026-04-14T02:24:20.627Z","response_time":153,"last_error":"SSL_read: 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":["database","deep-pages","django","middleware","pageview","signal","template-tags","templates"],"created_at":"2024-11-13T00:06:31.169Z","updated_at":"2026-04-14T06:33:04.142Z","avatar_url":"https://github.com/ricardofalasca.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# deep-pages\nDjango's database stored web content processor\n\n## About\nMy motivation to create this small package raises when I was needing to create some small pages with static URL and want to use some template tags. So, unfortunatelly Django's Flat Pages wasn't enough in my case.\n\nOk, so what the DeepPages does? With DeepPages you can store a page (or any other text-based content) into your database using the `Page` Model, set a static URL to that and get it rendered. Simple.\n\n## How it works?\nDeepPages provides two ways to being used into your Django's project:\n\n### 1. As Middleware\n\nAll you need is add `DeepPageTemplateRendererMiddleware` as a middleware in your `settings`. I really do recommend to insert this middleware in the end of MIDDLEWARE's list.\n\n![As Middleware](https://raw.githubusercontent.com/ricardofalasca/deep-pages/master/docs/how-it-works-as-middleware.jpg)\n\n### 2. As PageView (TemplateView's inheritance)\n\nActually it was the first way that I've created. You need to include DeepPage's url patterns into your project (see Install).\n\n![As Middleware](https://raw.githubusercontent.com/ricardofalasca/deep-pages/master/docs/how-it-works-as-pageview.jpg)\n\n## Signals\n\nDeepPages has three signals that you can connect to workaround. You can import those from `signals.py`.\n\nThey are: `page_requested`, `page_found` and `page_not_found`. \n\n```\nfrom django.dispatch import receiver\nfrom deeppages.signals import page_requested, page_found, page_not_found\n\n@receiver(page_requested)\ndef page_requested_callback(sender, path, request):\n    # do something here\n    pass\n\n\n@receiver(page_not_found)\ndef page_not_found_callback(sender, path, request):\n    # do something here\n    pass\n\n\n@receiver(page_found)\ndef page_found_callback(sender, path, request, page, content, context):\n    # do something here\n```\n\nIn `page_found` signal's receiver you can change the arguments `content` and `context` to get rendered by Middleware or PageView (depending how you've configured in your project).\n\n## Programmatically DeepPages Rendering\n\nYou can get a DeepPage rendered programmatically. To do this you just need to import `get_page_by_name` function from `utils.py`.\n\nFunction statement:\n```\ndef get_page_by_name(name, context=None, callback=None)\n```\n\nWhere:\n - name = Page name\n - context (optional) = A dictionary with context for template processing\n - callback (optional) = A function to be called with arguments `page` and `context` before rendering and should return the new page content.\n\nSo, assuming that you've created a page named as `test-page`, do it:\n\n```\nfrom deeppages.utils import get_page_by_name\n\ndef render():\n    rendered_page = get_page_by_name('test-page', ctx)\n    # do something\n```\n\n## Install\n\n```\npip install deeppages\n```\n\nAfter package install, add `deeppages` in your INSTALLED_APPS list.\n\n```\nINSTALLED_APPS = [\n    ...\n    'deeppages.apps.DeepPagesConfig',\n    ...\n]\n```\n\nIf you want to use the `Middleware way` (personally, it's my preferred btw), open your settings file and look for MIDDLEWARE list.\n\n```\nMIDDLEWARE = [\n   ...\n   'deeppages.middleware.DeepPageTemplateRendererMiddleware',\n]\n```\n\nOr, if you want to use the `PageView way`, you just need to open your project's URL patterns file (`urls.py`) and configure DeepPage as an URL Pattern:\n\n```\nfrom deeppages.views import PageView\n\n\nurlpatterns = [\n    ...\n    url(r'^deeppages/', include(deeppages.urls, namespace='deeppages')),\n    ...\n]\n```\n\nThis way, you can create a page with URL `/test-page/` and it will be found at: `/deeppages/test-page/`.\n\nOf course that you can use as default URL seeker, maybe for small projects it can work fine. For example:\n\n```\nurlpatterns = [\n    ...\n    url(r'', include(deeppages.urls, namespace='deeppages')),\n    ...\n]\n```\n\nOr, if you want to make your own View, you can import the `PageView` class and inherite from that:\n\n```\nfrom deeppages.view import PageView\n\nclass YourNewView(PageView):\n    # do something\n```\n\nAnd your `/test-page/` will be found at `/test-page/` as well.\n\nI'm using this package in a project that I'm developing and isn't under production environment. So, be careful to use this in production.\n\nFeel free to make it better and send your updates/suggestions.\n\nEnjoy.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fricardofalasca%2Fdeep-pages","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fricardofalasca%2Fdeep-pages","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fricardofalasca%2Fdeep-pages/lists"}