Upcoming events configuration

In the configuration of upcoming events to be displayed, what is the “days” column about? Is it the maximum number of days ahead of the event to have it displayed in the list?

At our site, I saw events in November displayed when the number of days is 30 (we are on Sept. 16)…



Hey, the following is a snippet of code fetching upcoming events

now = now_utc(False).astimezone(tz)
for entry in data['entries']:
    delta = timedelta(days=entry['days'])
    query = (base_query
             .filter(db.cast(Event.start_dt.astimezone(tz), db.Date) > (now - delta).date())
             .with_entities(Event, db.literal(entry['weight']).label('weight')))

So as you can see, we only select those events for which start date is after today - number_of_days.


Hello, sorry to ask, but I’m struggling to understand how to configure the “Upcoming events” panel. Is there any tutorial available?

It’s quite easy: You go to Administration → Homepage → Upcoming events and then add a new entry. For example, the screenshot below would display up to 6 upcoming events from the categories with the IDs 6745 and 6725 for 7 days, and both with the same priority:

You can find the category ID in the URL when viewing a category.

Yes, of course it works! Thank you very much: I didn’t know how to identify the category ID.
Best regards from Brussels.