refactored edit and update methods to one method to follow the typical django patterns