learning-unlimited / ESP-Website

A website to help manage the logistics of large, short-term educational programs
83 stars 57 forks source link

Move mailgate and dbmail_cron to use script_setup #1872

Open benjaminjkraft opened 8 years ago

benjaminjkraft commented 8 years ago

They do a bunch of manual path-munging, where they could just use script_setup. Presumably this is just because they predate script_setup, but we'll need to make sure it doesn't break anything to switch.

btidor commented 8 years ago

Just FYI, script_setup was designed for our useful scripts, so it sets up the environment in a way that might not be appropriate for "real" code. In particular, it magically imports everything in the way that shell_plus does.

Other good options could be to migrate these scripts to manage.py commands, or to refactor script_setup into a core part that sets up the environment like a Django script, and an extra part that sets up the environment like shell_plus.