class customerDetailView(DetailView):
queryset = Customer.objects.get(name=self.name) # This line give error NameError: name 'self' is not defined
context_object_name = 'customerDetail'
template_name = "customer.html"
allow_empty = True
def __init__(self, name=None, *args):
self.name = name
给出错误 NameError: name 'self' is not defined