The Events module powers the full lifecycle of NAMETS activities — from weekly lectures to annual NAMETS Week celebrations. Admins create categorised events, control visibility, and members can add any event directly to their personal calendar via iCal export.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Muhammadbugaje/NAMETS_Website/llms.txt
Use this file to discover all available pages before exploring further.
Data Models
EventCategory
Groups events into named segments (e.g., Lecture, Sports, Social). Each category carries a unique slug used for URL-based filtering.| Field | Type | Notes |
|---|---|---|
name | CharField | Display name, max 100 chars |
slug | SlugField | URL-safe identifier, must be unique |
description | TextField | Optional summary of the category |
Event
The primary model storing all event data.| Field | Type | Notes |
|---|---|---|
title | CharField | Event name, max 200 chars |
slug | SlugField | Unique URL identifier |
description | CharField | Rich-text event body (HTML allowed) |
category | ForeignKey | Links to EventCategory; nullable |
start_datetime | DateTimeField | Event start — timezone-aware |
end_datetime | DateTimeField | Event end — timezone-aware |
location | CharField | Venue name or address, max 200 chars |
image | CloudinaryField | Stored in Cloudinary events/ folder |
is_featured | BooleanField | Highlights the event on the homepage |
is_active | BooleanField | Controls public visibility |
send_email | BooleanField | Triggers member email notification on save |
created_at | DateTimeField | Auto-set on creation |
updated_at | DateTimeField | Auto-updated on every save |
Event Status Property
EachEvent instance exposes a computed status property that compares the current server time against start_datetime and end_datetime:
upcoming
upcoming
Current time is before
start_datetime. The event is scheduled but has not started.ongoing
ongoing
Current time is between
start_datetime and end_datetime. The event is in progress.past
past
Current time is after
end_datetime. The event has concluded.draft
draft
Either
start_datetime or end_datetime is missing. The event is incomplete.URL Routes
All routes live under the/events/ prefix (app namespace: events).
| Name | URL Pattern | View | Description |
|---|---|---|---|
list | /events/ | event_list | Filterable list (upcoming/ongoing/past) |
upcoming | /events/upcoming/ | upcoming_events | Shortcut for upcoming events only |
past | /events/past/ | past_events | Archive of concluded events |
detail | /events/<slug>/ | event_detail | Single event page |
calendar_ics | /events/calendar/<slug>/ | calendar_ics | Download .ics file for calendar apps |
Filtering on the List View
Theevent_list view accepts two query parameters:
| Parameter | Values | Default |
|---|---|---|
filter | upcoming, ongoing, past | upcoming |
category | Any EventCategory slug | All categories |
iCal Export
Thecalendar_ics view generates a standard RFC 5545 .ics file so members can import any NAMETS event into Google Calendar, Apple Calendar, or Outlook.
HTML tags and
entities are automatically stripped from the description before embedding in the .ics file, ensuring compatibility with all calendar clients.Content-Type: text/calendarContent-Disposition: attachment; filename="<slug>.ics"
is_active=True are accessible via this endpoint.
Admin Controls
Featuring an Event
Setis_featured = True to pin the event to the homepage hero or featured events section. Multiple events can be featured simultaneously.
Activating / Deactivating
Setis_active = False to hide an event from all public views and the iCal endpoint without deleting it.
Email Notifications
Create or edit the event in the Django admin
Fill in all required fields: title, slug, start/end datetimes, and location.
Enable the send_email flag
Tick the Send email notification checkbox before saving. This flag is per-event and one-shot — it will not re-send on subsequent saves.