1
You could use a data attribute on the div
to pass a configurable height:
<div id="calendar_dash" data-height="{{ calendar_height }}"></div>
… where calendar_height
is an integer that you have passed to the template context.
Then in your JS:
var calendar_div = $('#calendar_dash');
calendar_div.fullCalendar({
// ...
height: calendar_div.data("height"),
//...
});
You may want to enhance this a bit to fall back to some default if the data attribute is not specified.
Source:stackexchange.com