我正在尝试将模板信息放入我的视图文件中,但我不断收到错误消息,指出我的输出缩进错误。我这样做对吗?
from django.http import HttpResponse
from django.template import Context
from django.template.loader import get_template
def main_page(request): 
   template = get_template('main_page.html')
   variables = Context({
       'head_title': u'Django Bookmarks',
       'page_title': u'Welcome to Django Bookmarks',
       'page_body': u'Where you can store and share bookmarks'
       })
         output =  template.render(variables)
         return HttpResponse(output)
我不断收到缩进错误,我不知道发生了什么。提前感谢您的帮助