python - Preprocess SHPAML in Django's template loader? -


Whether the Django template loader has all the templates loaded through SAPAPAL (i.e. Is there a way to run? It shows that the HTML is outdated?

I know that there is a way to recycle SPAPAL on a complete directory, but I like being able to run it on demand, so I do not have to remember it every time I change the SHPAML source I am

I think that from admin.py will also use SPAGL (at least for test servers), but capable of hacking into the Denggo's template engine and capable of making it every run it's a preprocessor Loads through the medium, it would be nice.

I suspect that you can get (or whatever loader you use) and < Code> load_template_source to overwrite the method, for example: import the django.template.loaders.app_directories from

  shpaml import convert_text class SHPAMLLoader (L oder): DEF load_template_source ( Self, * args, ** kwargs): shpaml_source = super (SHPAMLLoader, self). Load_template_source (* args, ** kwargs) html = convert_text (shpaml_source) return html  

then put your loader in the beginning of your settings.py in the beginning of the TEMPLATE_LOADERS Please give it. Of course, whenever the template is full, you will be doing SHAPAML in HTML dancing, so that you can see some upper part.

Disclaimer: This code is not completely unwanted, sorry.


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -