Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Django Support #57

Open
adjivas opened this issue Aug 26, 2022 · 2 comments
Open

Django Support #57

adjivas opened this issue Aug 26, 2022 · 2 comments

Comments

@adjivas
Copy link

adjivas commented Aug 26, 2022

Hello,

thank you for your work :)

Plim is it usable with Django?

With guidances I will be happy to providing pull request in Plim for support Django

@avanov
Copy link
Owner

avanov commented Sep 15, 2022

Hi @adjivas

Plim is a pre-processor library for Mako template engine, and technically any library that integrates Mako with Django should be able to use it as a pre-processor as well. Quick googling got me this result, but I haven't tried it.

@HuangWeiQiang
Copy link

It works when using djangomako. Thanks a lot.

## settings.py
import plim
TEMPLATES = [
    ...
    {
        'BACKEND': 'djangomako.backends.MakoBackend',
        'NAME': 'mako',
        'DIRS': [
            os.path.join(BASE_DIR, 'myapp', 'templates'),
        ],
        'OPTIONS': {
            'preprocessor': plim.preprocessor,
        },
    },
    ...
]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants