django-scheduler icon indicating copy to clipboard operation
django-scheduler copied to clipboard

Daily view starts at 1:00 instead of 00:00 and ends with 0:30

Open gerdnb opened this issue 11 years ago • 5 comments

Daily view starts at 1:00 instead of 00:00 and ends with 0:30

how can i fix this?

gerdnb avatar Jan 13 '14 14:01 gerdnb

is it also possible to make it 1 hour blocks instead of 30 minutes? voorbeeld

gerdnb avatar Jan 13 '14 14:01 gerdnb

the url is 00 only the timename is 1:00

gerdnb avatar Jan 13 '14 15:01 gerdnb

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.

smarmet avatar Jul 14 '14 16:07 smarmet

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:

  1. 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/. The schedule subdirectory must exist as this is how all templates are referenced from within django-scheduler.
  2. 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 %}
  1. Place scheduler in your django config's INSTALLED_APPS below the app that has the customized templates so they are found first and used instead of the ones in django-scheduler.

mpaolino avatar Jan 04 '17 18:01 mpaolino

And yes, three config values for these would be great!

mpaolino avatar Jan 04 '17 18:01 mpaolino