All Projects β†’ bittner β†’ django-apptemplates

bittner / django-apptemplates

Licence: MIT license
Django template loader that allows you to load and override a template from a specific Django application.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to django-apptemplates

macaw
🦜 Scalable email templates for Node.js applications.
Stars: ✭ 24 (-44.19%)
Mutual labels:  templates
section-matter
Like front-matter, but allows multiple sections in a single document.
Stars: ✭ 18 (-58.14%)
Mutual labels:  templates
templates
Collection of Conan recipe + CI templates
Stars: ✭ 71 (+65.12%)
Mutual labels:  templates
ProvToolbox
Java library to create and convert W3C PROV data model representations
Stars: ✭ 62 (+44.19%)
Mutual labels:  templates
dotfiles
These are my dotfiles. All the config stuff that I use is here.
Stars: ✭ 16 (-62.79%)
Mutual labels:  templates
laravel-email-templates
Laravel 5 database driven email templates
Stars: ✭ 23 (-46.51%)
Mutual labels:  templates
temply
@temply_bot Telegram bot repository
Stars: ✭ 20 (-53.49%)
Mutual labels:  templates
flutter getx template
πŸ»πŸ€ This is source base for getx flutter. Optimize by lambiengcode
Stars: ✭ 43 (+0%)
Mutual labels:  templates
grafana-dashboards
Collection of reusable Grafana dashboards
Stars: ✭ 55 (+27.91%)
Mutual labels:  templates
clean-code-javascript-ko
πŸ› Clean Code concepts adapted for JavaScript - ν•œκΈ€ λ²ˆμ—­νŒ πŸ‡°πŸ‡·
Stars: ✭ 1,767 (+4009.3%)
Mutual labels:  inheritance
machine-learning-templates
Template codes and examples for Python machine learning concepts
Stars: ✭ 40 (-6.98%)
Mutual labels:  templates
Static-Sort
A simple C++ header-only library for fastest sorting of small arrays. Generates sorting networks on compile time via templates.
Stars: ✭ 30 (-30.23%)
Mutual labels:  templates
qd-templates
εŸΊδΊŽεΌ€ζΊζ–°η‰ˆη­Ύεˆ°ζ‘†ζžΆη«™ε‘εΈƒηš„ε…¬ε…±harζ¨‘ζΏεΊ“οΌŒζ•΄η†θ‡ͺ用 qiandao ζ‘†ζžΆε―η”¨ηš„ε„η§η½‘η«™ε’ŒAppηš„ Har ζ¨‘ζΏοΌŒδ»…δΎ›ε­¦δΉ ε‚θ€ƒγ€‚
Stars: ✭ 77 (+79.07%)
Mutual labels:  templates
dotnet-new-nunit
Project is being maintained by the .NET Team now
Stars: ✭ 33 (-23.26%)
Mutual labels:  templates
ConvNet-OOP
ConvNet Implementation: An Object Oriented Approach using Keras API.
Stars: ✭ 20 (-53.49%)
Mutual labels:  templates
yii2-activerecord-inheritance
ActiveRecord Inheritance is an util to provide the Class Table Inheritance Pattern the to the Yii2 framework
Stars: ✭ 18 (-58.14%)
Mutual labels:  inheritance
smart-github
A chrome extension to further upgrade github's template
Stars: ✭ 17 (-60.47%)
Mutual labels:  templates
global-typelist
How to build and maintain a "global" type-list
Stars: ✭ 22 (-48.84%)
Mutual labels:  templates
hypertag
HTML templates with Python-like concise syntax, code reuse & modularity. The Pythonic way to web templating.
Stars: ✭ 27 (-37.21%)
Mutual labels:  templates
CPTH
🌟 Competitive Programming Template Headers | With documentation, CI tests and Codecov
Stars: ✭ 23 (-46.51%)
Mutual labels:  templates

Django apptemplates Latest version on PyPI

Build status Code health Python versions Software license

django-apptemplates is a Django template loader that allows you to load a template from a specific application. By this you can both extend and override a template at the same time. The default Django loaders require you to copy the entire template you want to override, even if you only want to override one small block.

Based on: http://djangosnippets.org/snippets/1376/

Version Support

django-apptemplates is tested against the officially supported combinations of Python and Django, since Django 1.4 (Django 1.4 to 3.0 on Python 2.7, and 3.4 to 3.8).

Installation, Setup and Use

This package is available from PyPI. To install it simply execute:

$ pip install django-apptemplates

Settings (for Django 1.8+)

TEMPLATES = [
    {
        'BACKEND': 'django.template.backends.django.DjangoTemplates',
        'OPTIONS': {
            'loaders': [
                'apptemplates.Loader',
                'django.template.loaders.filesystem.Loader',
                'django.template.loaders.app_directories.Loader',
            ],
        },
    },
]

Settings (for Django < 1.8)

TEMPLATE_LOADERS = (
    'apptemplates.Loader',
    'django.template.loaders.filesystem.Loader',
    'django.template.loaders.app_directories.Loader',
)

How to Use in Templates

Template usage example (extend and override Django admin base template):

{% extends "admin:admin/base.html" %}

The part before the colon (:) is called the Django app namespace.

Alternatives

Authors and Maintainers

Change Log

1.5

  • Drop support for Django 1.7 (ImportError)
  • Drop support for Python 2.6, 3.2, 3.3 (not available on Travis CI)

1.4

  • Fix Origin missing loader and template_name attrs -- Thanks Brendan Roy, @bmon, and Matthew Somerville, @dracos!
  • Also test against Django 2.0

1.3

  • Add template loader to returned Origins -- Thanks J.J., @jdotjdot!
  • Also test against Python 3.6 -- Thanks Justin Walgran, @jwalgran!

1.2

  • Reestablish support for Django 1.4 through 1.8 (broken since version 1.1)
  • Add tests for template rendering
  • Drop support for Django 1.3 (which cannot be confirmed by tests)
  • Drop support for Python 2.4 and 2.5 (which cannot be tested anymore)

1.1.1

  • Fix ImportError for Django 1.8 (broken in release 1.1)
  • Add integration tests (test import of package across supported versions)
  • Add clean and test commands to setup.py

1.1

  • Use django.template.Origin in computation of template location for Django 1.9 compatibility. -- Thanks, Gilles Crettenand!

1.0

  • Remove Django 1.9 deprecation warning of imports
  • Update README with instructions for Django 1.8+

0.2

Skipped to fix conflicting versioning in setup.py and the PyPI package

0.0.1

  • Released as originally published on djangosnippets
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].