TemplateDoesNotExist at/

19 views
Skip to first unread message

Andrew Emory

unread,
Aug 13, 2016, 2:32:11 PM8/13/16
to Django users

I am having a problem figuring this out and I think there is something wrong with my TEMPLATES dictionary in settings.py.


I have my templates in static/templates/app_name and static is in the same directory as my project source.


So I have nested os.path.join and os.path.dirname as follows: 'DIRS': [ os.path.join(os.path.dirname(BASE_DIR), 'static', 'templates'),],


Any help would be appreciated. All this came about because I was using a separate TEMPLATE_DIRS setting only to find our that was deprecated in 1.8 (I a using 1.10).  Also, I was unable to fix the problem hard coding the location (which I don't want to do anyway).


Thanks so much for any help.

Andrew Emory

unread,
Aug 13, 2016, 2:38:20 PM8/13/16
to Django users
Actually, its Django 1.9.

Andrew Emory

unread,
Aug 13, 2016, 3:07:35 PM8/13/16
to Django users
I figured it out.  Of course, now the form isn't rendering...

But at least Django isn't throwing that error anymore.  for all those who are curious, I was one directory shallow on the template file's location.  I was telling Django to look in static/templates when I needed to tell it to look in static/templates/app_name.
Reply all
Reply to author
Forward
0 new messages