[Fixed]-Error in viewing extended DetailView in Django

1👍

You are declaring a get_context_data inside the get_context_data method. It should be:

    def get_context_data(self, **kwargs):
        # Only one declaration, otherwise None will be returned by the function
        context = super(Developer_detail, self).get_context_data(**kwargs)
        tasks_dev = Task.oblects.filter(developer=self.object)
        context['tasks_dev'] = tasks_dev

        return context

Leave a comment