def is_postable(self,<EOL>user=None,<EOL>data=None,<EOL>ajax=False,<EOL>no_redirect=False,<EOL>to=None,<EOL>to_url_name=None,<EOL>next_url='<STR_LIT>',<EOL>add_session=False,<EOL>session_dict={},<EOL>kwargs=None,<EOL>msg=None):
resp = self.post(<EOL>user=user,<EOL>data=data,<EOL>add_session=add_session,<EOL>session_dict=session_dict,<EOL>kwargs=kwargs,<EOL>ajax=ajax,<EOL>no_redirect=no_redirect)<EOL>if not (ajax or no_redirect) or to or to_url_name:<EOL><INDENT>if next_url:<EOL><INDENT>next_url = '<STR_LIT>'.format(next_url)<EOL><DEDENT>if to_url_name:<EOL><INDENT>try:<EOL><INDENT>self.assertEqual(<EOL>resolve(resp.url).url_name, to_url_name, msg=msg)<EOL><DEDENT>except AttributeError:<EOL><INDENT>raise AssertionError(<EOL>'<STR_LIT>'.format(<EOL>resp.status_code))<EOL><DEDENT><DEDENT>else:<EOL><INDENT>redirect_url = '<STR_LIT>'.format(to, next_url)<EOL>self.assertRedirects(resp, redirect_url, msg=msg)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>self.assert200(resp, user, msg=msg)<EOL><DEDENT>return resp<EOL>
Checks if the view handles POST correctly.