I am really new to Django. Problem is that i can't load my template which consists of two basic html files. Here is the Location for my template file:
/home/usman/Django Project/django-black/luckdrum/templates/
Here is my View function:
from django.shortcuts import render
from django.http import HttpResponse
from django.template.loader import get_template
from django.template import Context
def hello_template(request):
t=get_template('signup.html')
return HttpResponse(t)
Here is url.py file:
from django.conf.urls import include, url
from django.contrib import admin
urlpatterns = [
url(r'^admin/', include(admin.site.urls)),
url(r'^hello/','blog.views.hello'),
url(r'^signup.html/','blog.views.hello_template'),
]
I have also added the path in my settings.py as TEMPLATE_DIRS. The server shows an error as Template Doesnot Exist. Please help me out!