more djangooish way checking of request 'method'

Consider this code and check https://code.djangoproject.com/ticket/2931 .