harvard-lil/perma — pull request #474 by jcushman (2014-03-22 16:01:21+00:00)
Title: Add mirror mode.

This adds the ability for Perma to run as a main server or a mirror.

As long as MIRRORING_ENABLED=False, nothing will change about Perma's behavior. If set to True, the server will act as the main server if MIRROR_SERVER = False or as a mirror server if MIRROR_SERVER = True. Mirroring is further described in developer.md.

NOTE that this refactors the logged-in-user link-related views from user_management.py and api.py into link_management.py. user_management.py was getting really long, and api.py probably shouldn't have logged-in views -- we actually weren't checking whether users were logged in when creating new links.

This also moves all of the link-editing views under the /manage/ URL. As a result, users may need to do a hard-refresh to get updated URLs in their javascript.