Files
files_mephi/8 сем/02 РВоИС/python/django/mephi_app/polls/models.py
T
Dmitry 98c27fec85 Bulk rename/move files to '8' directories
Perform a bulk rename/move of many files and folders: paths previously prefixed with '01', '02', '03', '04', etc. were relocated to equivalent paths prefixed with '8'. Changes are path-only (R100 renames) and do not modify file contents; this reorganizes the repository structure.
2026-06-09 22:25:32 +03:00

13 lines
523 B
Python

from django.db import models
# Create your models here.
class Question(models.Model):
question_text = models.CharField(verbose_name='Вопрос', max_length=200)
pub_date = models.DateTimeField(verbose_name='Дата публикации')
class Choice(models.Model):
question = models.ForeignKey(Question, on_delete=models.CASCADE)
choice_text = models.CharField(verbose_name='Ответ', max_length=200)
votes = models.IntegerField(verbose_name='Количество голосов', default=0)