TemplatePages directory

1 view
Skip to first unread message

Baurzhan Ismagulov

unread,
Aug 25, 2006, 12:54:31 PM8/25/06
to django...@googlegroups.com
Hello,

I'm trying TemplatePages. So far, it does what I want, namely, avoid
writing a views.py function for every static page. Some issues:

* I have the following directory structure:
/dir/myprj/myapp/
/dir/verdjnlib/

I add /dir to PYTHONPATH. In this layout, I have to put the html
templates to /dir/verdjnlib/templatepages/templates/templatepages. How
can I customize the directory without modifying verdjnlib for each
project?

* Is there a repository, or at least a tarball for download? I'd like to
package verdjnlib for Debian.

With kind regards,
Baurzhan.

Derek Hoy

unread,
Aug 27, 2006, 5:36:29 AM8/27/06
to django...@googlegroups.com
On 8/25/06, Baurzhan Ismagulov <i...@radix50.net> wrote:
> I add /dir to PYTHONPATH. In this layout, I have to put the html
> templates to /dir/verdjnlib/templatepages/templates/templatepages. How
> can I customize the directory without modifying verdjnlib for each
> project?

It will find templates/pages anywhere that django looks for
templates, so that's sitetemplates and each app/templates directory.

I'm using it on a Linux box and just symlinking into my sitetemplates directory.
That leaves the 'static' page developer with access to the old content
in its old location until we move it all over. It's working very
well.

--
Derek

Baurzhan Ismagulov

unread,
Aug 28, 2006, 3:30:51 AM8/28/06
to django...@googlegroups.com, verdjn...@googlegroups.com
On Sun, Aug 27, 2006 at 10:36:29AM +0100, Derek Hoy wrote:
> On 8/25/06, Baurzhan Ismagulov <i...@radix50.net> wrote:
> > I add /dir to PYTHONPATH. In this layout, I have to put the html
> > templates to /dir/verdjnlib/templatepages/templates/templatepages. How
> > can I customize the directory without modifying verdjnlib for each
> > project?
>
> It will find templates/pages anywhere that django looks for
> templates, so that's sitetemplates and each app/templates directory.

Ah, never mind. I've added '/dir/myprj/myapp/templates' to
TEMPLATE_DIRS, and it worked. Thanks Bryan and Derek!

With kind regards,
Baurzhan.

Reply all
Reply to author
Forward
0 new messages