django-scheduler
django-scheduler copied to clipboard
Daily view starts at 1:00 instead of 00:00 and ends with 0:30
Daily view starts at 1:00 instead of 00:00 and ends with 0:30
how can i fix this?
is it also possible to make it 1 hour blocks instead of 30 minutes?
the url is 00 only the timename is 1:00
From what I can tell, it always begins the day at UTC midnight. It would be nice if this was configurable
Edit: Looks like smcoll is way ahead of me on this. This issue is effectively a duplicate.
This bug is probably deprecated as its too old, but I'll explain what I did to customize my calendars for future reference. Start, end and slot duration on the web calendars are governed by the parameters passed to the daily_table template tag defined here.
AFAIK the templates that use it are:
To customize these values you need to overwrite these templates. To do this elegantly you need to do 3 things:
- Copy the templates in django-scheduler under your the template search path. Normally django looks under the
templates
subdirectory of every django app, so that would normally be under<your django app directory>/templates/schedule/
. Theschedule
subdirectory must exist as this is how all templates are referenced from within django-scheduler. - Customize the copied templates passing the start (hour) end (hour) and slot duration in minutes that you want, example, to start at 00, end at 24 hours and have 15 min slots you would use this:
{% daily_table day 0 24 15 %}
- Place
scheduler
in your django config'sINSTALLED_APPS
below the app that has the customized templates so they are found first and used instead of the ones in django-scheduler.
And yes, three config values for these would be great!