On 6/17/06, Adrian Holovaty <[EMAIL PROTECTED]> wrote:
> I agree 100% with James on this one. Having request.POST be an empty
> dictionary evaluating to True -- that's just too odd. I think we ought
> to bite the bullet and add request.method, which would be a shortcut
> to a normalized (all caps?
I have to agree that it should return false if there is no data.
Otherwise how are you going to tell the difference between a POST
with no data and a POST with data.
Another alternative is maybe request.method.POST and
request.method.GET for testing the method.
On 18/06/2006, at 9:20 PM, B
Bill de hÓra wrote:
> Luke Plant wrote:
>> Long version:
>> request.POST is (essentially) a dictionary of post variables. As such,
>> if it is empty, it evaluates to False, even if the request method is
>> 'POST'.
>
> That's a bug, imo.
Never mind - request.META["REQUEST_METHOD"] is news to
Luke Plant wrote:
>
> Long version:
> request.POST is (essentially) a dictionary of post variables. As such,
> if it is empty, it evaluates to False, even if the request method is
> 'POST'.
That's a bug, imo.
cheers
Bill
--~--~-~--~~~---~--~~
You received th
Adrian Holovaty wrote:
> On 6/17/06, James Bennett <[EMAIL PROTECTED]> wrote:
>> I'm not convinced that it'd be a good thing to have request.POST
>> evaluate to True in these cases, but the reasoning is somewhat
>> pedantic.
>>
>> First and foremost, there's a logical difference between the reques
Adrian Holovaty wrote:
> I think we ought
> to bite the bullet and add request.method, which would be a shortcut
> to a normalized (all caps?) version of request.META['REQUEST_METHOD'],
> which is cumbersome to type and might not (?) always be upper case.
>
Per HTTP all request methods are defi
On 6/17/06, James Bennett <[EMAIL PROTECTED]> wrote:
> I'm not convinced that it'd be a good thing to have request.POST
> evaluate to True in these cases, but the reasoning is somewhat
> pedantic.
>
> First and foremost, there's a logical difference between the request
> method and the request par
On 6/17/06, James Bennett <[EMAIL PROTECTED]> wrote:
> I'm not convinced that it'd be a good thing to have request.POST
> evaluate to True in these cases, but the reasoning is somewhat
> pedantic.
I put the comment on the ticket.
The use of request.POST seems overloaded to mean both "is it a pos
On 6/17/06, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote:
> There is already a way to test for posts via the request object:
> request.META['REQUEST_METHOD']. But your suggestion is not unreasonable,
> so best to file a ticket so that it can be considered without being
> forgotten.
I'm not convin
On 6/17/06, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote:
> There is already a way to test for posts via the request object:
> request.META['REQUEST_METHOD']. But your suggestion is not unreasonable,
> so best to file a ticket so that it can be considered without being
> forgotten.
Filed:
http://
On 6/17/06, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote:
> The implementation side is easy, if we decided to go this route: make
> sure that __nonzero__() on the MultiValueDict class returns the right
> thing in these cases.
Sorry, I dug around in python introspection docs a bit trying to find
w
Jeremy Dunck wrote:
> On 6/17/06, Luke Plant <[EMAIL PROTECTED]> wrote:
>> Long version:
>> request.POST is (essentially) a dictionary of post variables. As such,
>> if it is empty, it evaluates to False, even if the request method is
>> 'POST'. In your form, you don't have a single 'successful'
On Sat, 2006-06-17 at 19:44 -0500, Jeremy Dunck wrote:
> On 6/17/06, Luke Plant <[EMAIL PROTECTED]> wrote:
> > Long version:
> > request.POST is (essentially) a dictionary of post variables. As such,
> > if it is empty, it evaluates to False, even if the request method is
> > 'POST'. In your for
On 6/17/06, Luke Plant <[EMAIL PROTECTED]> wrote:
> Long version:
> request.POST is (essentially) a dictionary of post variables. As such,
> if it is empty, it evaluates to False, even if the request method is
> 'POST'. In your form, you don't have a single 'successful' field --
> the only field
On Sunday 18 June 2006 00:37, jacob wrote:
> I have an inbox template that generates a list of links to messages
> with the necessary trailing slash like this:
>
> blah blah
>
> That link takes you to the message view which has a form that looks
> like this:
>
>
>
>
Short version:
Yes, I've read http://code.djangoproject.com/wiki/NewbieMistakes
This is my URL list:
urlpatterns = patterns('',
(r'^admin/', include('django.contrib.admin.urls')),
(r'^settings/$','file.app.views.settings'),
(r'^inbox/$','file.app.views.inbox'),
(r'^sent/$','file
16 matches
Mail list logo