TemplateDoesNotExist
Verfasst: Samstag 3. August 2013, 15:32
so, und nun zur nächsten Frage:
an was kann es leigen, dass die Meldung:
TemplateDoesNotExist
kommt?
wie zu sehen ist, ist der Python Pfad gesetzt
der Pfad zu meiner index.html stimmt auch
allerdings kommt die Meldung dass TeplateDoesNotExist
kann mir jemand sagen was ich falsch mache
hier meine urls.py:
Hier meine views.py
und hier meine Settings.py
an was kann es leigen, dass die Meldung:
TemplateDoesNotExist
kommt?
Code: Alles auswählen
Python Path:
['/home/susanne/HomeView',
'/usr/lib/python2.7',
'/usr/lib/python2.7/plat-linux2',
'/usr/lib/python2.7/lib-tk',
'/usr/lib/python2.7/lib-old',
'/usr/lib/python2.7/lib-dynload',
'/usr/local/lib/python2.7/dist-packages',
'/usr/lib/python2.7/dist-packages',
'/usr/lib/python2.7/dist-packages/PIL',
'/usr/lib/python2.7/dist-packages/gst-0.10',
'/usr/lib/python2.7/dist-packages/gtk-2.0',
'/usr/lib/python2.7/dist-packages/ubuntu-sso-client',
'/usr/lib/python2.7/dist-packages/ubuntuone-client',
'/usr/lib/python2.7/dist-packages/ubuntuone-control-panel',
'/usr/lib/python2.7/dist-packages/ubuntuone-couch',
'/usr/lib/python2.7/dist-packages/ubuntuone-installer',
'/usr/lib/python2.7/dist-packages/ubuntuone-storage-protocol']
der Pfad zu meiner index.html stimmt auch
Code: Alles auswählen
Exception Value: /Templates/Articles/index.html
kann mir jemand sagen was ich falsch mache
hier meine urls.py:
Code: Alles auswählen
# Uncomment the next line to enable the Apps:
url(r'^Articles/$', 'Articles.views.index'),
Code: Alles auswählen
def index(request):
"Create a list of the 5 latest articles"
latest_articles_list = Article.objects.all().order_by('-pub_date')[:1]
return render(request,'/Templates/Articles/index.html',{
'latest_articles_list': latest_articles_list,
})
Code: Alles auswählen
TEMPLATE_DIRS = (
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
#'/Articles/Templates',
'/home/susanne/HomeView/Templates',
)
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
# Uncomment the next line to enable the admin:
'django.contrib.admin',
# Uncomment the next line to enable admin documentation:
# 'django.contrib.admindocs',
'Articles',
)