Python View Object Methods Javascript