from django.shortcuts import render
from django.views import View

class IndexView(View):
    def get(self, request, *args, **kwargs):
        # Mock data for demonstration purposes
        mock_tasks = [
            {
                'id': 1,
                'title': 'Finish the report for Q4',
                'description': 'Complete the financial report and send to management.',
                'priority': 'high',
                'status': 'in_progress',
            },
            {
                'id': 2,
                'title': 'Schedule team meeting',
                'description': 'Organize a meeting to discuss the new project timeline.',
                'priority': 'medium',
                'status': 'pending',
            },
            {
                'id': 3,
                'title': 'Book flight to New York',
                'description': '',
                'priority': 'low',
                'status': 'pending',
            },
            {
                'id': 4,
                'title': 'Review intern applications',
                'description': 'Go through the first batch of applications.',
                'priority': 'high',
                'status': 'completed',
            },
        ]
        context = {
            'tasks': mock_tasks
        }
        return render(request, 'core/index.html', context)


def article_detail(request):
    return render(request, 'core/article_detail.html')