so what I'm trying to build is basically a calendar. For this, a user has to choose a beginning date and time for an event as well as an end time. Everything then has to be stored - of course - in the database.
I want to realize that by using a ChoiseField (unless there is a better solution). How would it be possible to generate all the dates of the month in a coisefield since some months are 30 days others have a different length etc.? Same with the hours of a day?
I cant seem to come up with a working approach? How would one approach this problem? suggestions?
I would do it as two fields:
#models.py
class Event(models.Model):
start = models.DateTimeField(default=datetime.now())
end = models.DateTimeField()
and for calendar (=widget) i would use this or some similar plugin: https://github.com/nkunihiko/django-bootstrap3-datetimepicker