{"id":21001448,"url":"https://github.com/divio/aldryn-snake","last_synced_at":"2025-05-14T23:32:38.694Z","repository":{"id":13050807,"uuid":"15730899","full_name":"divio/aldryn-snake","owner":"divio","description":"Aldryn Snake adds tail and head context processors for addons similar to django-sekizai","archived":false,"fork":false,"pushed_at":"2020-09-03T09:12:12.000Z","size":20,"stargazers_count":0,"open_issues_count":0,"forks_count":3,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-04-23T11:19:23.166Z","etag":null,"topics":["addon","cloud","divio","django","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/divio.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.rst","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":"2014-01-08T09:23:43.000Z","updated_at":"2020-09-03T09:11:21.000Z","dependencies_parsed_at":"2022-09-26T18:51:53.047Z","dependency_job_id":null,"html_url":"https://github.com/divio/aldryn-snake","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/divio%2Faldryn-snake","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/divio%2Faldryn-snake/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/divio%2Faldryn-snake/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/divio%2Faldryn-snake/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/divio","download_url":"https://codeload.github.com/divio/aldryn-snake/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254248440,"owners_count":22039008,"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":["addon","cloud","divio","django","python"],"created_at":"2024-11-19T08:15:20.960Z","updated_at":"2025-05-14T23:32:33.627Z","avatar_url":"https://github.com/divio.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"============\nAldryn Snake\n============\n\n|pypi| |build| |coverage|\n\n**Aldryn Snake** adds tail and head context processors for addons similar to\n`django-sekizai \u003chttps://github.com/divio/django-sekizai\u003e`_.\n\nThis addon still uses the legacy \"Aldryn\" naming. You can read more about this in our\n`support section \u003chttps://support.divio.com/general/faq/essential-knowledge-what-is-aldryn\u003e`_.\n\n\nContributing\n============\n\nThis is a an open-source project. We'll be delighted to receive your\nfeedback in the form of issues and pull requests. Before submitting your\npull request, please review our `contribution guidelines\n\u003chttp://docs.django-cms.org/en/latest/contributing/index.html\u003e`_.\n\nWe're grateful to all contributors who have helped create and maintain this package.\nContributors are listed at the `contributors \u003chttps://github.com/divio/aldryn-snake/graphs/contributors\u003e`_\nsection.\n\n\nDocumentation\n=============\n\nSee ``REQUIREMENTS`` in the `setup.py \u003chttps://github.com/divio/aldryn-snake/blob/master/setup.py\u003e`_\nfile for additional dependencies:\n\n|python| |django|\n\n\nInstallation\n------------\n\n* add ``aldryn_snake.template_api.template_processor`` to your TEMPLATE_CONTEXT_PROCESSORS settings\n* somewhere in your app (that will be imported on startup (models, admin etc) add something to the api::\n\n        from aldryn_snake.template_api import registry\n    from django.conf import settings\n\n    OPTIMIZELY_SCRIPT = \"\"\"\u003cscript src=\"//cdn.optimizely.com/js/%(account_number)s.js\"\u003e\u003c/script\u003e\"\"\"\n\n\n    def get_crazyegg_script():\n      optimizely_number = getattr(settings, 'OPTIMIZELY_ACCOUNT_NUMBER', None)\n      if optimizely_number:\n          return OPTIMIZELY_SCRIPT % {'account_number': optimizely_number}\n       else:\n          return ''\n\n    registry.add_to_tail(get_crazyegg_script())\n\n\nIf ``add_to_tail`` or ``add_to_head`` receive a callable, it will be called with the ``request``\nkeyword argument.\n\n\n* add the following in your base template to the HEAD::\n\n    {{ ALDRYN_SNAKE.render_head }}\n\n* add the following in your base template right above \u003c/BODY\u003e::\n\n    {{ ALDRYN_SNAKE.render_tail }}\n\n\nRunning Tests\n-------------\n\nYou can run tests by executing::\n\n    virtualenv env\n    source env/bin/activate\n    pip install -r tests/requirements.txt\n    python setup.py test\n\n\n.. |pypi| image:: https://badge.fury.io/py/aldryn-snake.svg\n    :target: http://badge.fury.io/py/aldryn-snake\n.. |build| image:: https://travis-ci.org/divio/aldryn-snake.svg?branch=master\n    :target: https://travis-ci.org/divio/aldryn-snake\n.. |coverage| image:: https://codecov.io/gh/divio/aldryn-snake/branch/master/graph/badge.svg\n    :target: https://codecov.io/gh/divio/aldryn-snake\n\n.. |python| image:: https://img.shields.io/badge/python-3.5+-blue.svg\n    :target: https://pypi.org/project/aldryn-snake/\n.. |django| image:: https://img.shields.io/badge/django-2.2,%203.0,%203.1-blue.svg\n    :target: https://www.djangoproject.com/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdivio%2Faldryn-snake","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdivio%2Faldryn-snake","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdivio%2Faldryn-snake/lists"}