Answer the question
In order to leave comments, you need to log in
How to make a selection for the "last 30 minutes" in a DateTimeField?
Hello.
Model:
class Chat2Model(models.Model):
topic = models.CharField(default="Break", choices=TOPIC_CHOICES, max_length=50, help_text="Дерево чата",
verbose_name="Тема Чата")
author = models.ForeignKey(User, on_delete=models.CASCADE, default=1)
chatdate = models.DateTimeField(auto_now=True)
chattext = models.TextField(help_text="Сам чат", verbose_name="Текст чата",
blank=True, null=True)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question