title: Django Python: global name 'render' is not defined
body: <p>I am getting an error in my Django project, and it looks like it's coming from my views.py file: </p>
  
  <pre><code>from django.template.loader import get_template
  from django.template import Context
  from django.http import HttpResponse
  import datetime
  
  def get_date_time(request):
      now = datetime.datetime.now()
      return render(request, 'date_time.html', {'current_date': now})
  </code></pre>
  
  <p>Error: <code>global name 'render' is not defined</code></p>
  
  <p>What can I do to solve this?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>Solution: </p>
  
  <pre><code>t = get_template('document.html')
  html = t.render(Context({'variable': value}))
  return HttpResponse(html)
  </code></pre>