views.py tell me how to write code, thanks in advance
def articles(request, article_id): queryset = Article.objects.all() comments_sum = Comments.objects.values('comments_article_id').count() return render_to_response('articles.html', {'articles': queryset, 'article1': comments_sum}) models.py
from django.db import models class Article(models.Model): class Meta: db_table = "article" article_title = models.CharField(max_length=100) article_text = models.TextField() article_date = models.DateTimeField() article_likes = models.IntegerField(default=0) article_comment_sum = models.IntegerField(default=0) def __str__(self): return self.article_title class Comments(models.Model): class Meta: db_table = "comments" comments_text = models.TextField(verbose_name='Поле комментария') comments_article = models.ForeignKey(Article, on_delete=models.CASCADE) article_comments_sum = models.IntegerField(default=0) def __str__(self): return self.comments_text