Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add allocations & emails to the admin page #18

Open
Dropheart opened this issue Oct 9, 2024 · 0 comments
Open

Add allocations & emails to the admin page #18

Dropheart opened this issue Oct 9, 2024 · 0 comments

Comments

@Dropheart
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant