The setttings file is a python module.

See page
https://docs.djangoproject.com/en/dev/topics/settings/

Since the path is set for the templates.
*******************
frrom the example

TEMPLATE_DIRS = ('/home/templates/mike')

in the view

templates=os.listdir(TEMPLATE_DIRS)
###template_count=len(templates)

create a  dictionary of templates and pass it back to the rendered
template and you have it.





On Feb 10, 12:42 pm, Micky Hulse <rgmi...@gmail.com> wrote:
> On Fri, Feb 10, 2012 at 6:40 AM, Patrick Wellever <pwelle...@gmail.com> wrote:
> > I guess the main question is, is there some function I can use to return a
> > directory on the template path?
>
> I'm interested in this also.
>
> I too have my own static pages app and have always thought it would be
> easier for folks to choose from a list of files rather than have to
> remember what's there on the file system.
>
> I suppose one way to do it would be to create an FK to another model
> what someone has entered the paths to available templates... But, I do
> like the idea of reading the contents of a folder and having a
> dropdown that updates dynamically (with code portability in mind).
>
> Patrick, if you find a solution please post it back here to the list.
> I will do the same.
>
> Thanks!
> M

-- 
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