Skip to main content

Hacky Jinja plugin that allows other jinja extensions to be loaded from the extensions directory of the repo

Project description

============================
Cookiecutter Repo Extensions
============================


.. image:: https://img.shields.io/pypi/v/cookiecutter_repo_extensions.svg
:target: https://pypi.python.org/pypi/cookiecutter_repo_extensions

.. image:: https://img.shields.io/travis/ilsken/cookiecutter_repo_extensions.svg
:target: https://travis-ci.org/ilsken/cookiecutter_repo_extensions

.. image:: https://readthedocs.org/projects/cookiecutter-repo-extensions/badge/?version=latest
:target: https://cookiecutter-repo-extensions.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status

.. image:: https://pyup.io/repos/github/ilsken/cookiecutter_repo_extensions/shield.svg
:target: https://pyup.io/repos/github/ilsken/cookiecutter_repo_extensions/
:alt: Updates


Hacky Jinja plugin that allows other jinja extensions to be loaded from the extensions directory of the repo. Just install it and add this module to the `_extensions` array of your `cookiecutter.json` before all other repo extensions.

.. code-block::
{ "_extensions": [ "cookiecutter_repo_extensions:Extension", "ccext:TemplateUtils" ] }

.. code-block::
# in template/extensions/ccext.py:
# -*- coding: utf-8 -*-

from jinja2.ext import Extension


def split(value):
return map(str.strip, value.split(','))

class TemplateUtils(Extension):
def __init__(self, environment):
super(TemplateUtils, self).__init__(environment)
environment.filters['split'] = split


* Free software: MIT license
* Documentation: https://cookiecutter-repo-extensions.readthedocs.io.


Features
--------

* TODO

Credits
---------

This package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.

.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage



=======
History
=======

0.1.0 (2017-10-27)
------------------

* First release on PyPI.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cookiecutter_repo_extensions-0.2.1.tar.gz (13.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cookiecutter_repo_extensions-0.2.1-py2.py3-none-any.whl (5.2 kB view details)

Uploaded Python 2Python 3

File details

Details for the file cookiecutter_repo_extensions-0.2.1.tar.gz.

File metadata

File hashes

Hashes for cookiecutter_repo_extensions-0.2.1.tar.gz
Algorithm Hash digest
SHA256 d13c0db51274c89d627f79230100f4c08d6fdb08fbd34205e672e9b9722c765b
MD5 882fc7345cc5b6d0ceb0e3293a24fe21
BLAKE2b-256 dd97de582a94c92a32b376054903fe8c8661c3c5d02698b6f4def920f76db4a8

See more details on using hashes here.

File details

Details for the file cookiecutter_repo_extensions-0.2.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for cookiecutter_repo_extensions-0.2.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 fd6d9bedeaf88ed5c6b1bbe3df4e11b43a867aa5b62f6eb9f3583a8a07cb1e03
MD5 df245f1ebe829349b25c46c6a7cb244e
BLAKE2b-256 61684eaa321ae5301172d8f158d7c8b1f8b1b2c4026320fb9f95ffe669262b72

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page