Right, I understand the loader works this way… What I'm trying to do is 
generate a list of 'choices' for a model field that populates itself 
automatically with available templates in a given directory, that works 
regardless of whether the specified directory is on a template path specified 
in the TEMPLATE_DIRS setting or a template path loaded by some loader other 
than the filesystem loader.

I want to scan a directory on the template path and return a list of all the 
files in that directory, ideally by hooking into whatever functions Django uses 
to locate templates, so that my list will populate correctly whether the 
directory is on an app-specific template path or one explicitly defined in the 
TEMPLATE_DIRS setting. Does that make sense? Point is I want to be able to just 
create new template files in this particular directory and have them 
automatically show up as available choices for a "template" field on my model.


On Friday, February 10, 2012 at 1:33 PM, Python_Junkie wrote:

>  
> https://docs.djangoproject.com/en/dev/ref/templates/api/
>  
> Search on template loaders and this url will explain it.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to