Re: Beginner needing help with a TemplateDoesNotExist exception, when the file does exist.
Hi Martin
Thanks for this insight. I saw them placing templates outside the
project directory in the tutorial, so I thought that might be a common
thing to do. I am switching from php to python, so I'm learning a
lot. What you say does make sense from a SCM point of view. I am
assuming that most django'ers put their templates inside of the
project? The thing that really bugs me is that the site works
perfectly using the django web server, but when I deploy to apache
wsgi, it gives me that exception. I am almost thinking that it is my
apache virtual host config. Here it is if this can help anyone shine
some light onto this issue.
1 NameVirtualHost *
2 <VirtualHost *>
3
4 ServerName foo
5 DocumentRoot /media/PENDRIVE/Projects/foo/
6
7 <Directory /media/PENDRIVE/Projects/foo>
8 Order allow,deny
9 Allow from all
10 </Directory>
11
12
13 ErrorLog ${APACHE_LOG_DIR}/foo-error.log
14
15 # Possible values include: debug, info, notice, warn, error,
crit,
16 # alert, emerg.
17 LogLevel warn
18
19 CustomLog ${APACHE_LOG_DIR}/foo.log combined
20
21 WSGIDaemonProcess foo python-path=/media/PENDRIVE/Projects/foo
22 WSGIProcessGroup foo
23 WSGIScriptAlias / /media/PENDRIVE/Projects/foo/deploy/
pinax.wsgi
24
25 </VirtualHost>
Thanks again
Cheers!
On Jun 5, 6:58 pm, Martin <martin.brochh...@googlemail.com> wrote:
> It's a bit weird that you have your templates in your home folder.
> I would expect them to be in your project's folder.
>
> For example: /home/foobar/projects/yourproject/templates
>
> If you were using some version control software like git you would want to
> have everything that belongs to yout project inside your project folder.
> Otherwise you would have to create several repositories (one for your apps
> and views and one for your templates) which doesn't really make sense.
>
> But in the end that is probably up to you.
>
> Best regards,
> Martin
>
> On Mon, Jun 6, 2011 at 9:47 AM, Christopher <artha...@gmail.com> wrote:
> > From what I understand, the location of my templates is supposed to go
> > in the TEMPLATE_DIRS block of the settings.py file. This directory is
> > located in my home/foobar/, thus the /home/foobar/templates.
>
> > Is there something wrong with this?
>
> > On Jun 5, 4:38 pm, Mike Dewhirst <mi...@dewhirst.com.au> wrote:
> > > On 6/06/2011 6:51am, Christopher wrote:
>
> > > > 110 "/home/foobar/templates",
>
> > > ???
>
> > --
> > 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+unsubscribe@googlegroups.com.
> > For more options, visit this group at
> >http://groups.google.com/group/django-users?hl=en.
--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home