Templates Admin
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.
Installation:
Put templatesadmin into your INSTALLED_APPS setting.
Add this line to your urlconf but before your admin include:
(r'^admin/templatesadmin/', include('templatesadmin.urls')),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.
Optional Settings:
There are some settings that you can override in your settings.py:
TEMPLATESADMIN_GROUP: The name of your group of your TemplatesAdmin Users.
Default: TemplateAdmins
TEMPLATESADMIN_VALID_FILE_EXTENSIONS: A tuple of file-extensions (without the leading dot) that are editable by TemplatesAdmin.
Default:
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.
Default: False
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:
dotbackupfiles.DotBackupFilesHook: Creates a copy of the original file before overwriting, naming it <oldname>.backup.
gitcommit.GitCommitHook: Commits your templates after saving via git version control.
hgcommit.HgCommitHook: Creates a mercurial commit after saving.
You can define your own edithooks, see above hooks as example.
Default:
TEMPLATESADMIN_EDITHOOKS = ( 'templatesadmin.edithooks.dotbackupfiles.DotBackupFilesHook', )
LICENSE:
This application is licensed under the Beerware License. See LICENSE for details.
Changelog:
v0.7 (2012-11-20)
Added missing permission check for an Admin view.
v0.6 (2009-09-08)
Published under a proper BSD license.
The templates now inherits from the Django templates to provide a better look and feel.
A lot of overall improvements from typo fixing to better permission handling. Thanks to peritus and rlaager.
v0.5.5 (2009-02-13)
Documented that there is a edithook for mercurial repositories.
Bugfix in GitCommitHook: Allow non-ascii characters.
v0.5.4 (2009-02-13)
Fixed missing templatetags in pypi release.
v0.5.3 (2009-02-03)
Edit-Views now have an optional argument “base_form” to overwrite the default form.
Removed shorten-path functions. They didn’t work under some conditions.
List of templates in the admin overview are shorter.
v0.5.2 (2008-12-12)
Metadata
Release files for django-templatesadmin 0.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| django-templatesadmin-0.7.tar.gz | 9.5 kB | Without provenance | Details for django-templatesadmin-0.7.tar.gz |
Release files / django-templatesadmin-0.7.tar.gz
| Download URL | django-templatesadmin-0.7.tar.gz |
|---|---|
| Size | 9.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3342d23f99a3a5a959eae3ddb777b8e65b3b1ead55cdb6dc310ba2c5636fcf73
|
|
BLAKE2b-256 checksum How to use checksums |
24fb736fad2a9e093e75d6f7d1dd53a11ae174e489f77ba42ab49a5c7f00899d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for django-templatesadmin 0.7
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.