Moving all the server-side stuff to django