redirect
¶
This utility sets up different redirects from the CS 61A website. To add new
redirects, edit the lookup dictionary in main.py
. At the end of a semester,
edit deploy.yaml
to include <semester>.cs61a.org
. This target will
automatically redirect to inst.eecs.berkeley.edu/~cs61a/<semester>
.
This app has no local setup instructions, because it is not meant to be run locally.
Code Documentation¶
All of the code for redirection is contained in main.py
. It tries to retrieve
from a set LOOKUP dictionary and if it doesn’t exist tries to directly get a url
from the inst.eecs website. catch_all()
recieves a path and calls lookup()
to get the link. lookup()
creates the redirect link.