__init __()需要1个位置参数,但是2个给django

时间:2018-03-28 15:48:39

标签: python django jinja2

from django.shortcuts import render
from .forms import PostForm
from django.views.generic import TemplateView

class createPost(TemplateView):
    template_name = 'forum/createPost.html'

    def get(self, request):
        form = HomeForm()
        return render(request, self.template_name, {'form': form})

0 个答案:

没有答案