Template model.
Project description
django-template-model
Description
This application will allow you to store templates in your database, and discovering with any Template Engine
Setup
Edit your settings file as follows:
INSTALLED_APPS = [
...
template_model,
]
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [ # your template dirs here
],
'APP_DIRS': False, # Disable auto discovering
'OPTIONS': {
'context_processors': [
'django.contrib.auth.context_processors.auth',
'django.template.context_processors.debug',
'django.template.context_processors.i18n',
'django.template.context_processors.media',
'django.template.context_processors.static',
'django.template.context_processors.tz',
'django.contrib.messages.context_processors.messages',
'django.template.context_processors.request',
],
'loaders': [
'django.template.loaders.filesystem.Loader',
'django.template.loaders.app_directories.Loader',
# add loader here if you want to use it with this backend
'template_model.loader.Loader',
],
},
},
Versions
1.0.5 (2020-06-09)
- Simplify rendering
1.0.4 (2020-06-08)
- Handle text or binary based templates (Compatibility with django-template-engines)
1.0.3 (2020-06-05)
- Delete views / urls and useless restframework dependencies
- Now with loader config, Template are discoverable like any other template
1.0.2 (2020-06-05)
- Add python 3.8 and django 3.0 support
- Add loader to handle Django Template Engine support
1.0.1 (2019-09-24)
Update:
- mimetype and magic are no longer used
1.0.0
From now on, Template
model contains:
- a name (
name
), - a mime type (
mime_type
), - a file (
template_file
), - the date of its creation (
added
), - the date of its last update (
updated
).
0.1.1
This package is compatible with Django>=2.1.0,<3.0.0
et djangorestframework>=3.8.0,<3.11.0
.
0.1.0
From now on, Template
model contains:
- a name,
- a format,
- a content,
- the date of its creation,
- the date of its last update.
0.0.1
Template
model- Admin site
- View set with an additional route to download a template
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Close
Hashes for django-template-model-1.0.5.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 81098e337716521b0e6ff0b3233bbe118d53a30bfd960283de3d4bdd216b2953 |
|
MD5 | 9f4c3726706568f7b086bac07f206ec5 |
|
BLAKE2b-256 | a3ccdf4a036375e7a1d454cc8c9a9cc71739ae38143ca3c68805d243b116c11e |