This "if" check should be removed (and the variable from views.py as well), as you're doing this on the client-side now.  Doesn't matter if the distributed server is online.