outreachy / website

Code for the Outreachy website, based on Python, Django, and Bootstrap.
https://www.outreachy.org
GNU General Public License v3.0
251 stars 235 forks source link

Create a shared ical feed of important dates #467

Open sagesharp opened 3 years ago

sagesharp commented 3 years ago

This is a medium-complexity issue. If this is your first time contributing to Outreachy, please complete an issue tagged "newcomers welcome" first.

Motivation

Outreachy has several important dates associated with an internship cohort. Those dates include basically all the dates in the RoundPage class in home/models.py. Sometimes these dates change when a deadline is extended. We want to keep mentors up to date with changes, even if they don't notice an email from us about the date change.

Outreachy mentors, coordinators, and organizers have all expressed interest in having an ical feed they can subscribe to. Most people are asking for an ical feed they can use for Google Calendar. We also want to make sure that we don't lock people into proprietary calendaring solutions, so making an official Google Calendar is a no-go.

Evaluating Django calendaring packages

There are Django packages that would allow us to generate an ical feed. ical is a fairly simple format, but having a maintained package instead of writing our own code to generate it would be good. As a bonus, maybe some of the packages have a nicer way of displaying calendars in a template?

The first part of this issue would be to evaluate any Django ical packages. Evaluate the Django calendaring packages on the following qualities:

Feel free to read the documentation for the packages, or try them out. But don't get too far into coding to integrate them into the Outreachy website until we agree on the top packages to evaluate further.

Implementation details

There should be some way to differentiate between dates that are important for mentors, applicants, and interns. Sometimes a date is important for both mentors and interns (like midpoint feedback deadlines). We could have a calendar only for applicants, and then a separate calendar for mentors, interns, and coordinators. Or we could add a description to the calendar entry to say which groups the date applies to.

There are a couple Django templates where have a list of dates displayed. It would be good to have a link to the ical feed in those places. Those pages are:

You'll need to find the associated Django templates that display those calendars. I believe they're in the home/templates/home/snippets/ directory. You can look up the views that are associated with those URLs above in home/urls.py. Once you find the view code in home/views.py, that code will render a particular Django template. That template may include additional "snippets" of Django templates. There should be a manage.py command to allow you to find all the templates included in a file. Use ./manage.py help to see how to use that command.

wetneb commented 1 year ago

As a coordinator and mentor, I would find this incredibly useful. I was actually thinking about opening an issue about it myself. I am glad you support the idea too!

Concerning the choice of library, since the dates you want to expose in the iCal calendar are already stored in existing Django models, I would intuitively go for a library which does not define its own calendar and event models, but rather is able to generate the iCal feed from pre-existing models. Otherwise, we would need to keep those library-defined models in sync with the existing Outreachy models, and that's a logic that would be easy to get wrong or get out of date quickly.

With this criteria in mind, it feels to me like django-ical would be a good fit. It is a very lightweight solution based on the Django syndication feed framework. What do you think of it? The rest of the libraries listed on Djangopackages seem to either define their own models or be smaller utilities that do not expose an iCal feed.

Another question that comes to mind is how to represent deadlines in an iCal calendar. A deadline is not quite like an event: it does not have a duration, for instance. Did you have a specific representation in mind? I can think of:

I have a bit of experience with Django so I could be tempted to have a go at this, if we can find common ground on those questions :)