As written, this view will break if you perform an HTTP GET against it. If you make it a class-based view and subclass View, you can put this code in a method named "post" and it'll only get called with an HTTP POST is made. GETs, etc, will return 405 - Invalid Method.