Check request type in Django
Posted
by Art
on Stack Overflow
See other posts from Stack Overflow
or by Art
Published on 2010-05-30T04:22:14Z
Indexed on
2010/05/30
4:32 UTC
Read the original article
Hit count: 306
django
|coding-style
While it is recommended to use the following construct to check whether request is POST,
if request.method == 'POST':
pass
It is likely that people will find
if request.POST:
pass
to be more elegant and concise.
Are there any reasons not to use it, apart from personal preference?
© Stack Overflow or respective owner