This project is a Django application for browsing scholarships, applying online, and managing student and admin dashboards.
- Create and activate a virtual environment.
- Install dependencies:
pip install -r requirements.txt- Run migrations:
python manage.py migrate- Start the development server:
python manage.py runserverThe app uses SQLite locally unless you set DATABASE_URL.
Newsletter subscriptions now store subscriber emails in Django and send a branded welcome email. To make delivery work outside local development, configure SMTP-style environment variables:
EMAIL_BACKEND=django.core.mail.backends.smtp.EmailBackend
EMAIL_HOST=smtp.your-provider.com
EMAIL_PORT=587
EMAIL_HOST_USER=your-smtp-user
EMAIL_HOST_PASSWORD=your-smtp-password
EMAIL_USE_TLS=true
DEFAULT_FROM_EMAIL=ScholarHub <hello@your-domain.com>
SUPPORT_EMAIL=support@your-domain.com
SITE_URL=https://your-live-domain.comFor local testing, you can keep EMAIL_BACKEND=django.core.mail.backends.console.EmailBackend so emails print to the terminal instead of going out to a real inbox.
The app now auto-loads a root .env file, so copying .env.example to .env is enough for local email setup.
To verify delivery after you add real SMTP credentials, run:
python manage.py email_doctor --connect
python manage.py send_test_email --to you@example.comIf you want the email to include a real dashboard link for an existing account, add:
python manage.py send_test_email --to you@example.com --user your_usernameThis repo includes a render.yaml Blueprint for a Python web service plus a managed Postgres database.
- Gunicorn for the Django app server
- WhiteNoise for production static files
- Postgres in production through
DATABASE_URL - A persistent disk mounted at
/opt/render/project/src/mediafor uploaded files
- Push this repo to GitHub.
- In Render, click
New->Blueprint. - Select this repository and apply the Blueprint.
- The Blueprint build runs migrations and collects static files automatically.
- After the first deploy, create a superuser from the Render shell:
python manage.py createsuperuser- If you want seed data, run your preferred management commands from the Render shell, for example:
python manage.py seed_scholarshipsSECRET_KEYmust be set in production. The Blueprint generates one automatically.DEBUGis set tofalsein production.ALLOWED_HOSTSautomatically includes Render's hostname whenRENDER_EXTERNAL_HOSTNAMEis present.CSRF_TRUSTED_ORIGINSautomatically includes Render's external URL whenRENDER_EXTERNAL_URLis present.- Configure the email variables above in Render as well if you want newsletter welcome emails to reach real inboxes.
- The repository still has a stale
Dashboard/db.sqlite3file locked by another process. The live app now uses the root-leveldb.sqlite3. - Uploaded files need the persistent disk to survive redeploys on Render.