Skip to main content

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.

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.

Data Models

A time-bound notice posted by an admin.
FieldTypeNotes
titleCharFieldAnnouncement headline, max 200 chars
slugSlugFieldUnique URL identifier
contentCharFieldRich-text body (HTML permitted)
imageCloudinaryFieldStored in Cloudinary announcements/ folder
categoryCharFieldOne of: general, ramadan, taaleem, sale
is_pinnedBooleanFieldPinned announcements sort to the top of all listings
publish_atDateTimeFieldDefaults to now; can be future-dated for scheduled release
expire_atDateTimeFieldOptional expiry; is_expired() returns True after this
is_activeBooleanFieldManual visibility switch
send_emailBooleanFieldDispatch email notification to subscribers on save
email_sentBooleanFieldTracks whether notification was already dispatched
created_byForeignKey→UserThe admin who created the announcement
Default ordering: pinned first (-is_pinned), then newest (-publish_at).Categories:
ValueDisplay Label
generalGeneral
ramadanRamadan
taaleemTa’aleem
saleLapcoat / Sales
A date-specific prayer timetable entry for the Engineering Mosque.
FieldTypeNotes
dateDateFieldUnique per day
fajr_adhanTimeFieldCall to prayer time for Fajr
fajr_iqamaTimeFieldCongregational start for Fajr
dhuhr_adhanTimeFieldCall to prayer time for Dhuhr
dhuhr_iqamaTimeFieldCongregational start for Dhuhr
asr_adhanTimeFieldCall to prayer time for Asr
asr_iqamaTimeFieldCongregational start for Asr
maghrib_adhanTimeFieldCall to prayer time for Maghrib
maghrib_iqamaTimeFieldCongregational start for Maghrib
isha_adhanTimeFieldCall to prayer time for Isha
isha_iqamaTimeFieldCongregational start for Isha
is_activeBooleanFieldHides the schedule if False
send_emailBooleanFieldNotify 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.
A mailing-list member with granular notification preferences.
FieldTypeNotes
emailEmailFieldUnique identifier
is_verifiedBooleanFieldSet after email confirmation
tokenUUIDFieldUUID4 — used for unsubscribe and confirmation links
is_activeBooleanFieldDeactivate without deleting
notify_announcementsBooleanFieldReceive announcement emails (default True)
notify_eventsBooleanFieldReceive event emails (default True)
notify_prayer_changesBooleanFieldReceive prayer-time update emails (default False)
last_notifiedDateTimeFieldTracks last outgoing email
A fundraising drive with bank transfer details.
FieldTypeNotes
titleCharFieldCampaign name
descriptionTextFieldPurpose and context
bank_detailsTextFieldAccount name, number, and bank
goal_amountDecimalFieldOptional fundraising target
is_activeBooleanFieldShow/hide from the donations page
created_atDateTimeFieldAuto-set on creation
MosqueInfo — singleton record for the Engineering Mosque’s contact details and background.
FieldTypeNotes
locationCharFieldBuilding or area
descriptionTextFieldHistory or brief description
imam_nameCharFieldResident imam (optional)
contact_emailEmailFieldOptional contact
contact_phoneCharFieldOptional phone number
MosqueRule — an individual rule or guideline displayed on the mosque page.
FieldTypeNotes
titleCharFieldRule heading
contentTextFieldFull rule text
orderPositiveIntegerFieldDisplay order
is_activeBooleanFieldShow/hide individual rules
MagazineIssue — a published volume of the NAMETS magazine (e.g., Al-Irshad Vol. 1).
FieldTypeNotes
titleCharFieldVolume title
slugSlugFieldUnique URL identifier
descriptionTextFieldOverview of the issue
cover_imageCloudinaryFieldStored in magazine/covers/
pdf_fileCloudinaryFieldFull PDF stored in magazine/pdfs/
published_dateDateFieldPublic release date
is_activeBooleanFieldControls public visibility
Article — a standalone article that can optionally belong to a magazine issue.
FieldTypeNotes
issueForeignKeyOptional link to a MagazineIssue
titleCharFieldArticle title
slugSlugFieldUnique URL identifier
categoryCharFielde.g., Islam & Health, Engineering
authorCharFieldAuthor name (optional)
contentTextFieldFull article body
imageCloudinaryFieldStored in articles/
published_atDateTimeFieldDefaults to now; controls ordering
is_activeBooleanFieldControls public visibility

URL Routes

All routes are under the communications app namespace.
NameURL PatternDescription
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

1

User submits the subscription form

The user enters their email and selects notification preferences (notify_announcements, notify_events, notify_prayer_changes) at /subscribe/.
2

New vs existing subscriber check

  • New subscriber — a Subscriber record is created with is_verified = False and a random UUID token. 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.
3

Email verification

The verification link in the confirmation email contains the subscriber’s UUID token. Clicking it sets is_verified = True.
4

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.
5

Unsubscribing

Every email footer contains a personalised unsubscribe URL: /unsubscribe/<uuid:token>/. Visiting it immediately deactivates the subscriber record without requiring login. Users can also unsubscribe by email at /unsubscribe/.
The UUID token is generated once with uuid.uuid4() and never changes. This makes unsubscribe links permanent and safe to include in all outgoing emails.

Announcement Pinning

Set is_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 typePurpose
adhanThe call broadcast publicly; marks the earliest valid prayer window
iqamaThe start of the congregation; worshippers must arrive before this
Admins enter both times per day. The 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.

Build docs developers (and LLMs) love