Skip to content

Add allocations & emails to the admin page #18

@Dropheart

Description

@Dropheart

Currently, both allocations and emails are external scripts to run. For ease of use, it would be nice if we could have these as cards on the admin page.

The allocator is written in Python, so you'll have to think about how to call it from mad3. One way is by having a simple flask web server, not exposed to the web, that the backend calls. This will require modifying the allocator to manually get the families from the database, or a clunky interface where the user must manually input their auth cookie on the admin page to use in the allocator (the cookie cannot be accessed via JavaScript for security reasons). Another way is rewriting the allocator in Typescript on the backend but... Python is the language of data science. Or something. I'm not a data science person. Maybe there's something you can do with web assembly but I straight up do not know enough about that to say here.

Email is probably much simpler to do from the backend using Kishan's mailmerge tool. You'll also want a field in the meta table in the database that says whether emails were sent, and blocks sending them again if so.

This is low priority as the way we do it currently works, it would just be nice to be able to do everything from the admin page once the site is deployed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions