llazzaro / django-scheduler-sample

Example application of django-scheduler
78 stars 76 forks source link

fullcalendar.css does not exist #38

Open Liamhanninen opened 5 years ago

Liamhanninen commented 5 years ago

I couldn't find it in Windows file explorer. And just to make sure I wasn't crazy I used github's 'Find File' feature. It's referenced in fullcalendar.html:

<link rel='stylesheet' type='text/css' href="{% static 'fullcalendar/dist/fullcalendar.css' %}" />

woody1329 commented 4 years ago

I searched google and found a fullcalendar.css example from fullcalendar.io and copied it to bower_components\fullcalendar\dist and then ran collectstatic command and voila.

Liamhanninen commented 4 years ago

Great solution thanks for digging that up! But before I close this I wonder if it's expected to be included. If I'm the only one who expects it then I'll close it but it seems like the fullcalendar.css is expected by design. In which case I should leave this open until it's added to the repo, correct?

llazzaro commented 4 years ago

The idea was not to include third party css into the repo. That's why bower was added. However bower is almost dead now and we need to replace it.

mhunchojack commented 4 years ago

For the time-being, can you provide a fullcalendar.css? I tried using css from fullcalendar.io, but its only showing grids. Thanks

robertpro commented 4 years ago

So far, this is how I make the fullcalendar page work

{% extends "base.html" %}

{% load i18n static %}

{% block head_title %}{% trans "Fullcalendar" %}{% endblock %}

{% block tab_id %}id="home_tab"{% endblock %}

{% block extra_head %}
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/fullcalendar@5/main.min.css">

    <script src="https://cdn.jsdelivr.net/npm/fullcalendar@5/locales-all.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/fullcalendar@5/main.min.js"></script>
{% endblock %}

{% block body %}
    <div id="calendar"></div>
    <script>
        document.addEventListener('DOMContentLoaded', function () {
            var calendarEl = document.getElementById('calendar');
            var calendar = new FullCalendar.Calendar(calendarEl, {
                initialView: 'dayGridMonth',
                timeZone: 'America/Mexico_City',
                events: '/schedule/api/occurrences?calendar_slug=example',
            });
            calendar.render();
        });
    </script>

{% endblock %}