A Django app to make minor changes to your templates on the fly.
Templates Admin is a tiny, nifty application for your Django project to edit your templates, that are stored on your disk, via an admin interface.
Originally this app was inspired by dbtemplates.
Put templatesadmin into your INSTALLED_APPS setting.
Add this line to your urlconf but before your admin include:
Create a group TemplateAdmins and put all users in there, who should been able to edit templates. You don’t need to grant any permissions to that group. Just call it TemplateAdmins.
Keep in mind that also Superusers (is_admin flag) must belong to this group, if they should been able to edit templates. The group name is case-sensitive!
Point your webbrowser to http://localhost/admin/templatesadmin/ and start editing.
There are some settings that you can override in your settings.py:
TEMPLATESADMIN_GROUP: The name of your group of your TemplatesAdmin Users.
TEMPLATESADMIN_VALID_FILE_EXTENSIONS: A tuple of file-extensions (without the leading dot) that are editable by TemplatesAdmin.
TEMPLATESADMIN_VALID_FILE_EXTENSIONS = ( 'html', 'htm', 'txt', 'css', 'backup' )
TEMPLATESADMIN_TEMPLATE_DIRS: A tuple of directories you want your users to edit, instead of all templates.
Default: All user-defined and application template-dirs.
TEMPLATESADMIN_HIDE_READONLY: A boolean to wether enable or disable displaying of read-only templates.
TEMPLATESADMIN_EDITHOOKS: A tuple of callables edithooks. Edithooks are a way to interact with changes made on a template. Think of a plugin system.
There are two builtin edithooks:
You can define your own edithooks, see above hooks as example.
TEMPLATESADMIN_EDITHOOKS = ( 'templatesadmin.edithooks.dotbackupfiles.DotBackupFilesHook', )
This application is licensed under the Beerware License. See LICENSE for details.