Replaces #441. This PR cleans up core/allocation/views.py code. Refactoring changes include removed unused imports, small restructures to remove repeating code, removed else statements where they did not appear to improve legibility, and added several helper functions for checking permissions, sending emails, and fetching allocation attributes.
Portions of this code was ported over from the FASRC fork of ColdFront. Thanks to @claire-peters for getting this started.
Replaces #441. This PR cleans up core/allocation/views.py code. Refactoring changes include removed unused imports, small restructures to remove repeating code, removed else statements where they did not appear to improve legibility, and added several helper functions for checking permissions, sending emails, and fetching allocation attributes.
Portions of this code was ported over from the FASRC fork of ColdFront. Thanks to @claire-peters for getting this started.