Skip to main content

A package that makes possible the integration of Jinja2 in Django, in a clean way.

Project description

Djinja tries to integrate Jinja2 in Django. The aim is to replace completely the Django’s template system, including administration.

Currently, the following templating modules have been written and are working:

  • Django administration

  • Django Debug Toolbar

Also, is planned to implement one Django management command (NOT CURRENTLY):

  • compiletemplates: Compile the Jinja2 templates for completely fast views in your website.

If you have ideas please let us know.

Installation

  1. Add the djinja directory to your Python path.

  2. Add the following template loader to your project’s settings.py file:

    'djinja.template.loaders.Loader',

    Tying into template loaders allows Djinja to manage automatically ALL the templates with Jinja2 (including Django templates)

    Note: If you don’t install djinja.contrib.admin when you try to access to the Django administration you will get an error, this is caused because the Django administration templates are not adapted for Jinja2.

  3. That’s all! ;)

IMPORTANT: You have to adapt your website templates to Jinja2 or you will get an error when rendering.

Configuration

No configuration for now, but is expected in next releases.

Administration

For install the Django administration Jinja2 templating just add

'djinja.contrib.admin',

before ‘django.contrib.admin’ in your INSTALLED_APPS in settings.py.

Example configuration:

INSTALLED_APPS = (
    ...
    'djinja.contrib.admin',
    'django.contrib.admin',
    ...
)

Django Debug Toolbar

For install the Django Debug Toolbar Jinja2 templating just add

'djinja.contrib.debug_toolbar',

before ‘debug_toolbar’ in your INSTALLED_APPS in settings.py.

Example configuration:

INSTALLED_APPS = (
    ...
    'djinja.contrib.debug_toolbar',
    'debug_toolbar',
    ...
)

TODOs and BUGS

See: http://github.com/syrusakbary/djinja/issues

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

Djinja-0.2.1.tar.gz (29.0 kB view details)

Uploaded Source

Built Distribution

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

Djinja-0.2.1.macosx-10.6-x86_64.exe (112.6 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: Djinja-0.2.1.tar.gz
  • Upload date:
  • Size: 29.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for Djinja-0.2.1.tar.gz
Algorithm Hash digest
SHA256 8f7a5cf86b244d1b7225a017ad5327b3eae9c2d8280d2e44ddf894c3b88e99d2
MD5 bc22590c8792951ec8ebb763a8f8b444
BLAKE2b-256 cb9cd32e6389740c2ef643162a399088e146a4b37b58914475ffb69e222f76da

See more details on using hashes here.

File details

Details for the file Djinja-0.2.1.macosx-10.6-x86_64.exe.

File metadata

File hashes

Hashes for Djinja-0.2.1.macosx-10.6-x86_64.exe
Algorithm Hash digest
SHA256 76cd777953c5086b3f8d2079122de3f2c90d8f0ea3dac4581f875c95aa505da0
MD5 0b161d86e321f99fdd958e120e4aaeb2
BLAKE2b-256 13ef9bc9d705e1d62e29683ca6705effaaaeb40ef306b5ff70f315bd6f668db2

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