All user-uploaded images and files on the NAMETS platform are stored in Cloudinary rather than on the server’s local filesystem. This design means uploaded media persists across Render deployments and container restarts, where a localDocumentation 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.
media/ directory would be wiped on every new deploy. The Django cloudinary_storage library acts as a drop-in replacement for Django’s default file storage, so all ImageField, FileField, and CloudinaryField instances transparently write to and read from your Cloudinary cloud.
Required Environment Variables
Set these three variables before starting the server. Without them, any page that attempts to render or upload media will raise an authentication error from the Cloudinary API.Your unique cloud identifier, shown in the top-left corner of the Cloudinary dashboard. Example:
dxyz1234a.A numeric API key found in Settings → API Keys in the Cloudinary console. This key identifies your account in every SDK request.
The corresponding API secret for the key above. Treat this like a password — it authorizes uploads, transformations, and deletions. Click Reveal in the Cloudinary console to copy it.
Getting Your Credentials
Create or log in to Cloudinary
Go to cloudinary.com and sign up for a free account or log in.
Open the Dashboard
After logging in you land on the Dashboard. The Cloud Name is displayed prominently in the top section under your account name.
Find API credentials
Navigate to Settings → API Keys. Your API Key and API Secret are listed there. Click Reveal next to the secret if it is masked.
Django Configuration
The platform configures Cloudinary innamets/settings.py as follows. This block is already present — you only need to supply the environment variables.
secure=True ensures every public URL generated by the SDK uses https://. Do not change this in production.Cloudinary Folder Structure
Each Django app uploads files to a dedicated Cloudinary folder, keeping your media library organized. The table below maps every folder to the model that writes to it.| Cloudinary Folder | App / Model | Content |
|---|---|---|
announcements/ | communications.Announcement | Announcement banner images |
events/ | events.Event | Event cover images |
gallery/ | gallery.Gallery, gallery.GalleryImage | Gallery album covers and photos |
materials/ | academics.CourseMaterial | Downloadable academic course materials |
user_resources/ | academics.UserResourceSubmission | Files submitted by students for review |
executives/ | community.Executive | Executive member profile photos |
patrons/ | community.Patron | Patron profile images |
developers/ | community.Developer | Developer team photos |
islamiyya_photos/ | academics.IslamiyyaRegistration | Passport photos for Islamiyya registration |
namets_docs/ | community.NAMETSDocument | Official documents (constitution, reports) |
magazine/covers/ | communications.Magazine | Magazine issue cover images |
magazine/pdfs/ | communications.Magazine | Magazine issue PDF files |
lostfound/ | lostfound.Item | Lost-and-found item photos |
Allowed File Types for Resource Submissions
When students submit files through theUserResourceSubmission form, the platform enforces a strict allowlist. Uploads with any other extension are rejected with a validation error before reaching Cloudinary.
Allowed extensions for
UserResourceSubmission: pdf, doc, docx, jpg, jpeg, png, zip, pptx. All other formats are blocked by the model’s clean() method.