Good day!

models.py

week_day = models.ForeignKey(WeekDays) 

How can I make a choice in this field just for the day of the week using models.DateTimeField or models.DateField? The point is to select the day of the week and set the work schedule for this day in other fields.

  • Do you have the days of the week stored in a separate model? 😲 - Sergey Gornostaev
  • Until I figured out how else to do it - Sirega Krivayanog

1 answer 1

decided by the field weekday = models.IntegerField(choices=WEEKDAYS, default=1)