I tend to use:
TEMPLATE_DIRS = (
os.getcwd()+'/static/templates'
)
so when using generic views it goes to os.getcwd()+'/static/templates/<appname>'
this lets me have my proyect live in different folders and run fine...
in your case it is specting a directory tree like this:
/media/sda4/Projects/djcode/djdrive/<template_dir>/<app_name>/<view_name>
in other words you need to create a books dir:
/media/sda4/Projects/djcode/djdrive/templates/books/
and then put publisher_list.html in there
2009/1/5 knight <[email protected]>:
>
> I think you can try accessing books/publisher_list.html instead of
> just publisher_list.html
> This should solve the problem, if I understand it correctly.
>
> Regards, Alex A.
>
> On Jan 4, 11:11 am, HB <[email protected]> wrote:
>> Hey,
>> My Django project has the following structure:
>> +++
>> djcode
>> # Django files (urls.py ...)
>> templates (for storing template pages)
>> books
>> # books application files (models.py ...)
>> publisher_list.html
>> +++
>> Here is a snippet from settings.py
>> TEMPLATE_DIRS = (
>> os.path.join(os.path.dirname(__file__), 'templates'),
>> )
>>
>> But when I'm trying to access publisher_list.html , I got this
>> exception:
>> /media/sda4/Projects/djcode/djdrive/templates/books/
>> publisher_list.html
>> TemplateDoesNotExist
>>
>> I tried to add books folder to TEMPATES_DIRS, but I got the same
>> exception:
>> /media/sda4/Projects/djcode/djdrive/books/books/publisher_list.html
>> TemplateDoesNotExist
>>
>> Any ideas?
>> #Platform Django 1.0.2
>> Thanks for help.
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---