Most form submissions in lowFAT trigger automatic email notifications to staff and/or Fellows (e.g. funding requests, expense claims, and blog posts).

These emails are generated using configurable templates.


Enabling Email Notifications

Email notifications are disabled by default.

To enable them:

  • Go to:
    https://fellows.software.ac.uk/admin/constance/config/

  • Configure the following settings:

    • FELLOWS_MANAGEMENT_EMAIL
    • STAFFS_EMAIL
    • STAFF_EMAIL_NOTIFICATION
    • STAFF_EMAIL_REMINDER
    • DAYS_TO_ANSWER_BACK
    • CLAIMANT_EMAIL_NOTIFICATION

These settings control who receives notifications and when they are triggered.


Email Reminders

Reminder emails (e.g. for unprocessed requests) must be scheduled using Cron or a similar task scheduler.

To configure this:

Run:

crontab -e

Add:

0 0 * * * /path/to/python /path/to/manage.py runjobs daily

This runs the reminder job once per day.


Accessing Email Templates

Email templates are managed through Flat Pages in the admin interface.

To access them:

  • Log in to the admin panel
  • Navigate to Flat Pages
  • Look for entries with URLs starting with:
/email/template/
List of email templates in FlatPages

Each entry corresponds to a specific type of email notification.


Editing an Email Template

Selecting a template opens an edit page where you can modify:

  • Title – used as the email subject
  • Content – the body of the email
Editing an email template

The content is written in HTML, which controls formatting and layout.


Template Content and Placeholders

Email templates use HTML with dynamic placeholders.

Placeholders use Django’s template syntax:

{{ variable }}

For example:

<p>Dear {{ fund.claimant.fullname }},</p>

When the email is sent, this is replaced with real data:

Dear Ali Christensen,

These placeholders allow the system to insert:

  • Names
  • Links
  • Request details
  • Other dynamic content
Please note:
  • Placeholders (e.g. {{ ... }}) are replaced automatically by the system
  • Do not remove or modify them unless you understand their purpose
  • Ensure HTML structure remains valid
  • Changes will affect all future emails using that template

More information about Django templates:


Template Types and Their Variables

Each template corresponds to a specific workflow event in lowFAT.


/email/template/fund/claimant/

Email sent to the Fellow when a new funding request is submitted.

  • fund – funding request object

/email/template/fund/claimant/change/

Email sent when staff review or update a funding request.

  • old – previous version
  • new – updated version
  • notes – additional message

/email/template/fund/staff/

Email sent to staff when a new funding request is submitted.

  • fund – funding request object

/email/template/fund/staff/reminder/

Reminder email when a funding request has not been processed within a set number of days.

  • fund – funding request object

/email/template/expense/claimant/

Email sent to the Fellow when a new expense claim is submitted.

  • expense – expense object

/email/template/expense/claimant/change/

Email sent when staff review or update an expense claim.

  • old – previous version
  • new – updated version
  • notes – additional message

/email/template/expense/staff/

Email sent to staff when a new expense claim is submitted.

  • expense – expense object

/email/template/expense/staff/reminder/

Reminder email when an expense claim has not been processed within a set number of days.

  • expense – expense object

/email/template/blog/claimant/

Email sent when a blog post draft is submitted.

  • blog – blog post object

/email/template/blog/claimant/change/

Email sent when staff review or update a blog post draft.

  • old – previous version
  • new – updated version
  • notes – additional message

/email/template/blog/staff/

Email sent to staff when a new blog post draft is submitted.

  • blog – blog post object

/email/template/blog/staff/reminder/

Reminder email when a blog draft has not been processed within a set number of days.

  • blog – blog post object

Tips

To construct links inside emails, use:

{{ protocol }}://{{ site.domain }}{{ variable.function }}

This ensures links are generated correctly for the current environment.