The Communications module is how NAMETS keeps members informed. It covers pinnable announcements with category tagging, daily prayer schedules with adhan and iqama times, mosque information, donation campaigns, a magazine/article publishing system, and an email subscription service with per-preference opt-out via secure UUID tokens.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
Announcement
Announcement
A time-bound notice posted by an admin.
Default ordering: pinned first (
| Field | Type | Notes |
|---|---|---|
title | CharField | Announcement headline, max 200 chars |
slug | SlugField | Unique URL identifier |
content | CharField | Rich-text body (HTML permitted) |
image | CloudinaryField | Stored in Cloudinary announcements/ folder |
category | CharField | One of: general, ramadan, taaleem, sale |
is_pinned | BooleanField | Pinned announcements sort to the top of all listings |
publish_at | DateTimeField | Defaults to now; can be future-dated for scheduled release |
expire_at | DateTimeField | Optional expiry; is_expired() returns True after this |
is_active | BooleanField | Manual visibility switch |
send_email | BooleanField | Dispatch email notification to subscribers on save |
email_sent | BooleanField | Tracks whether notification was already dispatched |
created_by | ForeignKey→User | The admin who created the announcement |
-is_pinned), then newest (-publish_at).Categories:| Value | Display Label |
|---|---|
general | General |
ramadan | Ramadan |
taaleem | Ta’aleem |
sale | Lapcoat / Sales |
PrayerSchedule
PrayerSchedule
A date-specific prayer timetable entry for the Engineering Mosque.
| Field | Type | Notes |
|---|---|---|
date | DateField | Unique per day |
fajr_adhan | TimeField | Call to prayer time for Fajr |
fajr_iqama | TimeField | Congregational start for Fajr |
dhuhr_adhan | TimeField | Call to prayer time for Dhuhr |
dhuhr_iqama | TimeField | Congregational start for Dhuhr |
asr_adhan | TimeField | Call to prayer time for Asr |
asr_iqama | TimeField | Congregational start for Asr |
maghrib_adhan | TimeField | Call to prayer time for Maghrib |
maghrib_iqama | TimeField | Congregational start for Maghrib |
isha_adhan | TimeField | Call to prayer time for Isha |
isha_iqama | TimeField | Congregational start for Isha |
is_active | BooleanField | Hides the schedule if False |
send_email | BooleanField | Notify subscribers of time changes |
Adhan is the public call to prayer broadcast at the earliest permissible time. Iqama is the second call marking the start of the congregation — it is typically 5–20 minutes after adhan. Both times are stored separately so the mosque can display both to worshippers.
Subscriber
Subscriber
A mailing-list member with granular notification preferences.
| Field | Type | Notes |
|---|---|---|
email | EmailField | Unique identifier |
is_verified | BooleanField | Set after email confirmation |
token | UUIDField | UUID4 — used for unsubscribe and confirmation links |
is_active | BooleanField | Deactivate without deleting |
notify_announcements | BooleanField | Receive announcement emails (default True) |
notify_events | BooleanField | Receive event emails (default True) |
notify_prayer_changes | BooleanField | Receive prayer-time update emails (default False) |
last_notified | DateTimeField | Tracks last outgoing email |
DonationCampaign
DonationCampaign
A fundraising drive with bank transfer details.
| Field | Type | Notes |
|---|---|---|
title | CharField | Campaign name |
description | TextField | Purpose and context |
bank_details | TextField | Account name, number, and bank |
goal_amount | DecimalField | Optional fundraising target |
is_active | BooleanField | Show/hide from the donations page |
created_at | DateTimeField | Auto-set on creation |
MosqueInfo & MosqueRule
MosqueInfo & MosqueRule
MosqueInfo — singleton record for the Engineering Mosque’s contact details and background.
MosqueRule — an individual rule or guideline displayed on the mosque page.
| Field | Type | Notes |
|---|---|---|
location | CharField | Building or area |
description | TextField | History or brief description |
imam_name | CharField | Resident imam (optional) |
contact_email | EmailField | Optional contact |
contact_phone | CharField | Optional phone number |
| Field | Type | Notes |
|---|---|---|
title | CharField | Rule heading |
content | TextField | Full rule text |
order | PositiveIntegerField | Display order |
is_active | BooleanField | Show/hide individual rules |
MagazineIssue & Article
MagazineIssue & Article
MagazineIssue — a published volume of the NAMETS magazine (e.g., Al-Irshad Vol. 1).
Article — a standalone article that can optionally belong to a magazine issue.
| Field | Type | Notes |
|---|---|---|
title | CharField | Volume title |
slug | SlugField | Unique URL identifier |
description | TextField | Overview of the issue |
cover_image | CloudinaryField | Stored in magazine/covers/ |
pdf_file | CloudinaryField | Full PDF stored in magazine/pdfs/ |
published_date | DateField | Public release date |
is_active | BooleanField | Controls public visibility |
| Field | Type | Notes |
|---|---|---|
issue | ForeignKey | Optional link to a MagazineIssue |
title | CharField | Article title |
slug | SlugField | Unique URL identifier |
category | CharField | e.g., Islam & Health, Engineering |
author | CharField | Author name (optional) |
content | TextField | Full article body |
image | CloudinaryField | Stored in articles/ |
published_at | DateTimeField | Defaults to now; controls ordering |
is_active | BooleanField | Controls public visibility |
URL Routes
All routes are under thecommunications app namespace.
| Name | URL Pattern | Description |
|---|---|---|
announcement_list | /announcements/ | Paginated, filterable announcements |
announcement_detail | /announcements/<slug>/ | Single announcement |
prayer_times | /prayer-times/ | Today’s prayer schedule |
donation_list | /donations/ | Active donation campaigns |
mosque_info | /mosque/ | Mosque details and rules |
subscribe | /subscribe/ | Subscription form (POST only) |
subscribe_success | /subscribe/success/ | Post-subscription confirmation page |
unsubscribe | /unsubscribe/<uuid:token>/ | One-click unsubscribe via UUID token |
unsubscribe_by_email | /unsubscribe/ | Unsubscribe by email address |
confirm_subscription | /confirm-subscription/ | Confirm changed preferences |
article_list | /article/ | All active articles |
article_detail | /article/<slug>/ | Single article |
magazine_list | /magazine/ | All magazine issues |
magazine_detail | /magazine/<slug>/ | Single magazine issue with articles |
Subscription Flow
User submits the subscription form
The user enters their email and selects notification preferences (
notify_announcements, notify_events, notify_prayer_changes) at /subscribe/.New vs existing subscriber check
- New subscriber — a
Subscriberrecord is created withis_verified = Falseand a random UUIDtoken. A verification email is sent. - Existing subscriber with changed preferences — the pending changes are stored in the session and the user is redirected to
/confirm-subscription/to confirm. - Existing subscriber with identical preferences — the user is informed they are already subscribed.
Email verification
The verification link in the confirmation email contains the subscriber’s UUID
token. Clicking it sets is_verified = True.Receiving notifications
When an admin saves an
Announcement or Event with send_email = True, the system dispatches emails only to subscribers whose matching preference flag is True and is_verified = True.Announcement Pinning
Setis_pinned = True on any announcement to force it to the top of the listing regardless of publication date. Multiple announcements can be pinned simultaneously — they sort among themselves by publish_at descending.
Prayer Schedule: Adhan vs Iqama
Each of the five daily prayers stores two separate times:| Time type | Purpose |
|---|---|
adhan | The call broadcast publicly; marks the earliest valid prayer window |
iqama | The start of the congregation; worshippers must arrive before this |
prayer_times view fetches today’s schedule via selectors.get_today_prayer_schedule().
Magazine & Articles Publishing
Magazine Issues
Create a
MagazineIssue with a cover image and optional PDF upload. Issues are ordered by published_date descending. Each issue can contain zero or more Article records linked via the issue foreign key.Standalone Articles
Article records do not require a parent MagazineIssue. They can represent blog posts, khutbah transcripts, or any written content. Categories are free-text strings (e.g., Islam & Health).Set
is_active = False on an issue or article to remove it from all public views without deletion. Magazine PDFs are stored in the Cloudinary magazine/pdfs/ folder.